1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-03 23:19:22 +02:00

Restored Simplified Chinese support

This commit is contained in:
Ivan Savenko
2023-03-06 18:39:32 +02:00
parent 144ddba97d
commit 499496f9d0
4 changed files with 11 additions and 9 deletions

View File

@@ -25,8 +25,9 @@ void CGeneralTextHandler::detectInstallParameters()
{
using LanguageFootprint = std::array<double, 16>;
static const std::array<LanguageFootprint, 6> knownFootprints =
static const std::array<LanguageFootprint, 7> knownFootprints =
{ {
{ { 0.1602, 0.0000, 0.0357, 0.0054, 0.0038, 0.0017, 0.0077, 0.0214, 0.0000, 0.0000, 0.1264, 0.1947, 0.2012, 0.1406, 0.0480, 0.0532 } },
{ { 0.0559, 0.0000, 0.1983, 0.0051, 0.0222, 0.0183, 0.4596, 0.2405, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000 } },
{ { 0.0493, 0.0000, 0.1926, 0.0047, 0.0230, 0.0121, 0.4133, 0.2780, 0.0002, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0259, 0.0008 } },
{ { 0.0534, 0.0000, 0.1705, 0.0047, 0.0418, 0.0208, 0.4775, 0.2191, 0.0001, 0.0000, 0.0000, 0.0000, 0.0000, 0.0005, 0.0036, 0.0080 } },
@@ -35,8 +36,9 @@ void CGeneralTextHandler::detectInstallParameters()
{ { 0.0559, 0.0000, 0.1807, 0.0059, 0.0036, 0.0013, 0.0046, 0.0134, 0.0000, 0.0004, 0.0000, 0.0487, 0.0209, 0.0060, 0.4615, 0.1972 } },
} };
static const std::array<std::string, 6> knownLanguages =
static const std::array<std::string, 7> knownLanguages =
{ {
"chinese",
"english",
"french",
"german",
@@ -610,9 +612,6 @@ std::string CGeneralTextHandler::getInstalledLanguage()
std::string CGeneralTextHandler::getInstalledEncoding()
{
auto explicitSetting = settings["general"]["encoding"].String();
if (explicitSetting != "auto")
return explicitSetting;
return settings["session"]["encoding"].String();
}