Fix and change escaping for mission map descriptions
authorWuzzy <almikes@aol.com>
Thu, 17 Nov 2016 03:37:48 +0100
changeset 11907 38d27c1645eb
parent 11906 291d53985dcd
child 11908 46a65decb287
Fix and change escaping for mission map descriptions
QTfrontend/model/MapModel.cpp
share/hedgewars/Data/Maps/TrophyRace/desc.txt
--- a/QTfrontend/model/MapModel.cpp	Thu Nov 17 03:36:45 2016 +0100
+++ b/QTfrontend/model/MapModel.cpp	Thu Nov 17 03:37:48 2016 +0100
@@ -127,13 +127,14 @@
 
                 QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat);
                 descSettings.setIniCodec("UTF-8");
-                desc = descSettings.value(locale, QString()).toString().replace("|", "\n").replace("\\,", ",");
+                desc = descSettings.value(locale, QString()).toString();
                 // If not found, try with lanague-only code
                 if (desc.isEmpty())
                 {
                     QString localeSimple = locale.remove(QRegExp("_.*$"));
-                    desc = descSettings.value(localeSimple, QString()).toString().replace("|", "\n").replace("\\,", ",");
+                    desc = descSettings.value(localeSimple, QString()).toString();
                 }
+                desc = desc.replace("_n", "\n").replace("_c", ",").replace("__", "_");
             }
 
             // detect if map is dlc
--- a/share/hedgewars/Data/Maps/TrophyRace/desc.txt	Thu Nov 17 03:36:45 2016 +0100
+++ b/share/hedgewars/Data/Maps/TrophyRace/desc.txt	Thu Nov 17 03:37:48 2016 +0100
@@ -1,2 +1,2 @@
 en=Use your rope to reach the finish line faster than anyone else!
-de=Benutze dein Seil\, um die Ziellinie schneller als alle anderen zu erreichen!
+de=Benutze dein Seil_c um die Ziellinie schneller als alle anderen zu erreichen!