Translations: Difference between revisions
Line 52: | Line 52: | ||
[[File:Weblate component hl close.png|700px|Translate buttons highlighted]] | [[File:Weblate component hl close.png|700px|Translate buttons highlighted]] | ||
<br/><br/> | <br/><br/> | ||
The next screen will show you all information on the chosen language.<br/> | The next screen will show you all information on the chosen language.<br/><br/> | ||
We recommend to take care of most alerts: BBcode markup, mismatched \n, mismatching line breaks, XML markup, starting spaces, trailing spaces, double space, unchanged translations.<br/> | We recommend to take care of most alerts: BBcode markup, mismatched \n, mismatching line breaks, XML markup, starting spaces, trailing spaces, double space, unchanged translations.<br/> | ||
Keeping alerts might break the file and ultimately lead to Kodi crashing.<br/> | Keeping alerts might break the file and ultimately lead to Kodi crashing.<br/> |
Revision as of 19:06, 15 July 2021
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 the top right, you can find your profile settings:
In the Language tab you can select the interface language, the language you can translate to and your secondary languages:
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.
Now you are ready to translate components:
For support or questions, please visit the forum.
Translating Kodi and other components
Note: Please do not download files, modify them and upload again! Always translate components and strings inside Weblate!
Ok, let's get to work!
Search that part of the project that needs updating.
You can see the percentage of the translations, untranslated strings / words / characters:
You might note that there is some untranslated strings in "Kodi core/kodi main".
So we click either on the pencil to the left or on the language label to translate it:
The next screen will show you all information on the chosen language.
We recommend to take care of most alerts: BBcode markup, mismatched \n, mismatching line breaks, XML markup, starting spaces, trailing spaces, double space, unchanged translations.
Keeping alerts might break the file and ultimately lead to Kodi crashing.
Alerts can be cleared when selecting the string with the alert.
If you want to translate the component, "Not translated strings" is where to go.
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.
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.
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
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.
Please visit this forum post for more information.
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.
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.