# HG changeset patch # User smxx # Date 1267559458 0 # Node ID 865ae941d59eede04690f7715a481252498ffd04 # Parent 76d43f7458ade1dafdb458f0cc9a427fbc4a58dd 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 diff -r 76d43f7458ad -r 865ae941d59e QTfrontend/gameuiconfig.cpp --- 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; diff -r 76d43f7458ad -r 865ae941d59e QTfrontend/main.cpp --- 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); } diff -r 76d43f7458ad -r 865ae941d59e QTfrontend/pages.cpp --- 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")); diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/de.txt --- 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 diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/en.txt --- 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 diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_bg.ts --- 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 @@ Level Ниво + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_cs.ts --- 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 @@ Level Úrověň + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_de.qm Binary file share/hedgewars/Data/Locale/hedgewars_de.qm has changed diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_de.ts --- 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 @@ Level Stufe + + (System default) + (Systemstandard) + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_en.ts --- 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 @@ Level Level + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_es.ts --- 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 @@ Level Nivel + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_fi.ts --- 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 @@ Level Taso + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_fr.ts --- 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 @@ Level Niveau + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_it.ts --- 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 @@ Level Livello + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_ja.ts --- 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 @@ Level レベル + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_pl.ts --- 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 @@ Level Poziom + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_pt_BR.ts --- 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 @@ Level + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- 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 @@ Level Nível + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_ru.ts --- 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 @@ Level Уровень + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_sk.ts --- 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 @@ Level Úroveň + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_sv.ts --- 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 @@ Level Bana + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_tr_TR.ts --- 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 @@ Level Bilgisayar + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_uk.ts --- 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 @@ Level Рівень + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_zh_CN.ts --- 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 @@ Level Lv 级别 + + (System default) + + QGroupBox diff -r 76d43f7458ad -r 865ae941d59e share/hedgewars/Data/Locale/hedgewars_zh_TW.ts --- 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 @@ Level Lv 級別 + + (System default) + + QGroupBox