Add note about visible translation window instead of silently showing and hiding it
Toggling visibility looks terrible on Windows
This commit is contained in:
parent
962234418b
commit
0b0b0cb09c
@ -648,7 +648,7 @@ Check for updates to silence this warning</source>
|
||||
<translation>Начата запись в лог-файл: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.cpp" line="100"/>
|
||||
<location filename="../../src/settingseditor.cpp" line="104"/>
|
||||
<source><p>Optical character recognition (OCR) and translation tool</p>
|
||||
<p>Version: %1</p>
|
||||
<p>Author: Gres (<a href="mailto:%2">%2</a>)</p>
|
||||
@ -847,17 +847,17 @@ in %1</source>
|
||||
<translation>Путь к словарям Hunspell:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="395"/>
|
||||
<location filename="../../src/settingseditor.ui" line="388"/>
|
||||
<source>Language:</source>
|
||||
<translation>Язык:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="378"/>
|
||||
<location filename="../../src/settingseditor.ui" line="421"/>
|
||||
<source> secs</source>
|
||||
<translation> сек</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="361"/>
|
||||
<location filename="../../src/settingseditor.ui" line="364"/>
|
||||
<source>Ignore SSL errors</source>
|
||||
<translation>Игнорировать ошибки SSL</translation>
|
||||
</message>
|
||||
@ -907,87 +907,87 @@ in %1</source>
|
||||
<translation>Путь к переводчикам:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="368"/>
|
||||
<location filename="../../src/settingseditor.ui" line="354"/>
|
||||
<source>Translators</source>
|
||||
<translation>Переводчики</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="476"/>
|
||||
<location filename="../../src/settingseditor.ui" line="486"/>
|
||||
<source>Result window</source>
|
||||
<translation>Окно результата</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="482"/>
|
||||
<location filename="../../src/settingseditor.ui" line="492"/>
|
||||
<source>Font:</source>
|
||||
<translation>Шрифт:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="492"/>
|
||||
<location filename="../../src/settingseditor.ui" line="502"/>
|
||||
<source>Font size:</source>
|
||||
<translation>Размер шрифта:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="509"/>
|
||||
<location filename="../../src/settingseditor.ui" line="519"/>
|
||||
<source>Font color:</source>
|
||||
<translation>Цвет шрифта:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="526"/>
|
||||
<location filename="../../src/settingseditor.ui" line="536"/>
|
||||
<source>Background:</source>
|
||||
<translation>Фон:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="543"/>
|
||||
<location filename="../../src/settingseditor.ui" line="553"/>
|
||||
<source>Show image</source>
|
||||
<translation>Показывать изображение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="550"/>
|
||||
<location filename="../../src/settingseditor.ui" line="560"/>
|
||||
<source>Show recognized</source>
|
||||
<translation>Показывать распознанное</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="619"/>
|
||||
<location filename="../../src/settingseditor.ui" line="629"/>
|
||||
<source>Update check interval (days):</source>
|
||||
<translation>Интервал проверки обновления (дней):</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="626"/>
|
||||
<location filename="../../src/settingseditor.ui" line="636"/>
|
||||
<source>0 - disabled</source>
|
||||
<translation>- отключено</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="659"/>
|
||||
<location filename="../../src/settingseditor.ui" line="669"/>
|
||||
<source>Apply updates</source>
|
||||
<translation>Применить изменения</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="354"/>
|
||||
<location filename="../../src/settingseditor.ui" line="374"/>
|
||||
<source>Translate text</source>
|
||||
<translation>Переводить текст</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="388"/>
|
||||
<location filename="../../src/settingseditor.ui" line="381"/>
|
||||
<source>Single translator timeout:</source>
|
||||
<translation>Переходить к следующему переводчику после:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="438"/>
|
||||
<location filename="../../src/settingseditor.ui" line="448"/>
|
||||
<source>Result type</source>
|
||||
<translation>Тип результата</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="450"/>
|
||||
<location filename="../../src/settingseditor.ui" line="460"/>
|
||||
<source>Tray</source>
|
||||
<translation>Трей</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="463"/>
|
||||
<location filename="../../src/settingseditor.ui" line="473"/>
|
||||
<source>Window</source>
|
||||
<translation>Окно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.ui" line="642"/>
|
||||
<location filename="../../src/settingseditor.ui" line="652"/>
|
||||
<source>Check now</source>
|
||||
<translation>Проверить сейчас</translation>
|
||||
</message>
|
||||
@ -1047,12 +1047,17 @@ in %1</source>
|
||||
<translation>HTTP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.cpp" line="70"/>
|
||||
<location filename="../../src/settingseditor.cpp" line="66"/>
|
||||
<source><b>NOTE! Some translators might require the translation window to be visible. You can make it using the "Show translator" entry in the tray icon's context menu</b></source>
|
||||
<translation><b>ПРИМЕЧАНИЕ! Для работы некоторых переводчиков может потребоваться активное окно перевода. Его можно отобразить при помощи пункта "Показать окно перевода" контекстного меню иконки в трее</b></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.cpp" line="74"/>
|
||||
<source>Sample text</source>
|
||||
<translation>Текст для проверки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/settingseditor.cpp" line="321"/>
|
||||
<location filename="../../src/settingseditor.cpp" line="325"/>
|
||||
<source>Portable changed. Apply settings first</source>
|
||||
<translation>Portable режиме изменени. Сначала применить настройки</translation>
|
||||
</message>
|
||||
@ -1107,7 +1112,7 @@ in %1</source>
|
||||
(%2)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/translate/translator.cpp" line="275"/>
|
||||
<location filename="../../src/translate/translator.cpp" line="268"/>
|
||||
<source>All translators failed
|
||||
%1</source>
|
||||
<translation>Не удалось перевести текст
|
||||
|
@ -62,6 +62,10 @@ SettingsEditor::SettingsEditor(Manager &manager, update::Loader &updater)
|
||||
ui->userSubstitutionsTable, &QTableWidget::setEnabled);
|
||||
|
||||
// translation
|
||||
ui->translatorHint->setText(
|
||||
tr("<b>NOTE! Some translators might require the translation window to be "
|
||||
"visible. You can make it using the \"Show translator\" entry "
|
||||
"in the tray icon's context menu</b>"));
|
||||
ui->translateLangCombo->setModel(models_.targetLanguageModel());
|
||||
|
||||
// representation
|
||||
|
@ -348,10 +348,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="doTranslationCheck">
|
||||
<item row="6" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Translate text</string>
|
||||
<string>Translators</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -362,26 +365,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Translators</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="translateTimeoutSpin">
|
||||
<property name="suffix">
|
||||
<string> secs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="translateLangCombo"/>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="doTranslationCheck">
|
||||
<property name="text">
|
||||
<string>Translate text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
@ -399,7 +392,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="3">
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QLabel" name="translatorsPath">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="3">
|
||||
<widget class="QListWidget" name="translatorList">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
@ -412,13 +415,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QLabel" name="translatorsPath">
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="translateTimeoutSpin">
|
||||
<property name="suffix">
|
||||
<string> secs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="3">
|
||||
<widget class="QLabel" name="translatorHint">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -239,10 +239,6 @@ void Translator::processQueue()
|
||||
std::unordered_set<QString> idlePages;
|
||||
std::unordered_set<Task *> busyTasks;
|
||||
|
||||
const auto visible = isVisible();
|
||||
if (!visible)
|
||||
showNormal();
|
||||
|
||||
auto oldPage = view_->page();
|
||||
for (auto &i : pages_) {
|
||||
if (!i.second->checkBusy()) {
|
||||
@ -257,9 +253,6 @@ void Translator::processQueue()
|
||||
if (oldPage != view_->page())
|
||||
view_->setPage(oldPage);
|
||||
|
||||
if (!visible)
|
||||
hide();
|
||||
|
||||
if (idlePages.empty())
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user