From e603f29b47d0a92f04ae8efca12225ca0d52b121 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 18 Jul 2024 08:01:46 +0100 Subject: [PATCH] Translations: Add specific help for games --- app/templates/packages/translation.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/templates/packages/translation.html b/app/templates/packages/translation.html index 92876df4..478a954b 100644 --- a/app/templates/packages/translation.html +++ b/app/templates/packages/translation.html @@ -79,10 +79,17 @@ {% endif %} {% if not has_content_translations %} + {% set translation_template_path %} + {% if package.type == package.type.GAME %} + mods/mymod/locale/template.txt + {% else %} + locale/template.txt + {% endif %} + {% endset %}

{{ _("Translation template") }}

{{ _("To quickly add support for ContentDB package translation, create a file at %(location)s with the following content:", - location="locale/template.txt"|safe) }} + location=translation_template_path) }}

# textdomain: {{ package.name }}
@@ -90,6 +97,14 @@
 {{ package.title | replace("@", "@@") | replace("=", "@=") }} =
 {{ package.short_desc | replace("@", "@@") | replace("=", "@=") }} =
 
+ + {% if package.type == package.type.GAME %} +

{{ _("With games, you also need to name the textdomain in game.conf:") }}

+ +
textdomain = mymod
+ +

{{ _("Replace mymod with the name of mod / textdomain you chose.") }}

+ {% endif %} {% endif %} {% endblock %}