QTfrontend/main.cpp
branchphysfslayer
changeset 7931 5a27ed7f17b7
parent 7928 88fde28bbda6
child 7955 85b3970b402a
--- a/QTfrontend/main.cpp	Sat Nov 03 00:34:35 2012 +0400
+++ b/QTfrontend/main.cpp	Sun Nov 04 23:56:27 2012 +0400
@@ -221,8 +221,10 @@
         return 1;
     }
 
+    // setup PhysFS
     engine.mount(datadir->absolutePath());
     engine.mount(cfgdir->absolutePath() + "/Data");
+    engine.mount(cfgdir->absolutePath());
     engine.setWriteDir(cfgdir->absolutePath());
 
     DataManager & dataMgr = DataManager::instance();
@@ -235,11 +237,8 @@
             cc = QLocale::system().name();
 
         // load locale file into translator
-        Translator.load(
-            dataMgr.findFileForRead(
-                QString("physfs://Locale/hedgewars_" + cc)
-            )
-        );
+        if(!Translator.load(QString("physfs://Locale/hedgewars_%1").arg(cc)))
+            qWarning("Failed to install translation");
         app.installTranslator(&Translator);
     }