#9260 Locked `master` for translations
Opened 2 years ago by slev. Modified a year ago

https://translate.fedoraproject.org/projects/freeipa/master/ can't be translated at the moment due to:

The translation is temporarily closed for contributions due to maintenance, please come back later. The translation was automatically locked due to following alerts: Could not merge the repository.
...
Weblate could not merge upstream changes while updating the repository.


Yes, this is due to conflicts in LINGUAS: https://translate.fedoraproject.org/projects/freeipa/master/#alerts

I am looking at how to get it fixed without merging all the failing commits from the weblate

I tried to force weblate to pull/rebase but it still fails in that LINGUAS file:

First, rewinding head to replay your work on top of it...
Applying: Update translation files
Using index info to reconstruct a base tree...
M   po/LINGUAS
M   po/bn_IN.po
M   po/ca.po
M   po/cs.po
M   po/de.po
M   po/en_GB.po
M   po/es.po
M   po/eu.po
M   po/fi.po
M   po/fr.po
M   po/hi.po
M   po/hu.po
M   po/id.po
M   po/ja.po
M   po/kn.po
M   po/mr.po
M   po/nl.po
M   po/pa.po
M   po/pl.po
M   po/pt.po
M   po/pt_BR.po
M   po/ru.po
M   po/sk.po
M   po/tg.po
M   po/tr.po
M   po/uk.po
M   po/zh_CN.po
Falling back to patching base and 3-way merge...
Auto-merging po/zh_CN.po
Auto-merging po/uk.po
Auto-merging po/tr.po
Auto-merging po/tg.po
Auto-merging po/sk.po
Auto-merging po/ru.po
Auto-merging po/pt_BR.po
Auto-merging po/pt.po
Auto-merging po/pl.po
Auto-merging po/pa.po
Auto-merging po/nl.po
Auto-merging po/mr.po
Auto-merging po/kn.po
Auto-merging po/ja.po
Auto-merging po/id.po
Auto-merging po/hu.po
Auto-merging po/hi.po
Auto-merging po/fr.po
Auto-merging po/fi.po
Auto-merging po/eu.po
Auto-merging po/es.po
Auto-merging po/en_GB.po
Auto-merging po/de.po
Auto-merging po/cs.po
Auto-merging po/ca.po
Auto-merging po/bn_IN.po
Auto-merging po/LINGUAS
CONFLICT (content): Merge conflict in po/LINGUAS
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 Update translation files

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

I know how to fix that on IPA side but how to force weblate -- I don't know...

FYI, this all happens remotely, so I cannot see what failed during the merge or rebase.

Perhaps I don't understand something.

I follow this guide https://docs.weblate.org/en/weblate-4.14.2/faq.html#how-to-fix-merge-conflicts-in-translations
exact steps on current ipa master:
- git remote add weblate https://translate.fedoraproject.org/git/freeipa/master/
- git remote update weblate
- git merge weblate/master

Auto-merging po/ko.po
CONFLICT (content): Merge conflict in po/ko.po
Automatic merge failed; fix conflicts and then commit the result.

Yeah, I tried that in past. They now have a script to allow gettext merge failures to be handled in semiautomatic way. I'll try that tomorrow.

The default merge style for components of weblate is rebase, I'm not sure which option you use for the syncing, but it seems rebase one.

Details:
https://docs.weblate.org/en/latest/devel/integration.html#managing-version-control-repository:

Updates Weblate repository with upstream changes. It uses Merge style when choosing Update or you can choose different one from the dropdown menu.

https://docs.weblate.org/en/latest/admin/projects.html#component-merge-style
https://docs.weblate.org/en/latest/admin/config.html#std-setting-DEFAULT_MERGE_STYLE

This is the equivalent of:
git rebase upstream/master weblate/master.

There is already merge commit in weblate/master (082622933). Thereby, the things are mixed and rebase no longer works (weblate calls bare git rebase).

I think what failed me in past is that I was not able to force push to weblate after merging the content from there. I will look at that tomorrow, may be I'll fix it this time.

Login to comment on this ticket.

Metadata