Index: binaries/data/mods/mod/descriptions/README.txt =================================================================== --- /dev/null +++ binaries/data/mods/mod/descriptions/README.txt @@ -0,0 +1,2 @@ +Folder for optional descriptions of (popular) mods +Copying .json file will add "name" and "description" strings to the transifex interface. Index: binaries/data/mods/mod/descriptions/public.json =================================================================== --- /dev/null +++ binaries/data/mods/mod/descriptions/public.json @@ -0,0 +1,8 @@ +{ + "name": "0ad", + "version": "0.0.25", + "label": "0 A.D. Empires Ascendant", + "url": "https://play0ad.com", + "description": "A free, open-source, historical RTS game.", + "dependencies": [] +} Index: binaries/data/mods/mod/gui/modmod/modmod.js =================================================================== --- binaries/data/mods/mod/gui/modmod/modmod.js +++ binaries/data/mods/mod/gui/modmod/modmod.js @@ -194,7 +194,7 @@ listObject.list_name = folders.map(folder => colorMod(folder, getMod(folder).name || "", enabled)); listObject.list_folder = folders.map(folder => colorMod(folder, folder, enabled)); - listObject.list_label = folders.map(folder => colorMod(folder, getMod(folder).label || "", enabled)); + listObject.list_label = folders.map(folder => colorMod(folder, getMod(folder).label ? translateWithContext("mod description", getMod(folder).label) : "", enabled)); listObject.list_url = folders.map(folder => colorMod(folder, getMod(folder).url || "", enabled)); listObject.list_version = folders.map(folder => colorMod(folder, getMod(folder).version || "", enabled)); listObject.list_dependencies = folders.map(folder => colorMod(folder, getMod(folder)?.dependencies.join(" ") || "", enabled)); @@ -454,7 +454,7 @@ Engine.GetGUIObjectByName("globalModDescription").caption = listObject.list[listObject.selected] ? - getMod(listObject.list[listObject.selected]).description : + translateWithContext("mod description", getMod(listObject.list[listObject.selected]).description) : '[color="' + g_ColorNoModSelected + '"]' + translate("No mod has been selected.") + '[/color]'; if (!g_ModsEnabled.length) Index: binaries/data/mods/mod/l10n/messages.json =================================================================== --- binaries/data/mods/mod/l10n/messages.json +++ binaries/data/mods/mod/l10n/messages.json @@ -49,5 +49,26 @@ } } ] + }, + { + "output": "mod-descriptions.pot", + "inputRoot": "..", + "project": "Pyrogenesis - Mod Descriptions", + "copyrightHolder": "Wildfire Games", + "rules": [ + { + "extractor": "json", + "filemasks": [ + "descriptions/**.json" + ], + "options": { + "keywords": [ + "description", + "label" + ], + "context": "mod description" + } + } + ] } ]