Skip to content

Commit

Permalink
Translations: Add specific help for games
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Jul 18, 2024
1 parent 9c2ecd1 commit e603f29
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/templates/packages/translation.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,32 @@ <h2 class="mt-0 mb-4">{{ self.title() }}</h2>
{% endif %}

{% if not has_content_translations %}
{% set translation_template_path %}
{% if package.type == package.type.GAME %}
<code>mods/mymod/locale/template.txt</code>
{% else %}
<code>locale/template.txt</code>
{% endif %}
{% endset %}
<h3 id="template">{{ _("Translation template") }}</h3>
<p>
{{ _("To quickly add support for ContentDB package translation, create a file at %(location)s with the following content:",
location="<code>locale/template.txt</code>"|safe) }}
location=translation_template_path) }}
</p>

<pre><code># textdomain: {{ package.name }}

{{ package.title | replace("@", "@@") | replace("=", "@=") }} =
{{ package.short_desc | replace("@", "@@") | replace("=", "@=") }} =
</code></pre>

{% if package.type == package.type.GAME %}
<p>{{ _("With games, you also need to name the textdomain in game.conf:") }}</p>

<pre><code>textdomain = mymod</code></pre>

<p>{{ _("Replace mymod with the name of mod / textdomain you chose.") }}</p>
{% endif %}
{% endif %}
</div>
{% endblock %}

0 comments on commit e603f29

Please sign in to comment.