diff --git a/share/translations/screentranslator_ru.ts b/share/translations/screentranslator_ru.ts index 392d570..1f41fc0 100644 --- a/share/translations/screentranslator_ru.ts +++ b/share/translations/screentranslator_ru.ts @@ -712,17 +712,34 @@ in %1 Не восстанавливать интерфейс пользователя (размер и положения окна и т.д.) - - <p>Optical character recognition (OCR) and translation tool</p> - <p>Version: %1</p> - <p>Changelog: <a href="%2">%2</a></p> - <p>Author: Gres (<a href="mailto:%3">%3</a>)</p> - <p>Issues: <a href="%4">%4</a></p> - <p>Инструмент оптического распознавания текста (OCR) и перевода</p> - <p>Версия: %1</p> - <p>Список изменений: <a href="%2">%2</a></p> - <p>Автор: Gres (<a href="mailto:%3">%3</a>)</p> - <p>Поддержка: <a href="%4">%4</a></p> + + <p>Optical character recognition (OCR) and translation tool</p> + <p>Инструмент оптического распознавания текста (OCR) и перевода</p> + + + + <p>Version: %1</p> + <p>Версия: %1</p> + + + + <p>Changelog: <a href="%1">%2</a></p> + <p>Список изменений: <a href="%1">%2</a></p> + + + + <p>License: <a href="%3">MIT</a></p> + <p>Лицензия: <a href="%3">MIT</a></p> + + + + <p>Author: Gres (<a href="mailto:%1">%1</a>)</p> + <p>Автор: Gres (<a href="mailto:%1">%1</a>)</p> + + + + <p>Issues: <a href="%1">%1</a></p> + <p>Поддержка: <a href="%1">%1</a></p> @@ -1122,7 +1139,7 @@ in %1 Текст для проверки - + The program workflow consists of the following steps: 1. Selection on the screen area 2. Recognition of the selected area @@ -1145,7 +1162,7 @@ Then set default recognition and translation languages, enable some (or all) tra Далее установите языки распознавания и перевода по умолчанию, активируйте некоторые (или все) переводчики и настройку "переводить текст", если нужно. - + Portable changed. Apply settings first Portable режиме изменени. Сначала применить настройки diff --git a/src/settingseditor.cpp b/src/settingseditor.cpp index 81729bb..6ad13e3 100644 --- a/src/settingseditor.cpp +++ b/src/settingseditor.cpp @@ -110,36 +110,45 @@ SettingsEditor::SettingsEditor(Manager &manager, update::Loader &updater) const auto issues = baseUrl + "/issues"; QLocale locale; const auto changelog = - baseUrl + "/share/Changelog_" + + baseUrl + "/blob/master/share/Changelog_" + (locale.language() == QLocale::Russian ? "ru" : "en") + ".md"; - const auto aboutText = + const auto license = baseUrl + "/blob/master/LICENSE.md"; + const auto aboutLines = QStringList{ QObject::tr( - R"(

Optical character recognition (OCR) and translation tool

-

Version: %1

-

Changelog: %2

-

Author: Gres (%3)

-

Issues: %4

)") - .arg(QApplication::applicationVersion(), changelog, mail, issues); + R"(

Optical character recognition (OCR) and translation tool

)"), + QObject::tr(R"(

Version: %1

)") + .arg(QApplication::applicationVersion()), + QObject::tr(R"(

Changelog: %2

)") + .arg(changelog, QUrl(changelog).fileName()), + QObject::tr(R"(

License: MIT

)").arg(license), + QObject::tr(R"(

Author: Gres (%1)

)") + .arg(mail), + QObject::tr(R"(

Issues: %1

)").arg(issues), + }; - ui->aboutLabel->setText(aboutText); + ui->aboutLabel->setText(aboutLines.join('\n')); ui->aboutLabel->setTextFormat(Qt::RichText); ui->aboutLabel->setOpenExternalLinks(true); - ui->helpLabel->setText(tr( - "The program workflow consists of the following steps:\n" - "1. Selection on the screen area\n" - "2. Recognition of the selected area\n" - "3. Correction of the recognized text (optional)\n" - "4. Translation of the corrected text (optional)\n" - "User interaction is only required for step 1.\n" - "Steps 2, 3 and 4 require additional data that can be downloaded from " - "the updates page.\n" - "\n" - "At first start, go to the updates page and install desired " - "recognition languages and translators and, optionally, hunspell " - "dictionaries.\n" - "Then set default recognition and translation languages, enable some " - "(or all) translators and the \"translate text\" setting, if needed.")); + ui->helpLabel->setText( + tr("The program workflow consists of the following steps:\n" + "1. Selection on the screen area\n" + "2. Recognition of the selected area\n" + "3. Correction of the recognized text (optional)\n" + "4. Translation of the corrected text (optional)\n" + "User interaction is only required for step 1.\n" + "Steps 2, 3 and 4 require additional data that can be " + "downloaded from " + "the updates page.\n" + "\n" + "At first start, go to the updates page and install desired " + "recognition languages and translators and, optionally, " + "hunspell " + "dictionaries.\n" + "Then set default recognition and translation languages, " + "enable some " + "(or all) translators and the \"translate text\" setting, " + "if needed.")); } new service::WidgetState(this);