mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Re-add handling of i18n for Oracle (since it was manual before) (#4541)
Removes en@source from options menu intentionally
This commit is contained in:
parent
5cf93ad61c
commit
1b7e8f3a16
5 changed files with 223 additions and 220 deletions
|
|
@ -54,6 +54,9 @@
|
|||
|
||||
OracleWizard::OracleWizard(QWidget *parent) : QWizard(parent)
|
||||
{
|
||||
// define a dummy context that will be used where needed
|
||||
QString dummy = QT_TRANSLATE_NOOP("i18n", "English");
|
||||
|
||||
settings = new QSettings(SettingsCache::instance().getSettingsPath() + "global.ini", QSettings::IniFormat, this);
|
||||
connect(&SettingsCache::instance(), SIGNAL(langChanged()), this, SLOT(updateLanguage()));
|
||||
|
||||
|
|
@ -168,19 +171,15 @@ QStringList IntroPage::findQmFiles()
|
|||
QDir dir(translationPath);
|
||||
QStringList fileNames = dir.entryList(QStringList(translationPrefix + "_*.qm"), QDir::Files, QDir::Name);
|
||||
fileNames.replaceInStrings(QRegExp(translationPrefix + "_(.*)\\.qm"), "\\1");
|
||||
fileNames.removeOne("en@source");
|
||||
return fileNames;
|
||||
}
|
||||
|
||||
QString IntroPage::languageName(const QString &qmFile)
|
||||
{
|
||||
if (qmFile == DEFAULT_LANG_CODE) {
|
||||
return DEFAULT_LANG_NAME;
|
||||
}
|
||||
|
||||
QTranslator translator;
|
||||
translator.load(translationPrefix + "_" + qmFile + ".qm", translationPath);
|
||||
|
||||
return translator.translate("i18n", DEFAULT_LANG_NAME);
|
||||
QTranslator qTranslator;
|
||||
qTranslator.load(translationPrefix + "_" + qmFile + ".qm", translationPath);
|
||||
return qTranslator.translate("i18n", DEFAULT_LANG_NAME);
|
||||
}
|
||||
|
||||
void IntroPage::languageBoxChanged(int index)
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@
|
|||
<context>
|
||||
<name>IntroPage</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="193"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="192"/>
|
||||
<source>Introduction</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="194"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="193"/>
|
||||
<source>This wizard will import the list of sets, cards, and tokens that will be used by Cockatrice.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="196"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="195"/>
|
||||
<source>Interface language:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="197"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="196"/>
|
||||
<source>Version:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
@ -27,127 +27,127 @@
|
|||
<context>
|
||||
<name>LoadSetsPage</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="252"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="251"/>
|
||||
<source>Source selection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="253"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="252"/>
|
||||
<source>Please specify a compatible source for the list of sets and cards. You can specify a URL address that will be downloaded or use an existing file from your computer.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="257"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="256"/>
|
||||
<source>Download URL:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="258"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="257"/>
|
||||
<source>Local file:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="259"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="258"/>
|
||||
<source>Restore default URL</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="260"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="259"/>
|
||||
<source>Choose file...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="270"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="269"/>
|
||||
<source>Load sets file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="280"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="279"/>
|
||||
<source>Sets JSON file (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="310"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="329"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="334"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="403"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="527"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="548"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="309"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="328"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="333"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="402"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="526"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="547"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="310"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="309"/>
|
||||
<source>The provided URL is not valid.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="314"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="313"/>
|
||||
<source>Downloading (0MB)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="329"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="328"/>
|
||||
<source>Please choose a file.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="334"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="333"/>
|
||||
<source>Cannot open file '%1'.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="394"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="393"/>
|
||||
<source>Downloading (%1MB)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="403"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="402"/>
|
||||
<source>Network error: %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="441"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="440"/>
|
||||
<source>Parsing file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="455"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="454"/>
|
||||
<source>Xz extraction failed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="463"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="462"/>
|
||||
<source>Sorry, this version of Oracle does not support xz compressed files.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="482"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="481"/>
|
||||
<source>Failed to open Zip archive: %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="487"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="486"/>
|
||||
<source>Zip extraction failed: the Zip archive doesn't contain exactly one file.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="495"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="494"/>
|
||||
<source>Zip extraction failed: %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="504"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="503"/>
|
||||
<source>Sorry, this version of Oracle does not support zipped files.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="527"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="526"/>
|
||||
<source>Do you want to download the uncompressed file instead?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="549"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="548"/>
|
||||
<source>The file was retrieved successfully, but it does not contain any sets data.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
@ -155,42 +155,42 @@
|
|||
<context>
|
||||
<name>LoadSpoilersPage</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="700"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="699"/>
|
||||
<source>Save spoiler database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="705"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="704"/>
|
||||
<source>XML; spoiler database (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="710"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="709"/>
|
||||
<source>Spoilers import</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="711"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="710"/>
|
||||
<source>Please specify a compatible source for spoiler data.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="713"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="712"/>
|
||||
<source>Download URL:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="714"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="713"/>
|
||||
<source>Restore default URL</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="715"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="714"/>
|
||||
<source>The spoiler database will be saved at the following location:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="717"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="716"/>
|
||||
<source>Save to a custom path (not recommended)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
@ -198,42 +198,42 @@
|
|||
<context>
|
||||
<name>LoadTokensPage</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="663"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="662"/>
|
||||
<source>Save token database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="668"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="667"/>
|
||||
<source>XML; token database (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="673"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="672"/>
|
||||
<source>Tokens import</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="674"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="673"/>
|
||||
<source>Please specify a compatible source for token data.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="676"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="675"/>
|
||||
<source>Download URL:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="677"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="676"/>
|
||||
<source>Restore default URL</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="678"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="677"/>
|
||||
<source>The token database will be saved at the following location:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="680"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="679"/>
|
||||
<source>Save to a custom path (not recommended)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
<context>
|
||||
<name>OracleWizard</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="95"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="98"/>
|
||||
<source>Oracle Importer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
@ -257,22 +257,22 @@
|
|||
<context>
|
||||
<name>OutroPage</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="202"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="201"/>
|
||||
<source>Finished</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="203"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="202"/>
|
||||
<source>The wizard has finished.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="204"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="203"/>
|
||||
<source>You can now start using Cockatrice with the newly updated cards.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="205"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="204"/>
|
||||
<source>If the card databases don't reload automatically, restart the Cockatrice client.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
@ -280,68 +280,68 @@
|
|||
<context>
|
||||
<name>SaveSetsPage</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="586"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="639"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="585"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="638"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="586"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="585"/>
|
||||
<source>No set has been imported.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="592"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="591"/>
|
||||
<source>Sets imported</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="593"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="592"/>
|
||||
<source>The following sets have been found:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="595"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="594"/>
|
||||
<source>Press "Save" to store the imported cards in the Cockatrice database.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="596"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="595"/>
|
||||
<source>The card database will be saved at the following location:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="598"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="597"/>
|
||||
<source>Save to a custom path (not recommended)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="600"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="599"/>
|
||||
<source>&Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="606"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="605"/>
|
||||
<source>Import finished: %1 cards.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="609"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="608"/>
|
||||
<source>%1: %2 cards imported</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="618"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="617"/>
|
||||
<source>Save card database</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="619"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="618"/>
|
||||
<source>XML; card database (*.xml)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="639"/>
|
||||
<location filename="../src/oraclewizard.cpp" line="638"/>
|
||||
<source>The file could not be saved to %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
@ -381,6 +381,14 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>i18n</name>
|
||||
<message>
|
||||
<location filename="../src/oraclewizard.cpp" line="58"/>
|
||||
<source>English</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue