Support translation of mod labels and description.

Differential Revision: https://code.wildfiregames.com/D1083
Reviewed By: Vladislav
This was SVN commit r20614.
This commit is contained in:
elexis 2017-12-08 20:51:36 +00:00
parent 3b3f0eb2d6
commit 8684e06ce0
2 changed files with 14 additions and 0 deletions

View file

@ -58,6 +58,8 @@ function loadMods()
else
warn("Skipping mod '" + mod + "' which does not define '" + property + "'.");
translateObjectKeys(g_Mods, ["label", "description"]);
deepfreeze(g_Mods);
g_ModsEnabled = Engine.ConfigDB_GetValue("user", "mod.enabledmods").split(/\s+/).filter(folder => !!g_Mods[folder]);

View file

@ -293,6 +293,18 @@
}
}
},
{
"extractor": "json",
"filemasks": [
"mod.json"
],
"options": {
"keywords": [
"label",
"description"
]
}
},
{
"extractor": "json",
"filemasks": [