[x] Our translation files being .txt throws many gettext editors off (e.g. poedit). This seems to be a relic from the Wrye Mash days, when the translation format was still custom and not gettext (see here). There should be nothing stopping us from renaming them to the standard .po files that they are. -> 9a87ddadd1cd9435fb0bfee7300df83d64703ed0
[x] Hunt down "Bash" in translatable strings and replace it with "Wrye Bash". Reads better and makes it clear to translators/Weblate that we're talking about the untranslatable term Wrye Bash.
[x] Investigate using PO templates instead of our bespoke dump_translator, similar to how the LOOT team does it
[x] Maybe make a translators group and/or channel on Discord and/or GitHub so we can ping people easily
[x] There was a suggestion to use something like Crowdin to make contributing easier, investigate that - https://weblate.org is free for FOSS projects and used by e.g. LibreOffice, Fedora, etc. - on it nearly done :)
[x] Figure out pushing and pulling
[x] Turn dump_translator into a script, auto-run it nightly or so on the weblate-in branch (making Mopy/bash/_i18n/pygettext.py compile-time-only)
[x] Fix the source locations in the translations - they should be Mopy/bash/*, not bash/* (otherwise it breaks the repo browser on weblate)
[x] Make the build script compile the translations, then only ship the .mo files (making Mopy/bash/_i18n/msgfmt.py compile-time-only)
[ ] Write a script for merging weblate-out changes - this is more involved than you'd think! Would be truly annoying, but we should be able to automate it fully:
Needs wlc installed and API keys set on the maintainer's machine
First, wlc lock so translators can't lose their work
git fetch to get the latest changes
Check out the weblate-out branch and git reset --hard to grab the changes
wlc commit and wlc push to send out all pending changed to weblate-out
git fetch to get the changes, keep trying that until we get new commits (since with our config, weblate will always rewrite commits and force-push them, this gives us a clear indicator of when weblate has pushed)
Once again, git reset --hard to grab the changes
Weblate always credits itself as commit author and gives the actual translators co-author credit, so we need to fix the commit author to give real credit
Use PyGithub to get each translator's avatar, update the general readme to credit translators
Give the maintainer a chance to clean up the branch now (maybe some auto-cleanup here, especially squashing all the automatic template.pot commits)
Once the maintainer signals they're ready to go, run the template updating script to finish off the branch
no-ff-merge the branch to dev, let the maintainer edit the merge commit message
Once done, switch over to weblate-in, git reset --hard dev
Force-push weblate-in first (before pushing dev, this is important! Otherwise the CI will run on the dev push and try to rebase all the old template.pot updates, which will conflict if they got squashed during the merge (which they probably were))
Push dev
wlc reset to make Weblate completely discard its state and grab a fresh copy from our repo (this is safe because we locked the repo and pulled all pending changes, so there's nothing lost here)
wlc unlock and done!
[ ] Consider having @wryebot run the aforementioned script on a monthly (more frequent?) basis
[x] Change from crediting GitHub Actions for the update.pot commits to crediting our beloved @wryebot! ❤️
[ ] Get libre hosting approval from weblate - I've sent the request, they responded that they can't currently handle the request and have extended our trial period until the end of February.
There's still no update here, but our trial has been continuously extending. Still has two months left as of March 22nd :thinking:
.txt
throws many gettext editors off (e.g. poedit). This seems to be a relic from the Wrye Mash days, when the translation format was still custom and not gettext (see here). There should be nothing stopping us from renaming them to the standard.po
files that they are. -> 9a87ddadd1cd9435fb0bfee7300df83d64703ed0dump_translator
, similar to how the LOOT team does iton itnearly done :)weblate-in
branch (makingMopy/bash/_i18n/pygettext.py
compile-time-only)Mopy/bash/*
, notbash/*
(otherwise it breaks the repo browser on weblate).mo
files (makingMopy/bash/_i18n/msgfmt.py
compile-time-only)weblate-out
changes - this is more involved than you'd think! Would be truly annoying, but we should be able to automate it fully:wlc
installed and API keys set on the maintainer's machinewlc lock
so translators can't lose their workgit fetch
to get the latest changesweblate-out
branch andgit reset --hard
to grab the changeswlc commit
andwlc push
to send out all pending changed toweblate-out
git fetch
to get the changes, keep trying that until we get new commits (since with our config, weblate will always rewrite commits and force-push them, this gives us a clear indicator of when weblate has pushed)git reset --hard
to grab the changesweblate-in
,git reset --hard dev
weblate-in
first (before pushing dev, this is important! Otherwise the CI will run on the dev push and try to rebase all the old template.pot updates, which will conflict if they got squashed during the merge (which they probably were))wlc reset
to make Weblate completely discard its state and grab a fresh copy from our repo (this is safe because we locked the repo and pulled all pending changes, so there's nothing lost here)wlc unlock
and done!Blockers:
Under #500