Translations: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
(43 intermediate revisions by 2 users not shown)
Line 3: Line 3:
{{see also|Add-on development}}
{{see also|Add-on development}}


== History ==
= History =
In the development cycle from Eden (V11) to Frodo (V12) the translation system has been revised.  
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.
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.


== Transifex ==
= Weblate =
The whole translation system has been moved to [https://www.transifex.com/ Transifex].
The whole translation system has been moved to [https://kodi.weblate.cloud/ Weblate].<br/><br/>
So if you want to help translating Kodi into your native language, first thing you need to do is to sign up at Transifex.
So if you want to help translating Kodi into your native language, first thing you need to do is to [https://kodi.weblate.cloud/accounts/register/ sign up at Weblate].<br/> 
Please visit [https://forum.kodi.tv/showthread.php?tid=363132 this forum post] to let us know which language you would like to translate.<br/> 
Once added to a langage team, you can start translating immediately.
<br/><br/>
== Profile ==
In the top right, you can find your profile settings:
<br/><br/>
[[File:Weblate_profile_settings.png|300px|Weblate profile settings]]
<br/><br/>
In the '''Language tab''' you can select the interface language, the language you can translate to and your secondary languages:
<br/><br/>
[[File:Weblate language settings new.png|900px|Weblate language settings]]
<br/><br/>
In the '''Notifications tab''' you can select your watched projects.<br/>
Those projects can be selected in the top Projects menu.<br/>
''We recommend selecting all projects to have easy access to all components.''
<br/><br/>
[[File:Weblate watched.png|900px|Weblate watched projects settings]] 




Next Step would be to check the current project for XBMC. Currently it is this one:
Now you are ready to translate components:
 
<br/><br/>
[https://www.transifex.com/projects/p/xbmc-addons/ Add-on Translation Project]
[[File:Weblate.png|900px|Weblate main screen]]
[https://www.transifex.com/projects/p/kodi-main/ Main Translation Project]
<br/> 
[https://www.transifex.com/projects/p/xbmc-skins/ Skin Translation Project]
<br/>
 
 
On that page you should see the available languages that can be translated:
 
 
[[File:Lang overview.png|900px]]
 
 
Check your native language and request to join the translation team. In this example I choose Greek:
 
 
[[File:Join.png|900px]]
 
The appropriate coordinator of your language will approve or deny your request.
 
By approval you can start translating immediately.
 
Currently this project is for core Kodi only! So no third party addons or stuff like that!
 
This will follow later on. So stay tuned in the [http://forum.kodi.tv/forumdisplay.php?fid=90 appropriate forums section for translations]
 
== Translating Kodi ==
''Note: Please do not download files, modify them and upload again! Always use the "Translate Now" Button!''


== Translating Kodi and other components ==
''Note: Please do not download files, modify them and upload again! Always translate components and strings inside Weblate!''
<br/><br/>
Ok, let's get to work!
Ok, let's get to work!
<br/><br/>
Search that part of the project that needs updating.<br/>
You can see the percentage of the translations, untranslated strings / words / characters:
<br/><br/>
[[File:Weblate components.png|900px|Components at Weblate]]
<br/><br/>
You might note that there is some untranslated strings in "Kodi core/kodi main".<br/>
So we click either on the pencil to the left or on the language label to translate it:
<br/><br/>
[[File:Weblate component hl close.png|700px|Translate buttons highlighted]]
<br/><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/>
Keeping alerts might break the file and ultimately lead to Kodi crashing.<br/>
Alerts can be cleared when selecting the string with the alert.<br/><br/>
[[File:Weblate translate1.png|900px|Translate window inside Weblate]]
<br/><br/>
If you want to translate the component, '''"Not translated strings"''' is where to go.<br/>
<br/>
Clicking any item in the previous image will take you here:
<br/><br/>
[[File:Weblate translate.png|900px]]
<br/><br/>
* <span style="color:#00e235">'''SOURCE STRING COMMENT:'''</span> The developers can create useful comments for the string, e.g. what it exactly does or where it can be found in the GUI.
* <span style="color:red">'''GLOSSARY:'''</span> View the glossary entries matching your current string. You can also add new glossary entries.
* <span style="color:#de00ff">'''NBS:'''</span> "No-break space" is a character used if you can't translate the source string into your native language. It's useful for languages that don't have certain words. It will not take up any character space and will not use the source string.
* <span style="color:#00b4ff">'''REVIEW STATE:'''</span> Reviewers/coordinators can approve strings or mark them for editing.
* <span style="color:orange">'''AUTOMATIC SUGGESTIONS:'''</span> Matching strings and translations from other components will be listed here. This is great for keeping consistency. We recommend keeping this tab open when translating.
<br/>
[[File:Weblate translate colors.png|1000px|Colors explaining Weblate translate window]]
<br/><br/>
'''Other languages tab''' is great for looking at the current string translated into other languages. Works well for closely related languages.
<br/><br/>
[[File:Weblate other languages.png|900px|Other languages tab at Weblate]]
<br/><br/>
'''Comments tab''': Here you can make comments on the current string for other translators, reviewers and developers to read.<br/>
You can also make source string comments or suggestions for changes to the string.
<br/><br/>
[[File:Weblate comments2.png|900px|Comments for strings]]
<br/><br/>


Search that part of the project that needs updating. You can see the percentage of the translations to the right:
= Useful hints =
 
[[File:Select ressource.png|900px]]
 
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!
 
[[File:Translate now.png|900px]]
 
Check the missing strings on the right side. After you completed them hit the "Save and Exit" button down on the left.
 
[[File:Translating string.png|900px]]
 
== Useful hints ==
This part shows some additional information for developers and translators to make things more easy. So it's worth taking a look.
This part shows some additional information for developers and translators to make things more easy. So it's worth taking a look.




=== Details & Comments ===
== 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.
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.
<br/><br/>
 
[[File:Weblate comments.png|900px|Comments in a string]]
[[File:Details.png|900px]]




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


=== Group Discussion ===
= Submit your add-on or skin for translation =
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.
We encourage all developers with addons in the official Kodi add-on repo to submit their addon for translation at Weblate.<br/>
 
<br/>
[[File:Discussion.png|900px]]
Handling of translations for your add-on will become much more simple, as most things are automated.<br/>
Weblate will get updated instantly whenever you add or remove a translation from your source en_gb file.<br/>
Translations can be synced to your upstream repository whenever you wish (default is 5 days) either by pull request or direct push.<br/>
All languages at Weblate will be kept in sync with the en_gb source file.<br/>
<br/>
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.<br/>
<br/>
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?
<br/>
For your main source en_gb file to get synced with Weblate, you must add this webhook to your repository for the push event:
<syntaxhighlight lang="xml">https://kodi.weblate.cloud/hooks/github</syntaxhighlight>
[[File:Webhook.png|600px|webhook for Weblate]]


''NOTE: This board is not for off-topic discussions! Everything besides translations should be disucussed on the forums!''
If direct pushes are wanted, you need to add Github user [https://github.com/weblate "weblate"] as collaborator.<br/>
This user will automatically accept any collaboration within 5 minutes.<br/>
If pull requests are the preferred method, Weblate will push to the same pull request until merged or closed.
<br/><br/>
[https://forum.kodi.tv/showthread.php?tid=359836 Please visit this forum post for more information.]


== Addons/Skins ==
= Contact and support =
The process is the same for third-party addons/skins, except they are hosted at a different Transifex link.
If you have problems with Weblate your first person to contact should be the coordinator of your language!
For current links please visit [http://forum.kodi.tv/showthread.php?tid=141158 this] thread.


== Contact ==
If you have more general questions you might [https://forum.kodi.tv/forumdisplay.php?fid=90 head over to the forums and post your question in the translations section].<br/>
If you have problems with Transifex your first person to contact should be the coordinator of your language!
Gade and others can help you there.


If you have more general questions you might head over to the forums and post your question in the translation are there.
= Sync time schedule =
Alanwww1 and others can help you there.
Changes to the main source en_gb file are synced instantly from Github to Weblate.<br/>
Translations are pushed from Weblate to Github every 5 days (default, but can be configured) if any translations are made.<br/>
<br/>
For Kodi language add-ons, new versions are released every time a Weblate pull request is merged.


== Sync time schedule ==
= Syntax verification =
We plan to make regular sync procedures from XBMC-master to Transifex weekly and from Transifex to XBMC-master monthly at the last week of the month.
For keeping the strings correctly formatted, we do a constant syntax verification at all times.<br/>
For addons we do more frequent updates, with 2-3 syncs a week.
Changes are either done at Weblate or by pull request to the upstream repository.


== Syntax verification ==
For keeping the strings correctly formatted, we do a constant syntax verification at each sync occasions. The results are in sync syntax-check logs. Please check these links regularly if you find any problems for your language. The following logs are available:
* The kodi-main [https://github.com/xbmc/translations/blob/master/kodi-translations/kodi-main/txupdate-syntax.log syntax-check log]
* The xbmc-addons: [https://github.com/xbmc/translations/blob/master/translations/addons/txupdate-syntax.log syntax-check log]
* The xbmc-skins: [https://github.com/xbmc/translations/blob/master/translations/xbmc-skins/txupdate-syntax.log syntax-check log]


For more info on syntax checking, please check out [http://forum.kodi.tv/showthread.php?tid=152720 this] thread!
{{updated|19}}
{{top}}


[[Category:Development|T]]
[[Category:Development|T]]
[[Category:Languages]]
[[Category:Languages]]

Revision as of 10:22, 16 July 2021

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.

Profile

In the top right, you can find your profile settings:

Weblate profile settings

In the Language tab you can select the interface language, the language you can translate to and your secondary languages:

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

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:

Components at Weblate

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:

Translate buttons highlighted

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.

Translate window inside Weblate

If you want to translate the component, "Not translated strings" is where to go.

Clicking any item in the previous image will take you here:

Weblate translate.png

  • SOURCE STRING COMMENT: The developers can create useful comments for the string, e.g. what it exactly does or where it can be found in the GUI.
  • GLOSSARY: View the glossary entries matching your current string. You can also add new glossary entries.
  • NBS: "No-break space" is a character used if you can't translate the source string into your native language. It's useful for languages that don't have certain words. It will not take up any character space and will not use the source string.
  • REVIEW STATE: Reviewers/coordinators can approve strings or mark them for editing.
  • AUTOMATIC SUGGESTIONS: Matching strings and translations from other components will be listed here. This is great for keeping consistency. We recommend keeping this tab open when translating.


Colors explaining Weblate translate window

Other languages tab is great for looking at the current string translated into other languages. Works well for closely related languages.

Other languages tab at Weblate

Comments tab: Here you can make comments on the current string for other translators, reviewers and developers to read.
You can also make source string comments or suggestions for changes to the string.

Comments for strings

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.

Comments in a string


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.

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.

Please visit this forum post for more information.

Contact and support

If you have problems with Weblate 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.


Return to top