{% extends "packages/package_base.html" %} {% block title %} {{ _("Translation") }} {% endblock %} {% block content %} {% set translations = package.translations.all() %} {% set num = translations | length + 1 %} {{ _("Help") }}
{{ _("To provide translations for your package, you need to create .tr files and upload a new release.") }} {{ _("For information on how to do this, see the modding book chapter and lua_api.md") }}
{{ _("Translation - Minetest Modding Book") }} {{ _("Translating content meta - lua_api.md") }}
{% else %}{{ _("%(title)s is available in %(num)d languages.", title=package.title, num=num) }} {{ _("ContentDB reads translations from locale files (.tr) in your package.") }}
mods/mymod/locale/template.txt
{% else %}
locale/template.txt
{% endif %}
{% endset %}
{{ _("To quickly add support for ContentDB package translation, create a file at %(location)s with the following content:", location=translation_template_path) }}
# textdomain: {{ package.name }}
{{ 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 %}