Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations update from OSGeo Weblate #4063

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

osgeoweblate
Copy link
Contributor

Translations update from OSGeo Weblate for GRASS GIS/grasslibs.

It also includes following components:

Current translation status:

Weblate translation status

Edouard Choinière and others added 9 commits May 31, 2024 11:10
Currently translated at 20.9% (2845 of 13590 strings)

Translation: GRASS GIS/grassmods
Translate-URL: https://weblate.osgeo.org/projects/grass-gis/grassmods/fr/
Currently translated at 89.6% (3831 of 4273 strings)

Translation: GRASS GIS/grasswxpy
Translate-URL: https://weblate.osgeo.org/projects/grass-gis/grasswxpy/fr/
Currently translated at 20.9% (2850 of 13590 strings)

Translation: GRASS GIS/grassmods
Translate-URL: https://weblate.osgeo.org/projects/grass-gis/grassmods/fr/
Currently translated at 89.6% (3832 of 4273 strings)

Translation: GRASS GIS/grasswxpy
Translate-URL: https://weblate.osgeo.org/projects/grass-gis/grasswxpy/fr/
Currently translated at 21.0% (2857 of 13590 strings)

Translation: GRASS GIS/grassmods
Translate-URL: https://weblate.osgeo.org/projects/grass-gis/grassmods/fr/
@echoix
Copy link
Member

echoix commented Jul 18, 2024

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

@HuidaeCho
Copy link
Member

HuidaeCho commented Jul 18, 2024

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".

@echoix
Copy link
Member

echoix commented Jul 18, 2024

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

@echoix
Copy link
Member

echoix commented Jul 18, 2024

@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/

@neteler
Copy link
Member

neteler commented Jul 21, 2024

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?

@robe2
Copy link

robe2 commented Sep 12, 2024

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

image

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.

image

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.

@echoix
Copy link
Member

echoix commented Sep 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants