grass
grass copied to clipboard
Translations update from OSGeo Weblate
Translations update from OSGeo Weblate for GRASS GIS/grasslibs.
It also includes following components:
Current translation status:
Can I try to use "rebase" on the GitHub PR to update the branch, and see if it makes something different than the 4+ other tries that never fixed the problem (fixes until another PR is merged and Weblate isn't up to date with main)?
Considering that weblate locked up again a couple hours after it was unlocked this morning
Can I try to use "rebase" on the GitHub PR to update the branch, and see if it makes something different than the 4+ other tries that never fixed the problem (fixes until another PR is merged and Weblate isn't up to date with main)?
Considering that weblate locked up again a couple hours after it was unlocked this morning
I just tried "Update with rebase" and got this error:
Rebasing (1/5)
Auto-merging locale/po/grassmods_fr.po
CONFLICT (content): Merge conflict in locale/po/grassmods_fr.po
error: could not apply 6609ae8991... Translated using Weblate (French)
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6609ae8991... Translated using Weblate (French)
(1)
and the problem is I cannot run those suggested commands manually on Weblate :-(. Maybe, we should try options in the "Danger zone".
I can't help you with anything on the management side of weblate, as I never saw them, nor do I have or ever had a staging setup to learn about it
@HuidaeCho take a look at these docs from another project using Weblate. It's one of the first that I find different info and procedures yet. And they use squash merges. https://forgejo.org/docs/next/developer/localization-admin/
Can I try to use "rebase" on the GitHub PR to update the branch, and see if it makes something different than the 4+ other tries that never fixed the problem (fixes until another PR is merged and Weblate isn't up to date with main)? Considering that weblate locked up again a couple hours after it was unlocked this morning
I just tried "Update with rebase" and got this error:
Rebasing (1/5) Auto-merging locale/po/grassmods_fr.po CONFLICT (content): Merge conflict in locale/po/grassmods_fr.po error: could not apply 6609ae8991... Translated using Weblate (French) hint: Resolve all conflicts manually, mark them as resolved with hint: "git add/rm <conflicted_files>", then run "git rebase --continue". hint: You can instead skip this commit: run "git rebase --skip". hint: To abort and get back to the state before "git rebase", run "git rebase --abort". Could not apply 6609ae8991... Translated using Weblate (French) (1)and the problem is I cannot run those suggested commands manually on Weblate :-(. Maybe, we should try options in the "Danger zone".
Does @robe2 have an idea here?
Nice meeting you @HuidaeCho at FOSS4GNA.
@neteler @HuidaeCho I'm not sure what I did to fix last time.
Right now, for the Weblate translations, to unlock, the only option that worked is below which I ddi
So now weblate shows 0 commits missing, but it is showing 10 outgoing commits. Pushing doesn't seem to do anything perhaps because this pull request hasn't been merged yet.
So I would try merging this and see if the weblate now shows right.
For messy divergencies, you can add weblate repo as a remote, do any local rebasing, fixing
Something like
git clone https://github.com/OSGeo/grass.git
cd grass
git remote add weblate https://weblate.osgeo.org/git/grass-gis/grasslibs
git fetch weblate
git checkout weblate/main
git checkout -b weblate-fix
git rebase weblate-fix #doing this now fails with difference in grass main and weblate
#to fix this one I would do -- with the local/po/grassmods_fr.po, show a conflict in dates only
git diff locale/po/grassmods_fr.po #just shows issue with header
git checkout origin/main -- locale/po/grassmods_fr.po
git add locale/po/grassmods_fr.po
git rebase --continue
#once you get a clean
git push --set-upstream robe2 weblate-fix #this would push to my local and I could do a pull request and merge this
Once you are sure you have captured all weblate changes you need, it's safe to go back to weblate grass admin panel and run this.
One case where I had to resort to this is when I did a force push into the postgis repository. Weblate does not like force pushes (and I admit now, that was a lousy thing to do just to destroy junk history), but I knew all changes were already captured in PostGIS, so it was safe for me to force weblate to match the postgis upstream repo.
The thing is, the commits from this PR were already merged in other weblate PRs. But since we use squash-merge, weblate doesn't update itself.
And each time weblate gets manually unlocked like what happened a couple hours ago, gets locked back up when we merge a new PR, like what just happened.
@robe2 It was great to see you in person. I've tried all three options and none worked last time.
@echoix Does squash-merge cause this problem?
@echoix Does squash-merge cause this problem?
Yes, it's documented in their docs that they have a hard time with it.
The thing is, the commits from this PR were already merged in other weblate PRs. But since we use squash-merge, weblate doesn't update itself.
And each time weblate gets manually unlocked like what happened a couple hours ago, gets locked back up when we merge a new PR, like what just happened.
There is a weblate add-on that does squashing.
What if you just install that on your weblate project so that weblate does the squashing for at least it's own pull requests? Not sure if that would help with the non-weblate pull requests.
It also looks like you have no add-ons installed in weblate GRASS project. Might want to check them out to see which ones might be valuable for GRASS. https://weblate.osgeo.org/addons/grass-gis/grasslibs/
FWIW the ones we have enabled for postgis-workshop are:
- Update PO files to match POT (msgmerge)
- Contributors in comment
- Component Discovery (this is really useful if you are constantly creating new doc files, so it will detect if there is a pattern
- Customize gettext output - to force no line wrapping (as it caused issue with sphinx building for some reason)
- Squash Git commits
- Automatic translation - threshold set to 99
For PostGIS we have these ones.
- Update PO files to match POT (msgmerge)
- Contributors in comment
- Automatic translation
We rarely do squashes in either project so might be why we don't run into this issue
@robe2 I have a question, how do you keep your strings to translate to be kept updated with the code as commits are made? Do you do it on the weblate side, or have CI for that?
@robe2 I have a question, how do you keep your strings to translate to be kept updated with the code as commits are made? Do you do it on the weblate side, or have CI for that?
We do build of the .pot file on our commits and let weblate create and update the POS as needed.
The weblate add-on that does that is the one called Update PO files to match POT (msgmerge)
I don't think there is a way for weblate to create the POTs as well, but I could be mistaken. Probably better to have your CI do that or do it manually every so often like we do.
So here is an example:
I updated the POT file in this - https://git.osgeo.org/gitea/postgis/postgis/commit/f83f784268aac67e92fdbf0d55a007161d94ac34
and weblate did a commit after updating all our POs.
https://git.osgeo.org/gitea/postgis/postgis/commit/39f89ae61840b7587bb19cf0ae83f0870d2e89cd
Since all these files have been written to the repo already, how about we:
- Run Reset all on weblate, to bring it to the same state as the grass repo
- Then install the Squash commits add on on weblate to see if it helps a bit?
Please do, we are stuck with the same changes in a PR loop since June 2, https://github.com/OSGeo/grass/pull/3741, and can't really have new contributions since then. I have no access to see any settings, so I rely on the two or three people that do
Does any newer release of Weblate since the 5.4.3 that we have has related improvements that would be helpful?
There seems to be a bug fix for the installation of the squash git commits plugin in 5.5.1: https://docs.weblate.org/en/latest/changes.html#weblate-5-5-1
The translations got unlocked today, but locked back exactly 15 minutes later when a new PR was merged.
Ok, it seems that weblate rebased automatically 11 times, since @HuidaeCho unlocked it, each time the repo changed. That's a good sign.
Do we try merging this PR in and see what happens?
@neteler should this be merged before or after 8.4.1, as we pretty much ignored it since the 8.4.0 release as it was locked
@neteler or others, we need to decide what to do here, as it gets rebased for each PR merged, and runs a new set of CI for every commit on main (slowing every project on the OSGeo github org), until we decide to merge now or not
Ok, it seems that weblate rebased automatically 11 times, since @HuidaeCho unlocked it, each time the repo changed. That's a good sign.
Do we try merging this PR in and see what happens?
Hi @echoix, I think we should merge it and see.
Let's go!
Can someone force merge to skip the queue, as we are actively merging to main, and the last runs were all fine
Just installed the Squash addon on Weblate. Hope that helps.