Updating the translations
Before making a release, it’s customary to call a “string freeze” (usually at least a week before).
After this, there must be no changes to translatable strings in the code.
(the strings look like _("text")
or _N("text")
)
This gives the translators time to catch up with the code changes.
Make the announcement to the Translation Team:
This must be done twice: just before the String Freeze; just before the Release.
Repos needed:
Tasks:
Run this script before and after the updates as a quick check to see that everything went well.
../management/translate/stats.sh
You’ll see something like:
en_GB: 1404 translated
pt_BR: 1359 translated, 13 fuzzy, 32 untranslated
lt: 1359 translated, 13 fuzzy, 32 untranslated
zh_CN: 1351 translated, 21 fuzzy, 32 untranslated
de: 1335 translated, 33 fuzzy, 36 untranslated
...
Rebase the existing translate
branch onto main
.
git rebase --interactive main
This file contains a list of all the source files that contain translatable strings. For simplicity, it’s a list of all the main source (excluding 3rd-party and auto-generated code).
Check that it’s up-to-date. This command may help:
(echo ./opcodes.h; find . -type f -name '*.c') | \
grep -v -e "test/" -e jimsh0 -e makedoc -e conststrings -e git_ver | \
sed 's/^..//' | \
LANG=C sort -f \
> po/POTFILES.in
This Makefile
target reads all the source files looking for translatable strings.
It will update the ‘po’ files with any new/deleted strings and update the source file locations in the #:
comments.
./configure
make update-po
Next, clean out any dead translations (#~
).
for i in po/*.po; do
msgattrib --no-wrap --no-obsolete "$i" | sponge "$i"
done
(sponge
can be found in the moreutils
package)
Finally, edit po/en_GB.po
to bring it up to 100%.
Fill in any missing translations, or fuzzy strings.
Note: When making a release, edit all the ‘po’ files to update the ‘Project-Id-Version:’ header to the new version string.
Creating a script to do this, or better still improving the Makefile
would be helpful.
../management/translate/stats.sh
Check the results against the earlier output. Most languages will have changed by a few numbers, as translatable strings change, or as translators do their work.
The update work is done. Now it’s time to commit the changes.
git commit --all --message "sync translations"
git checkout main
git merge --no-ff translate --message "update translations"
main
may now be pushed to GitHub.
Finally, we need to create a fresh [translate]
branch for new work to begin.
git branch --delete --force translate
../management/travis/translate-install.sh
git push --force --set-upstream origin translate
Check Travis was successful:
Check web push was successful:
Make the announcement to the Translation Team:
The ‘Translation’ section for the Release Notes is presented as a league table. List all the languages that have been updated since the previous release.
For GitHub and the Website, this list can be made prettier with national flags.
They both support :denmark:
style emojis.
Note: These languages don’t have emojos: Basque, Catalan, Esperanto, Galician
Flag | Language | Emoji | Code |
---|---|---|---|
- | Basque | - | eu |
Bulgarian | :bulgaria: |
bg | |
- | Catalan | - | ca |
Chinese (Simplified) | :cn: |
zh_CN | |
Chinese (Traditional) | :taiwan: |
zh_TW | |
Czech | :czech_republic: |
cs | |
Danish | :denmark: |
da | |
Dutch | :netherlands: |
nl | |
English (British) | :uk: |
en_GB | |
- | Esperanto | - | eo |
Estonian | :estonia: |
et | |
Finnish | :finland: |
fi | |
French | :fr: |
fr | |
- | Galician | - | gl |
German | :de: |
de | |
Greek | :greece: |
el | |
Hungarian | :hungary: |
hu | |
Indonesian | :indonesia: |
id | |
Irish | :ireland: |
ga | |
Italian | :it: |
it | |
Japanese | :jp: |
ja | |
Korean | :kr: |
ko | |
Lithuanian | :lithuania: |
lt | |
Polish | :poland: |
pl | |
Portuguese (Brazil) | :brazil: |
pt_BR | |
Russian | :ru: |
ru | |
Slovak | :slovakia: |
sk | |
Spanish | :es: |
es | |
Swedish | :sweden: |
sv | |
Turkish | :tr: |
tr | |
Ukrainian | :ukraine: |
uk |
For more info read: Deployment using Travis