Translations

From Official Kodi Wiki
Jump to navigation Jump to search
Home icon grey.png   ▶ Development
▶ Add-on development
▶ Translations

History

In the development cycle from Eden (V11) to Frodo (V12) the translation system has been revised.

The former strings.xml file has been superseeded by the appropriate strings.po files. Due to that the way how translations are handled has been changed, too.

Weblate

The whole translation system has been moved to Weblate.
So if you want to help translating Kodi into your native language, first thing you need to do is to sign up at Weblate.
Please visit this forum post to let us know which language you would like to translate.
Once added to a langage team, you can start translating immediately.

In your user profile settings (Language tab), you can select the interface language, the language you can translate to and your secondary languages:

Weblate profile settings Weblate language settings

In the Notifications tab you can select your watched projects. Those projects can be selected in the top Projects menu. We recommend selecting all projects to have easy access to all components.

Weblate watched projects settings


Now you are ready to translate components:

Weblate main screen


For support or questions, please visit the forum.

Translating Kodi

Note: Please do not download files, modify them and upload again! Always use the "Translate Now" Button!

Ok, let's get to work!

Search that part of the project that needs updating. You can see the percentage of the translations to the right:

Select ressource.png

You might note that there is something missing in "visualisation milkdrop". So we click on it to translate it.

The red marked area is button mentioned before. Always use this one!

Translate now.png

Check the missing strings on the right side. After you completed them hit the "Save and Exit" button down on the left.

Translating string.png

Useful hints

This part shows some additional information for developers and translators to make things more easy. So it's worth taking a look.


Details & Comments

The developers can set special marks in the strings.po file to give a useful comment on that string. e.g. what it exactly does or where it can be found in the GUI. Additionaly there is a field for the occurence which shows in which file this strings is mentioned. You get these info by hovering over the buttons of the source strings.

Details.png


In the source file it looks like this:

#. play GUI sounds
#: xbmc/settings/GUISettings.cpp
msgctxt "#34122"
msgid "Always"
msgstr ""


With #. we can add a helper comment or context to help translators understand the meaning or usage of string.

with #: we can specify where the string is used. Sometimes this could also be a useful info.

Group Discussion

Another useful feature is the discussion board for the team. That way you can can speak about issues or just state some suggestions. You can get in conteact with other team members or the coordinator.

Discussion.png

NOTE: This board is not for off-topic discussions! Everything besides translations should be disucussed on the forums!

Submit your add-on or skin for translation

We encourage all developers with addons in the official Kodi add-on repo to submit their addon for translation at Weblate.

Handling of translations for your add-on will become much more simple, as most things are automated.
Weblate will get updated instantly whenever you add or remove a translation from your source en_gb file.
Translations can be synced to your upstream repository whenever you wish (default is 5 days) either by pull request or direct push.
All languages at Weblate will be kept in sync with the en_gb source file.

Summary, description and disclaimer can be automatically synced between addon.xml and language files either by pull request or direct push whenever changes are made.

We require the following info:

  • URL to your repo at Github/Gitlab
  • Branch
  • Would you like pull requests or direct pushes from Weblate? (Pull requests are safest, direct pushes are easiest.)
  • How often would you like pull requests/direct pushes? Default is 5 days, but it's totally up to you.
  • Do you want a version bump in addon.xml?


For your main source en_gb file to get synced with Weblate, you must add this webhook to your repository for the push event:

https://kodi.weblate.cloud/hooks/github

webhook for Weblate

If direct pushes are wanted, you need to add Github user "weblate" as collaborator.
This user will automatically accept any collaboration within 5 minutes.
If pull requests are the preferred method, Weblate will push to the same pull request until merged or closed.

Contact

If you have problems with Transifex your first person to contact should be the coordinator of your language!

If you have more general questions you might head over to the forums and post your question in the translations section.
Gade and others can help you there.

Sync time schedule

Changes to the main source en_gb file are synced instantly from Github to Weblate.
Translations are pushed from Weblate to Github every 5 days (default, but can be configured) if any translations are made.
<br(> For Kodi language add-ons, new versions are released every time a Weblate pull request is merged.

Syntax verification

For keeping the strings correctly formatted, we do a constant syntax verification at all times.
Changes are either done at Weblate or by pull request to the upstream repository.