nicolasbrailo / PianOli

Android baby game
GNU General Public License v3.0
59 stars 18 forks source link

Setting up weblate #79

Closed pserwylo closed 1 year ago

pserwylo commented 1 year ago

While setting up Weblate for this project (https://hosted.weblate.org/projects/pianoli/), noticed a couple of things needing tidying:

This also updates the README to link to Weblate for translations.

juleskers commented 1 year ago

Looks good! I particularly like how easy Weblate makes it on the project, and how you got rid of the HTML-tags (that bothered me already when doing Dutch+German).

Approved from me, and I'll gladly merge this, but want to give @nicolasbrailo a chance to speak too (especially before doing my first merge in this repo).

I'm a bit surprised that the CI job didn't trigger here.. I suppose that is because it comes from your personal repo? (Where I see the job did run; I wonder why it's not linked here...) That's probably something we should figure out too.. Running the tests when someone contributes from a fork is somewhat the entire point of that job :frowning:

nicolasbrailo commented 1 year ago

@pserwylo sent a few translations to see what happens, I guess someone needs to approve them in weblate and then we'll get a PR here? That's amazing, thanks for setting this up!

pserwylo commented 1 year ago

Depends how we want it to work. We can do PRs, but I prefer automatically pushing to master from weblate.

Two things required for more automation:

Right now, without either, we see the following in Weblate:

Screenshot_20231018_195543_org mozilla fennec_fdroid

Note the outgoing and incoming commits. Webhooks automate incoming (from GitHub to Weblate) commits. Adding bot permissions automate the outgoing (from Weblate to GitHub) commits.

nicolasbrailo commented 1 year ago

Just added the webhook + access for weblate bot - let's see if it works!

pserwylo commented 1 year ago

Thanks. Will go and iron out the kinks then report back here.

A bit out of sync, causing conflicts. Will fix manually then ask Weblate to update again.

pserwylo commented 1 year ago

Manually fixed weblate repo conflicts with #81, which seemed to put things in order. I've accepted your suggestions (typically people don't make "suggestions" as much as they actually make the change to the translation directly - though suggestions are a perfectly valid way to do this). Accepting those has done the following:

Set the repo in weblate to have "3 pending changes". This means three string changes have been made, and at some point in the coming minutes/hours it will commit those to the local repo in Weblate. Once that is done, it will have "1 outgoing commit". At that point, it may or may not push directly to master. I think it may wait more minutes/hours before doing that, so it has the opportunity to push multiple commits at once if desired.

Lets wait and see, it should all be ready to go. Will comment back here when I see things happen on the Weblate end.

pserwylo commented 1 year ago

All seems to be in order. We are indeed receiving commits from Weblate automatically. I'll just randomly cut new releases when/if new translations come in. The more releases, the more often we appear at the top of the F-Droid list, and the more people come to translate. It is a wonderful cycle of community translations :)

For those interested, I chased it up, and the current settings (which I'll leave as is) are that after 24 hours of inactivity, Weblate will push commits to here. There are other times it pushes instantly, such as when a translation is marked as complete, or when a new translation is added.

juleskers commented 1 year ago

Thanks Peter!

By the way, the JulesKers that translated on Weblate is also me (since you asked for our accounts there)