mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Added option to skip validation of mods
This commit is contained in:
parent
db9a296d02
commit
58cfea02f1
@ -8,6 +8,7 @@
|
||||
"author" : "VCMI-Team",
|
||||
"modType" : "Grafik",
|
||||
|
||||
"skipValidation" : true,
|
||||
"translations" : [
|
||||
"config/vcmi/german.json"
|
||||
]
|
||||
@ -19,6 +20,7 @@
|
||||
"author" : "Zespół VCMI",
|
||||
"modType" : "Graficzny",
|
||||
|
||||
"skipValidation" : true,
|
||||
"translations" : [
|
||||
"config/vcmi/polish.json"
|
||||
]
|
||||
@ -30,6 +32,7 @@
|
||||
"author" : "Команда VCMI",
|
||||
"modType" : "Графический",
|
||||
|
||||
"skipValidation" : true,
|
||||
"translations" : [
|
||||
"config/vcmi/russian.json"
|
||||
]
|
||||
|
@ -26,6 +26,10 @@
|
||||
"type":"string",
|
||||
"description": "Author of the mod. Can be nickname, real name or name of team"
|
||||
},
|
||||
"skipValidation" : {
|
||||
"type":"boolean",
|
||||
"description": "If set to true, vcmi will skip validation of current translation json files"
|
||||
},
|
||||
"translations":{
|
||||
"type":"array",
|
||||
"description": "List of files with translations for this language",
|
||||
|
@ -1156,6 +1156,9 @@ bool CModHandler::validateTranslations(TModID modName) const
|
||||
if (mod.config[language.identifier].isNull())
|
||||
continue;
|
||||
|
||||
if (mod.config[language.identifier]["skipValidation"].Bool())
|
||||
continue;
|
||||
|
||||
auto fileList = mod.config[language.identifier]["translations"].convertTo<std::vector<std::string> >();
|
||||
JsonNode json = JsonUtils::assembleFromFiles(fileList);
|
||||
result |= VLC->generaltexth->validateTranslation(language.identifier, modName, json);
|
||||
|
Loading…
Reference in New Issue
Block a user