118 |
118 |
119 // load description (if applicable) |
119 // load description (if applicable) |
120 if (isMission) |
120 if (isMission) |
121 { |
121 { |
122 // get locale |
122 // get locale |
123 DataManager & dataMgr = DataManager::instance(); |
123 QSettings settings(datamgr.settingsFileName(), QSettings::IniFormat); |
124 QSettings settings(dataMgr.settingsFileName(), QSettings::IniFormat); |
|
125 QString locale = settings.value("misc/locale", "").toString(); |
124 QString locale = settings.value("misc/locale", "").toString(); |
126 if (locale.isEmpty()) |
125 if (locale.isEmpty()) |
127 locale = QLocale::system().name(); |
126 locale = QLocale::system().name(); |
128 |
127 |
129 QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat); |
128 QSettings descSettings(QString("physfs://Maps/%1/desc.txt").arg(map), QSettings::IniFormat); |
|
129 descSettings.setIniCodec("UTF-8"); |
130 desc = descSettings.value(locale, QString()).toString().replace("|", "\n").replace("\\,", ","); |
130 desc = descSettings.value(locale, QString()).toString().replace("|", "\n").replace("\\,", ","); |
131 } |
131 } |
132 |
132 |
133 // detect if map is dlc |
133 // detect if map is dlc |
134 QString mapDir = PHYSFS_getRealDir(QString("Maps/%1/map.cfg").arg(map).toLocal8Bit().data()); |
134 QString mapDir = PHYSFS_getRealDir(QString("Maps/%1/map.cfg").arg(map).toLocal8Bit().data()); |