Engine:
authorsmxx
Tue, 02 Mar 2010 19:50:58 +0000
changeset 2913 865ae941d59e
parent 2912 76d43f7458ad
child 2914 7db64c269a5b
Engine: * Small tweaks to English and German locales Frontend: * Added a new default locale choice ("system default") that uses Qt's guessing to determine the preferred language * Updated ts/qm files
QTfrontend/gameuiconfig.cpp
QTfrontend/main.cpp
QTfrontend/pages.cpp
share/hedgewars/Data/Locale/de.txt
share/hedgewars/Data/Locale/en.txt
share/hedgewars/Data/Locale/hedgewars_bg.ts
share/hedgewars/Data/Locale/hedgewars_cs.ts
share/hedgewars/Data/Locale/hedgewars_de.qm
share/hedgewars/Data/Locale/hedgewars_de.ts
share/hedgewars/Data/Locale/hedgewars_en.ts
share/hedgewars/Data/Locale/hedgewars_es.ts
share/hedgewars/Data/Locale/hedgewars_fi.ts
share/hedgewars/Data/Locale/hedgewars_fr.ts
share/hedgewars/Data/Locale/hedgewars_it.ts
share/hedgewars/Data/Locale/hedgewars_ja.ts
share/hedgewars/Data/Locale/hedgewars_pl.ts
share/hedgewars/Data/Locale/hedgewars_pt_BR.ts
share/hedgewars/Data/Locale/hedgewars_pt_PT.ts
share/hedgewars/Data/Locale/hedgewars_ru.ts
share/hedgewars/Data/Locale/hedgewars_sk.ts
share/hedgewars/Data/Locale/hedgewars_sv.ts
share/hedgewars/Data/Locale/hedgewars_tr_TR.ts
share/hedgewars/Data/Locale/hedgewars_uk.ts
share/hedgewars/Data/Locale/hedgewars_zh_CN.ts
share/hedgewars/Data/Locale/hedgewars_zh_TW.ts
--- a/QTfrontend/gameuiconfig.cpp	Tue Mar 02 19:46:35 2010 +0000
+++ b/QTfrontend/gameuiconfig.cpp	Tue Mar 02 19:50:58 2010 +0000
@@ -85,7 +85,7 @@
         Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool());
 #endif
 
-	Form->ui.pageOptions->CBLanguage->setCurrentIndex(Form->ui.pageOptions->CBLanguage->findData(value("misc/locale", QLocale::system().name())));
+	Form->ui.pageOptions->CBLanguage->setCurrentIndex(Form->ui.pageOptions->CBLanguage->findData(value("misc/locale", "").toString()));
 
 	depth = QApplication::desktop()->depth();
 	if (depth < 16) depth = 16;
--- a/QTfrontend/main.cpp	Tue Mar 02 19:46:35 2010 +0000
+++ b/QTfrontend/main.cpp	Tue Mar 02 19:50:58 2010 +0000
@@ -357,8 +357,10 @@
 	QTranslator Translator;
 	{
 		QSettings settings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
-		
-		Translator.load(datadir->absolutePath() + "/Locale/hedgewars_" + settings.value("misc/locale", QLocale::system().name()).toString());
+		QString cc = settings.value("misc/locale", "").toString();
+		if(!cc.compare(""))
+			cc = QLocale::system().name();
+		Translator.load(datadir->absolutePath() + "/Locale/hedgewars_" + cc);
 		app.installTranslator(&Translator);
 	}
 
--- a/QTfrontend/pages.cpp	Tue Mar 02 19:46:35 2010 +0000
+++ b/QTfrontend/pages.cpp	Tue Mar 02 19:50:58 2010 +0000
@@ -445,6 +445,7 @@
             tmpdir.cd("Locale");
             tmpdir.setFilter(QDir::Files);
             QStringList locs = tmpdir.entryList(QStringList("hedgewars_*.qm"));
