Update translations

master
wh201906 2 years ago
parent 2b5c94974d
commit 2704b7cfc2
No known key found for this signature in database

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -1,4 +1,3 @@
[Languages] [Languages]
en_US=English en_US=English
zh_CN=简体中文 zh_CN=简体中文
(ext)=Load from external file

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -51,8 +51,8 @@ FORMS += \
ui/mf_attack_hardnesteddialog.ui ui/mf_attack_hardnesteddialog.ui
TRANSLATIONS += \ TRANSLATIONS += \
i18n/zh_CN.ts \ ../i18n/zh_CN.ts \
i18n/en_US.ts ../i18n/en_US.ts
# Default rules for deployment. # Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin

@ -119,15 +119,16 @@ bool Util::chooseLanguage(QSettings* guiSettings, QMainWindow* window)
QStringList langList = langSettings->allKeys(); QStringList langList = langSettings->allKeys();
for(int i = 0; i < langList.size(); i++) for(int i = 0; i < langList.size(); i++)
langMap.insert(langSettings->value(langList[i]).toString(), langList[i]); langMap.insert(langSettings->value(langList[i]).toString(), langList[i]);
langMap.insert(tr("Load from external file"), "(ext)");
langSettings->endGroup(); langSettings->endGroup();
delete langSettings; delete langSettings;
bool isOk = false; bool isOk = false;
QString selectedText = QInputDialog::getItem(window, "", "Choose a language:", langMap.keys(), 0, false, &isOk); QString selectedText = QInputDialog::getItem(window, "", tr("Choose a language:"), langMap.keys(), 0, false, &isOk);
if(!isOk) if(!isOk)
return false; return false;
if(langMap[selectedText] == "(ext)") if(langMap[selectedText] == "(ext)")
{ {
QString extPath = QFileDialog::getOpenFileName(nullptr, "Select the translation file:"); QString extPath = QFileDialog::getOpenFileName(nullptr, tr("Select the translation file:"));
if(extPath.isEmpty()) if(extPath.isEmpty())
return false; return false;

Loading…
Cancel
Save