From 9eac17200054dc31299ab1fedfc84c5b6d9a57e7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 26 Jul 2024 20:55:18 +0200 Subject: [PATCH] Fixed an issue where the theme downloader percentage indicators did not render when using the ja_JP locale --- es-app/src/guis/GuiThemeDownloader.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/es-app/src/guis/GuiThemeDownloader.cpp b/es-app/src/guis/GuiThemeDownloader.cpp index 3554cb018..3ed5db717 100644 --- a/es-app/src/guis/GuiThemeDownloader.cpp +++ b/es-app/src/guis/GuiThemeDownloader.cpp @@ -1102,7 +1102,12 @@ void GuiThemeDownloader::update(int deltaTime) if (mReceivedObjectsProgress != 1.0f) { progress = static_cast( std::round(glm::mix(0.0f, 100.0f, static_cast(mReceivedObjectsProgress)))); - if (mStatusText.substr(0, std::string {_("DOWNLOADING")}.length()) == _("DOWNLOADING")) + if (mStatusText.substr(0, std::string {_("DOWNLOADING")}.length()) == + _("DOWNLOADING") || + mStatusText.substr(0, std::string {_("DOWNLOADING THEME")}.length()) == + _("DOWNLOADING THEME") || + mStatusText.substr(0, std::string {_("DOWNLOADING THEMES LIST")}.length()) == + _("DOWNLOADING THEMES LIST")) mBusyAnim.setText(mStatusText + " " + std::to_string(progress) + "%"); else mBusyAnim.setText(mStatusText); @@ -1110,7 +1115,12 @@ void GuiThemeDownloader::update(int deltaTime) else if (mReceivedObjectsProgress != 0.0f) { progress = static_cast( std::round(glm::mix(0.0f, 100.0f, static_cast(mResolveDeltaProgress)))); - if (mStatusText.substr(0, std::string {_("DOWNLOADING")}.length()) == _("DOWNLOADING")) + if (mStatusText.substr(0, std::string {_("DOWNLOADING")}.length()) == + _("DOWNLOADING") || + mStatusText.substr(0, std::string {_("DOWNLOADING THEME")}.length()) == + _("DOWNLOADING THEME") || + mStatusText.substr(0, std::string {_("DOWNLOADING THEMES LIST")}.length()) == + _("DOWNLOADING THEMES LIST")) mBusyAnim.setText(mStatusText + " " + std::to_string(progress) + "%"); else mBusyAnim.setText(mStatusText);