Translation flow (for Fedora websites)


Fedora websites can be viewed in many languages. This page gives some details on how this happens.

Tagging text

System needs to be told what strings needs to be translated. Generally every text inside web page should be surrounded with tags:

{% trans trimmed %}Translate this text.{% endtrans %}

Generating pot file

First we need to pull all translatable strings into a file called

This file is generated by running:

podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/

This file needs to be sent to translations repository

If you don’t have access to the translations repository push it to fedora-websites and create a pull request and once approved it should be automatically sent to translations repository with 24 hours.

Weblate process (How strings get translated)

Once file is in the translations repository it will be pulled by Weblate system and merged into translatable strings. It can then be translated by translators.

Manual testing

Any translations made here will not get propagated to the weblate of final versions of the page.

You can test the changes manually by:

1) Update strings to the language files

podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/

Now edit desired language file, for example

nano sites/

Find the string you want to test, format inside file is:

`#: partials/templates/download_card.html:13`   Location(s) of string.
`msgid "Download"`   Text in english.
`msgstr "Lataa"`     Text in desired language.

Edit the msgstr

Once edited translations need to be compiled into more efficient format for the web server. This is done by running:

podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/

You can now change your browser setting to desired language and see how the translations are working out.

Description of translation scripts inside sites/

Technically scripts can be run without using podman, but will then require proper setup in the local machine. The instructions given above are safer for generic users.