-
Notifications
You must be signed in to change notification settings - Fork 8
Download Action
The Download Action automates the synchronization process from Crowdin to the GitHub repository by updating the authors and translations.
This includes the directories:
UI/data/locale/
UI/frontend-plugins/*/data/locale/
plugins/*/data/locale/
plugins/mac-virtualcam/src/obs-plugin/data/locale/
The action processes these files the following:
- Remove empty lines: Comments in the English source files get exported as a blank line, creating an unnecessary modification.
- Change all EOLs to
\n
(LF): Inconsistent EOLs in the source files on Crowdin may result differently during action execution. This normalizes this behaviour. - Escape line breaks in translations: A 'real' line break in a translation actually breaks the translation and makes it unused by OBS. If not corrected, an exported file may look like:
Key="Val ue"
- Remove translations equal to their source text: Missing translations fall back to their English variant, reducing the amount of lines and modifications.
- Remove files with no translations.
- Remove files from languages that have been removed on Crowdin.
This file will be overwritten with a list of Git contributors and Crowdin translators sorted by most commits/most submitted words. git shortlog --all -sn --no-merges
is used for the Git ranking.
Banned or REMOVED_USER
s + users with 0 submitted translations and approvals are excluded from the translators list.
Rules:
- If the language is present & its translation progress is less than 30%, remove it.
- If the language is not present & its translation progress is more than 60%, add it.
- If there is no translation for the
Language
string in the correspondingUI/data/locale/*.ini
file, remove it.
The translation files of a removed language are kept, as long as the language exists on Crowdin.
The action merges all translation files to a single translation list and appends them to the end of the file.
The action first creates a commit in every submodule and then commits all changes (including the submodules) in the main repository. The final commit only includes submodules whose HEAD is in sync with the main repository.