widelands / wl_addons_server

Provides the add-ons server and all add-ons for the Widelands game.

Home Page:https://www.widelands.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set up string extraction & Transifex integration

gunchleoc opened this issue · comments

I'm experimenting with Transifex's GitHub integration now. I've set up integration for the 14 add-ons currently present on the server. TX automatically pushes PO files to the transifex branch now and gets its POT files from there as well. A GitHub action nightly merges any changes from the transifex branch into master, runs the buildcats.sh script, pushes the result to the repo and finally merges master into transifex. A sync can also be triggered manually from the Actions tab.

The downside of this approach is that every new add-on will need to be configured on Transifex manually by an admin as TX's regular expressions don't seem to work with our file structure. To add an add-on, go to https://www.transifex.com/widelands/widelands-addons/settings/integrations/ → ··· → Edit Settings → Select Files and add an entry for the new resource. The resources should also be renamed manually. Please add new add-ons only after they've been verified.
Also, TX will only send 100% complete translations to GitHub! Syncs with lower thresholds can be initiated manually though.
When we have a real add-ons server one day we must switch to a CLI script like for the main game repo.

I've suspended Transifex's integration feature and am now writing a script to let the GitHub action handle the TX integration instead. This approach is more scalable and maintainer-friendly and has the advantage that partially complete translations will be pulled as well.
Edit: Done and functional :)