+			CBLanguage->addItem(QComboBox::tr("(System default)"), QString(""));
             for(int i = 0; i < locs.count(); i++)
             {
                 QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1"));
--- a/share/hedgewars/Data/Locale/de.txt	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/de.txt	Tue Mar 02 19:50:58 2010 +0000
@@ -182,7 +182,7 @@
 03:19=Fortbewegungsmittel
 03:20=Aktion
 03:21=Ballistische Waffe
-03:22=Nenn' mich Indiana!
+03:22=Nenn mich Indiana!
 03:23=Kampfkunst
 03:24=Der Kuchen ist keine Lüge!
 03:25=Verkleidung
--- a/share/hedgewars/Data/Locale/en.txt	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/en.txt	Tue Mar 02 19:50:58 2010 +0000
@@ -9,7 +9,7 @@
 00:06=Skip
 00:07=Rope
 00:08=Mine
-00:09=DEagle
+00:09=Desert Eagle
 00:10=Dynamite
 00:11=Baseball Bat
 00:12=Fire Punch
@@ -379,7 +379,7 @@
 03:14=Transport Utility
 03:15=Airborne Attack
 03:16=Airborne Attack
-03:17=Digging Utility
+03:17=Digging Tool
 03:18=Utility
 03:19=Transport Utility
 03:20=Action
@@ -428,7 +428,7 @@
 04:20=Allows you to play the current turn with|a different hog.|Attack: Enable switching hogs
 04:21=Shoot a grenade-like projectile that will|release multiple bombs upon impact.|Attack: Shoot at full power
 04:22=Not just for Indiana Jones! The whip is an|useful weapon in many situations. Especially|when you'd like to shove someone off a cliff.|Attack: Strike everything in front of you
-04:23=If you have nothing to lose, this might be|quite handy. Sacrifice your hog by launching|it into a specific direction hurting everything|on his way and exploding at the end.|Attack: Launch the devastating and deadly attack
+04:23=If you have nothing to lose, this might be|quite handy. Sacrifice your hog by launching|him into a specific direction hurting everything|on his way and exploding at the end.|Attack: Launch the devastating and deadly attack
 04:24=Happy Birthday! Launch this cake, let it walk right|next to your enemies and let them have an explosive|party. The cake is able to pass almost all terrain|but he might detonate earlier this way.|Attack: Start the cake or let it stop and explode
 04:25=Use this disguise kit to get your enemies to jump|towards your hog (and into some gap or hole).|Attack: Use the kit and try to seduce another hog
 04:26=Throw this juicy watermelon at your enemies. Once|the timer expires, it will split into several|explosive pieces.|1-5: Set watermelon's timer|Attack: Hold to shoot with more power
--- a/share/hedgewars/Data/Locale/hedgewars_bg.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -680,6 +680,10 @@
         <source>Level</source>
         <translation>Ниво</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_cs.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -685,6 +685,10 @@
         <source>Level</source>
         <translation>Úrověň</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
Binary file share/hedgewars/Data/Locale/hedgewars_de.qm has changed
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -690,6 +690,10 @@
         <source>Level</source>
         <translation>Stufe</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation>(Systemstandard)</translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_en.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_en.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -683,6 +683,10 @@
         <source>Level</source>
         <translation>Level</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_es.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_es.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -689,6 +689,10 @@
         <source>Level</source>
         <translation>Nivel</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_fi.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -689,6 +689,10 @@
         <source>Level</source>
         <translation>Taso</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_fr.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -689,6 +689,10 @@
         <source>Level</source>
         <translation>Niveau</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_it.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_it.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -689,6 +689,10 @@
         <source>Level</source>
         <translation>Livello</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ja.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -675,6 +675,10 @@
         <source>Level</source>
         <translation>レベル</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pl.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -694,6 +694,10 @@
         <source>Level</source>
         <translation>Poziom</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -680,6 +680,10 @@
         <source>Level</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -689,6 +689,10 @@
         <source>Level</source>
         <translation>Nível</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_ru.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -694,6 +694,10 @@
         <source>Level</source>
         <translation>Уровень</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_sk.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -694,6 +694,10 @@
         <source>Level</source>
         <translation>Úroveň</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_sv.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -680,6 +680,10 @@
         <source>Level</source>
         <translation>Bana</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -675,6 +675,10 @@
         <source>Level</source>
         <translation>Bilgisayar</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_uk.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -694,6 +694,10 @@
         <source>Level</source>
         <translation type="unfinished">Рівень</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -684,6 +684,10 @@
         <source>Level</source>
         <translation>Lv 级别</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>
--- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts	Tue Mar 02 19:46:35 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts	Tue Mar 02 19:50:58 2010 +0000
@@ -684,6 +684,10 @@
         <source>Level</source>
         <translation>Lv 級別</translation>
     </message>
+    <message>
+        <source>(System default)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QGroupBox</name>