equal
deleted
inserted
replaced
126 locale = QLocale::system().name(); |
126 locale = QLocale::system().name(); |
127 |
127 |
128 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"); |
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 // If not found, try with lanague-only code |
|
132 if (desc.isEmpty()) |
|
133 { |
|
134 QString localeSimple = locale.remove(QRegExp("_.*$")); |
|
135 desc = descSettings.value(localeSimple, QString()).toString().replace("|", "\n").replace("\\,", ","); |
|
136 } |
131 } |
137 } |
132 |
138 |
133 // detect if map is dlc |
139 // detect if map is dlc |
134 QString mapDir = PHYSFS_getRealDir(QString("Maps/%1/map.cfg").arg(map).toLocal8Bit().data()); |
140 QString mapDir = PHYSFS_getRealDir(QString("Maps/%1/map.cfg").arg(map).toLocal8Bit().data()); |
135 dlc = !mapDir.startsWith(datadir->absolutePath()); |
141 dlc = !mapDir.startsWith(datadir->absolutePath()); |