#8947 Translations not possible due to error state.
Opened 5 months ago by copperi. Modified 5 months ago

Could not merge the repository.

Weblate could not merge upstream changes while updating the repository.

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/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
CONFLICT (content): Merge conflict in po/zh_CN.po
Auto-merging po/uk.po
CONFLICT (content): Merge conflict in po/uk.po
Auto-merging po/tr.po
CONFLICT (content): Merge conflict in po/tr.po
Auto-merging po/tg.po
CONFLICT (content): Merge conflict in po/tg.po
Auto-merging po/sk.po
CONFLICT (content): Merge conflict in po/sk.po
Auto-merging po/ru.po
CONFLICT (content): Merge conflict in po/ru.po
Auto-merging po/pt_BR.po
CONFLICT (content): Merge conflict in po/pt_BR.po
Auto-merging po/pt.po
CONFLICT (content): Merge conflict in po/pt.po
Auto-merging po/pl.po
CONFLICT (content): Merge conflict in po/pl.po
Auto-merging po/pa.po
CONFLICT (content): Merge conflict in po/pa.po
Auto-merging po/nl.po
CONFLICT (content): Merge conflict in po/nl.po
Auto-merging po/mr.po
CONFLICT (content): Merge conflict in po/mr.po
Auto-merging po/kn.po
CONFLICT (content): Merge conflict in po/kn.po
Auto-merging po/ja.po
CONFLICT (content): Merge conflict in po/ja.po
Auto-merging po/id.po
CONFLICT (content): Merge conflict in po/id.po
Auto-merging po/hu.po
CONFLICT (content): Merge conflict in po/hu.po
Auto-merging po/hi.po
CONFLICT (content): Merge conflict in po/hi.po
Auto-merging po/fr.po
CONFLICT (content): Merge conflict in po/fr.po
Auto-merging po/fi.po
CONFLICT (content): Merge conflict in po/fi.po
Auto-merging po/eu.po
CONFLICT (content): Merge conflict in po/eu.po
Auto-merging po/es.po
CONFLICT (content): Merge conflict in po/es.po
Auto-merging po/en_GB.po
CONFLICT (content): Merge conflict in po/en_GB.po
Auto-merging po/de.po
CONFLICT (content): Merge conflict in po/de.po
Auto-merging po/cs.po
CONFLICT (content): Merge conflict in po/cs.po
Auto-merging po/ca.po
CONFLICT (content): Merge conflict in po/ca.po
Auto-merging po/bn_IN.po
CONFLICT (content): Merge conflict in po/bn_IN.po
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".

(1)

Typical workflow for fixing merge conflicts

Commit all pending changes in Weblate and lock the translation component.
wlc commit; wlc lock
Add Weblate exported repository as a remote.
git remote add weblate https://translate.fedoraproject.org/git/freeipa/master/ ; git remote update weblate
Merge Weblate changes and resolve any conflicts.
git merge weblate/main
Push changes into upstream repository.
git push origin main
Weblate should now be able to see updated repository and you can unlock it.
wlc pull ; wlc unlock

more instructions: https://docs.weblate.org/en/weblate-4.7.2/faq.html#merge


hi, thanks for the ping, indeed we need to fix that, but also to reduce the size of everything, because your po files are bloated.

I looked at this file, it is 50 k lines! https://pagure.io/freeipa/blob/master/f/po/ca.po
Any reason to have one single pot file for the whole IPA? I see you often split your code in parts (platform, server, client, python, etc.), maybe you could have one pot file per part? It would make it simpler to contribute and for file management.

As you have line numbers in the po file, it means each time you modify the pot file, all po files will be refreshed to have the same line numbers references -> huge commits with nothing useful. Have you ever tried to build your software without line numbers? It should work fine, unless you do hacks with line numbers.

Then, when you use Weblate:

  • either you keep it simple, and it became the only place in where you allow po modification (it's designed this way to make your life easier)
  • either you use the "manual mode":
  • set your weblate component in readonly,
  • pull content from weblate,
  • do your changes in your local repo
  • pull changes from weblate
    *enable your component

But the main question is translation workflow, what is the motivation of this commit? https://pagure.io/freeipa/c/6ee9f47f6eccffcdc9a0b8a5101c3ae0999a4b7e?branch=master

Hi.
I was on a long vacation away, only able to respond now.

The issue with translations is the same as we reported in past, namely, weblate does not use the same sorting logic as gettext and thus making it not possible to interoperate without manual involvement.

We cannot split translation domains into separate domains, as they are loaded into a single space for consuming as a part of a metadata content in FreeIPA API. Basically, everything translated is a part of a one giant translation space.

We are effectively do manual mode already since the beginning, due to the way how weblate is unable to accommodate our use case. This is a reason you see those 'strange' commits. So a reality is that we probably have to stop using weblate at all because it doesn't really want to help us...

Login to comment on this ticket.

Metadata