From 61cd18e91a2af2febc97e9a835f477b426fd1ac0 Mon Sep 17 00:00:00 2001 From: Fuzzbawls Date: Fri, 29 Oct 2021 03:59:14 -0700 Subject: [PATCH] [GUI] Force argument insertion when switching languages On the Welcome screen, when users change the language, a call to Qt's internal `retranslateUi()` is made. This, however does not take into consideration any arguments in a source string, and instead treats them as string literals (ie, `%1` is not considered an argument, but rather a literal string) Fix this by adding a supplemental call to `setText()` that DOES allow for argument processing directly after the retranslation. --- src/qt/pivx/welcomecontentwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/pivx/welcomecontentwidget.cpp b/src/qt/pivx/welcomecontentwidget.cpp index 70fcf911c1dd..7b5cd5f84832 100644 --- a/src/qt/pivx/welcomecontentwidget.cpp +++ b/src/qt/pivx/welcomecontentwidget.cpp @@ -209,6 +209,7 @@ void WelcomeContentWidget::checkLanguage() settings.sync(); Q_EMIT onLanguageSelected(); ui->retranslateUi(this); + ui->labelTitle2->setText(ui->labelTitle2->text().arg(PACKAGE_NAME)); } }