From ba38991c131d51709a7dd11e29444f3136af0e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 17 Jan 2017 21:17:36 +0100 Subject: GH-1788 fix missing translation strings --- application/dialogs/VersionSelectDialog.cpp | 6 +++--- application/setupwizard/AnalyticsWizardPage.cpp | 12 +++++------- application/setupwizard/JavaWizardPage.cpp | 20 ++++++++++---------- application/setupwizard/LanguageWizardPage.cpp | 4 ++-- application/setupwizard/SetupWizard.cpp | 2 +- application/widgets/ProgressWidget.cpp | 17 ----------------- 6 files changed, 21 insertions(+), 40 deletions(-) (limited to 'application') diff --git a/application/dialogs/VersionSelectDialog.cpp b/application/dialogs/VersionSelectDialog.cpp index 271b4a04..de525d89 100644 --- a/application/dialogs/VersionSelectDialog.cpp +++ b/application/dialogs/VersionSelectDialog.cpp @@ -78,9 +78,9 @@ VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, void VersionSelectDialog::retranslate() { // FIXME: overrides custom title given in constructor! - setWindowTitle(QApplication::translate("VersionSelectDialog", "Choose Version", Q_NULLPTR)); - m_refreshButton->setToolTip(QApplication::translate("VersionSelectDialog", "Reloads the version list.", Q_NULLPTR)); - m_refreshButton->setText(QApplication::translate("VersionSelectDialog", "&Refresh", Q_NULLPTR)); + setWindowTitle(tr("Choose Version")); + m_refreshButton->setToolTip(tr("Reloads the version list.")); + m_refreshButton->setText(tr("&Refresh")); } void VersionSelectDialog::setEmptyString(QString emptyString) diff --git a/application/setupwizard/AnalyticsWizardPage.cpp b/application/setupwizard/AnalyticsWizardPage.cpp index ce0f5280..ee834db9 100644 --- a/application/setupwizard/AnalyticsWizardPage.cpp +++ b/application/setupwizard/AnalyticsWizardPage.cpp @@ -62,10 +62,9 @@ bool AnalyticsWizardPage::isRequired() void AnalyticsWizardPage::retranslate() { - setTitle(QApplication::translate("AnalyticsWizardPage", "Analytics", Q_NULLPTR)); - setSubTitle(QApplication::translate("AnalyticsWizardPage", "We track some anonymous statistics about users.", Q_NULLPTR)); - textBrowser->setHtml(QApplication::translate( - "AnalyticsWizardPage", + setTitle(tr("Analytics")); + setSubTitle(tr("We track some anonymous statistics about users.")); + textBrowser->setHtml(tr( "" "

MultiMC sends anonymous usage statistics on every start of the application. This helps us decide what platforms and issues to focus on.

" "

The data is processed by Google Analytics, see their article on the " @@ -78,7 +77,6 @@ void AnalyticsWizardPage::retranslate() "

  • CPU architecture (kernel architecture on linux).
  • " "
  • Size of system memory.
  • " "
  • Java version, architecture and memory settings.
  • " - "

    If we change the tracked information, you will see this page again.

    ", - Q_NULLPTR)); - checkBox->setText(QApplication::translate("AnalyticsWizardPage", "Enable Analytics", Q_NULLPTR)); + "

    If we change the tracked information, you will see this page again.

    ")); + checkBox->setText(tr("Enable Analytics")); } diff --git a/application/setupwizard/JavaWizardPage.cpp b/application/setupwizard/JavaWizardPage.cpp index f2b5dd92..d0357504 100644 --- a/application/setupwizard/JavaWizardPage.cpp +++ b/application/setupwizard/JavaWizardPage.cpp @@ -440,14 +440,14 @@ void JavaWizardPage::checkFinished(JavaCheckResult result) void JavaWizardPage::retranslate() { - setTitle(QApplication::translate("JavaWizardPage", "Java", Q_NULLPTR)); - setSubTitle(QApplication::translate("JavaWizardPage", "You do not have a working Java set up yet or it went missing.\n" - "Please select one of the following or browse for a java executable.", Q_NULLPTR)); - m_memoryGroupBox->setTitle(QApplication::translate("JavaPage", "Memory", Q_NULLPTR)); - m_maxMemSpinBox->setToolTip(QApplication::translate("JavaPage", "The maximum amount of memory Minecraft is allowed to use.", Q_NULLPTR)); - m_labelMinMem->setText(QApplication::translate("JavaPage", "Minimum memory allocation:", Q_NULLPTR)); - m_labelMaxMem->setText(QApplication::translate("JavaPage", "Maximum memory allocation:", Q_NULLPTR)); - m_minMemSpinBox->setToolTip(QApplication::translate("JavaPage", "The amount of memory Minecraft is started with.", Q_NULLPTR)); - m_permGenSpinBox->setToolTip(QApplication::translate("JavaPage", "The amount of memory available to store loaded Java classes.", Q_NULLPTR)); - m_javaBrowseBtn->setText(QApplication::translate("JavaPage", "Browse", Q_NULLPTR)); + setTitle(tr("Java")); + setSubTitle(tr("You do not have a working Java set up yet or it went missing.\n" + "Please select one of the following or browse for a java executable.")); + m_memoryGroupBox->setTitle(tr("Memory")); + m_maxMemSpinBox->setToolTip(tr("The maximum amount of memory Minecraft is allowed to use.")); + m_labelMinMem->setText(tr("Minimum memory allocation:")); + m_labelMaxMem->setText(tr("Maximum memory allocation:")); + m_minMemSpinBox->setToolTip(tr("The amount of memory Minecraft is started with.")); + m_permGenSpinBox->setToolTip(tr("The amount of memory available to store loaded Java classes.")); + m_javaBrowseBtn->setText(tr("Browse")); } diff --git a/application/setupwizard/LanguageWizardPage.cpp b/application/setupwizard/LanguageWizardPage.cpp index cf427a0d..0613938d 100644 --- a/application/setupwizard/LanguageWizardPage.cpp +++ b/application/setupwizard/LanguageWizardPage.cpp @@ -57,8 +57,8 @@ bool LanguageWizardPage::isRequired() void LanguageWizardPage::retranslate() { - setTitle(QApplication::translate("LanguageWizardPage", "Language", Q_NULLPTR)); - setSubTitle(QApplication::translate("LanguageWizardPage", "Select the language to use in MultiMC", Q_NULLPTR)); + setTitle(tr("Language")); + setSubTitle(tr("Select the language to use in MultiMC")); } void LanguageWizardPage::languageRowChanged(const QModelIndex ¤t, const QModelIndex &previous) diff --git a/application/setupwizard/SetupWizard.cpp b/application/setupwizard/SetupWizard.cpp index fc5b2555..6b97612a 100644 --- a/application/setupwizard/SetupWizard.cpp +++ b/application/setupwizard/SetupWizard.cpp @@ -50,7 +50,7 @@ void SetupWizard::retranslate() setButtonText(QWizard::BackButton, tr("< &Back")); setButtonText(QWizard::FinishButton, tr("&Finish")); setButtonText(QWizard::CustomButton1, tr("&Refresh")); - setWindowTitle(QApplication::translate("SetupWizard", "MultiMC Quick Setup", Q_NULLPTR)); + setWindowTitle(tr("SetupWizard", "MultiMC Quick Setup", Q_NULLPTR)); } BaseWizardPage * SetupWizard::getBasePage(int id) diff --git a/application/widgets/ProgressWidget.cpp b/application/widgets/ProgressWidget.cpp index 8b670916..bd5967a3 100644 --- a/application/widgets/ProgressWidget.cpp +++ b/application/widgets/ProgressWidget.cpp @@ -1,23 +1,6 @@ // Licensed under the Apache-2.0 license. See README.md for details. #include "ProgressWidget.h" - /* - textBrowser->setHtml(QApplication::translate("JavaWizardPage", - "" - "

    MultiMC sends anonymous usage statistics on every start of the application. This helps us decide what platforms and issues to focus on.

    " - "

    The data is processed by Google Analytics, see their article on the matter.

    " - "

    The following data is collected:

    " - "" - "

    The analytics will activate on next start, unless you disable them in the settings.

    " - "

    If we change the tracked information, analytics won't be active for the first run and you will see this page again.

    ", Q_NULLPTR)); - checkBox->setText(QApplication::translate("JavaWizardPage", "Enable Analytics", Q_NULLPTR)); - */ #include #include #include -- cgit v1.2.3