|
|
| (12 intermediate revisions by one other user not shown) |
| Line 1: |
Line 1: |
| = Best practices =
| | #REDIRECT [[Language_portal]] |
| [[Submit_your_add-on_or_skin_for_translation]] | |
| | |
| Only change the content of en_gb source language file.
| |
| Never change anything in other language files, as Weblate will handle syncing and maintaing all strings for all languages.
| |
| | |
| If you have an open Weblate pull request, always merge that pull request before any other.
| |
| Failing to do so could result in merge conflicts at Weblate.
| |
| Also merge any open Weblate pull request before changing or adding translations to en_gb source file.
| |
| | |
| = 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.
| |
| It will add this metadata from addon.xml to each language file to allow translation at Weblate.
| |
| Whenever changes are done to either addon.xml or any language file, the workflow will run and sync changes both ways.
| |
| Either a pull request or direct commit can be created.
| |
| | |
| An '''''amt-sync''''' branch is created by the workflow where changes are pushed to before a pull request is created.
| |
| Once the pull request is merged the branch can be safely deleted.
| |
| 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.
| |
| It can be configured to create a changelog entry as well.
| |
| Either a pull request or direct commit can be created.
| |
| | |
| An '''''inc-ver''''' branch is created by the workflow where changes are pushed to before a pull request is created.
| |
| Once the pull request is merged the branch can be safely deleted.
| |
| 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.
| |
| 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 one single one.
| |
| 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.
| |
| But it can also wrap lines at 77 characters and at newlines or do no line wrapping.
| |