Translation Projects in Weblate
Information for project owners if they assess or intend to use the Fedora Project’s online translation platform (based on the Weblate software project) for translating their project. How to access the platform or request creation of a translation project, why the Fedora Localization Team believes it is worthwhile to offer it to a wider range of projects than solely those of the Fedora Project itself, and handful gathered practical advice for administering the translation project.
Fedora’s online translation platform
The Fedora Project runs a web-based online translation platform powered by Weblate software. This Fedora Weblate instance is available at https://translate.fedoraproject.org/ and is used by Fedora translators for translating Fedora subprojects, be it a software development project, a website or the documentation.
Not only Fedora subprojects are hosted though. Examples of free and open source projects which can be found on Fedora Weblate translation platform and comes rather outside of Fedora: |
Considerations to upstream projects
Any free and open source software project is welcome to use this platform. Not only is it in line with the Fedora Project’s vision of a world where everyone benefits from free and open source software built by inclusive, welcoming, and open-minded communities, but also we considered there is more motivation behind this approach, such as:
-
To provide a support to any project sharing the same values as the Fedora Project
-
To improve upstream i18n support
-
A potential source of growth in the Fedora Community itself
As the Fedora l10n Team, we believe we are enough "mature and consistent with our values to be ready to welcome projects which have different technical choices from those the Fedora implements" (Jean-Baptiste Holcroft, a member of the Fedora L10N Team, 2020).
Request a new translation project on Fedora Weblate
In spite of the effort to be open and inclusive as much as possible, some associated concerns has led us to enforce it is not possible to create a translation project in the platform by everyone:
-
A translation of an (open source) project has to be ensured - not what an individual has decided to translate.
-
A project does not have to learn the weblate internals
-
Configuring Weblate is not so obvious - preferable is to do the first configuration for a project by us to reduce e.g. the migration costs.
Project: |
debbuild |
|
Website: |
||
Repository: |
||
Name of the development branch: |
||
Filemask: |
po/* |
|
Username: |
ngompa |
|
Optional: |
||
Any announcement/warning you would like to display to the translators? (it will be displayed in Weblate): |
||
A need to activate any specific checks? (this is a setting per component): |
||
A need to automatically detect new translation files? (typical usecase: website translation with one translation file per page): |
The specified username(s) will be set in the initial configuration of the project in Weblate as the project’s administrator(s), subsequently notified about the project creation.
Request made by upstream projects will be reviewed on an individual basis upon submission of the ticket. Priority will be given to projects that create software packaged for Fedora.
Project configuration good practice
Once the requested translation project is created for you in Weblate, you can continue with setting its other options. There are several approaches to creating a project’s components, for example. Weblate provides different means to recieve and send changes between Weblate and your repository, so it is hard task to cover all possibilies here or prepare a common guide. But what we have learned from helping to set various projects:
Do not forget to set, if appropriate, a webhook in the project options in order to automatically receive changes from your VCS, such as
https://translate.fedoraproject.org/hooks/pagure //for Pagure https://translate.fedoraproject.org/hooks/gitlab //for GitLab https://translate.fedoraproject.org/hooks/github //for GitHub
Weblate is able to push translations to your repository by setting 'Repository push URL' option of a component configuration. For GitHub there is Weblate user which should be given a commit access to the repository. The same applies for GitLab. For Pagure there is weblatebot user.
Weblate provides a wide range of quality checks on strings.
A placeholders
flag can be set to add a quality check on texts from source string that must not be missing in the translation.
If missing, a warning will pop up to the translator.
Besides being extracted from the translation file, placeholders can be added manually by project administrators on a per-component or per-string basis, but not project-wide.
To set placeholders for a component:
-
Go to the component page (e.g. dnf5 translation component of the DNF5 project)
-
Use the menu
-
On the Settings page, go to Translation tab
-
Scroll until you see Translation flags field
-
Write the
placeholders
flag expression in thereFor example:
placeholders:{}:{0}:{1}:{2}
Such placeholders might be good for whole component as these terms might come up very often, like in a translation string Failed to cleanup repository cache in path "{0}": {1}.
To set a placeholders for a specific string (which will override its component’s placeholders):
-
When editing a string, go to the right-side sidebar and find Flags item
-
Click on the pencil icon to edit the flags
-
In the Translation flags field, write the
placeholders
flag expression in thereFor example:
placeholders:--alldeps:--resolve
These command-line options might be very good per-string placeholders if there isn’t much of their occurence in the given component, like in a translation string Option "--alldeps" should be used with "--resolve".
Further reference from Weblate software documentation:
Want to help? Learn how to contribute to Fedora Docs ›