Add license info

This commit is contained in:
Gres 2020-07-18 13:04:21 +03:00
parent 74e2be5b8d
commit 64869f6128
2 changed files with 63 additions and 37 deletions

View File

@ -712,17 +712,34 @@ in %1</source>
<translation>Не восстанавливать интерфейс пользователя (размер и положения окна и т.д.)</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="116"/>
<source>&lt;p&gt;Optical character recognition (OCR) and translation tool&lt;/p&gt;
&lt;p&gt;Version: %1&lt;/p&gt;
&lt;p&gt;Changelog: &lt;a href=&quot;%2&quot;&gt;%2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Author: Gres (&lt;a href=&quot;mailto:%3&quot;&gt;%3&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Issues: &lt;a href=&quot;%4&quot;&gt;%4&lt;/a&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;Инструмент оптического распознавания текста (OCR) и перевода&lt;/p&gt;
&lt;p&gt;Версия: %1&lt;/p&gt;
&lt;p&gt;Список изменений: &lt;a href=&quot;%2&quot;&gt;%2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Автор: Gres (&lt;a href=&quot;mailto:%3&quot;&gt;%3&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Поддержка: &lt;a href=&quot;%4&quot;&gt;%4&lt;/a&gt;&lt;/p&gt;</translation>
<location filename="../../src/settingseditor.cpp" line="117"/>
<source>&lt;p&gt;Optical character recognition (OCR) and translation tool&lt;/p&gt;</source>
<translation>&lt;p&gt;Инструмент оптического распознавания текста (OCR) и перевода&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="119"/>
<source>&lt;p&gt;Version: %1&lt;/p&gt;</source>
<translation>&lt;p&gt;Версия: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="121"/>
<source>&lt;p&gt;Changelog: &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;Список изменений: &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt;&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="123"/>
<source>&lt;p&gt;License: &lt;a href=&quot;%3&quot;&gt;MIT&lt;/a&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;Лицензия: &lt;a href=&quot;%3&quot;&gt;MIT&lt;/a&gt;&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="124"/>
<source>&lt;p&gt;Author: Gres (&lt;a href=&quot;mailto:%1&quot;&gt;%1&lt;/a&gt;)&lt;/p&gt;</source>
<translation>&lt;p&gt;Автор: Gres (&lt;a href=&quot;mailto:%1&quot;&gt;%1&lt;/a&gt;)&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="126"/>
<source>&lt;p&gt;Issues: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;Поддержка: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;&lt;/p&gt;</translation>
</message>
</context>
<context>
@ -1122,7 +1139,7 @@ in %1</source>
<translation>Текст для проверки</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="128"/>
<location filename="../../src/settingseditor.cpp" line="134"/>
<source>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
Далее установите языки распознавания и перевода по умолчанию, активируйте некоторые (или все) переводчики и настройку &quot;переводить текст&quot;, если нужно.</translation>
</message>
<message>
<location filename="../../src/settingseditor.cpp" line="357"/>
<location filename="../../src/settingseditor.cpp" line="366"/>
<source>Portable changed. Apply settings first</source>
<translation>Portable режиме изменени. Сначала применить настройки</translation>
</message>

View File

@ -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"(<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>)")
.arg(QApplication::applicationVersion(), changelog, mail, issues);
R"(<p>Optical character recognition (OCR) and translation tool</p>)"),
QObject::tr(R"(<p>Version: %1</p>)")
.arg(QApplication::applicationVersion()),
QObject::tr(R"(<p>Changelog: <a href="%1">%2</a></p>)")
.arg(changelog, QUrl(changelog).fileName()),
QObject::tr(R"(<p>License: <a href="%3">MIT</a></p>)").arg(license),
QObject::tr(R"(<p>Author: Gres (<a href="mailto:%1">%1</a>)</p>)")
.arg(mail),
QObject::tr(R"(<p>Issues: <a href="%1">%1</a></p>)").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);