Weblate: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Converted to redirect)
Tag: New redirect
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= Best practices =
#REDIRECT [[Language_portal]]
[[Translations#Submit_your_add-on_or_skin_for_translation|Submit your add-on or skin for translation]]
 
Only change the content of en_gb source language file.<br/>
Never change anything in other language files, as Weblate will handle syncing and maintaining of all strings for all languages.
<br/><br/>
If you have an open Weblate pull request, always merge that pull request before any other.<br/>
Failing to do so could result in merge conflicts at Weblate.<br/>
Also merge any open Weblate pull request before changing or adding translations to en_gb source file.
<br/><br/>
If doing a minor change for an existing source language (en_gb) string, Weblate will most likely treat this as a completely new string.<br/>
That means that all existing translations will get removed for that string.<br/>
So be careful before you change existing strings.
<br/><br/>
Sometimes Weblate will add commented out translations at the end of language files.<br/>
These '''should not''' be removed and are harmless.<br/>
They are kept as part of translation memory and will benefit translators in a number of ways.
 
= Workflows and scripts =
We offer several workflows to help integrate Weblate translations into your add-ons.
 
== sync-addon-metadata-translations.yml ==
This workflow will sync metadata (description, summary, disclaimer etc.) between addon.xml and the language files.<br/>
It will add this metadata from addon.xml to each language file to allow translation at Weblate.<br/>
Whenever changes are done to either addon.xml or any language file, the workflow will run and sync changes both ways.<br/>
Either a pull request or direct commit can be created.
 
An '''''amt-sync''''' branch is created by the workflow where changes are pushed before a pull request is created.<br/>
Once the pull request is merged the branch can be safely deleted.<br/>
Make sure branch protection is disabled for ''amt-sync'' branch and that force pushing is allowed.
 
''This workflow is required for proper Weblate translations.''
 
== increment_version.py ==
This workflow will bump the version number in your addon.xml file whenever changes are done to the language files.<br/>
It can be configured to create a changelog entry as well.<br/>
Either a pull request or direct commit can be created.
 
An '''''inc-ver''''' branch is created by the workflow where changes are pushed before a pull request is created.<br/>
Once the pull request is merged the branch can be safely deleted.<br/>
Make sure branch protection is disabled for ''inc-ver'' branch and that force pushing is allowed.
 
= Weblate configuration and add-ons =
The text in your Weblate pull request or direct commit can be changed exactly as you see fit.
 
We enable several add-ons for your component(s) at Weblate.<br/>
Most of them will be enabled with default configuration, but some of them can be configured to your preference.
 
==Squash Git commits==
This add-on will squash all Weblate commits into a single one.<br/>
But it can also create one commit per language or per file if wanted.
 
==Customize gettext output==
Default for this add-on is to only wrap lines at newlines.<br/>
But it can also wrap lines at 77 characters and at newlines or do no line wrapping.

Latest revision as of 23:21, 11 April 2022

Redirect to: