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

Resolve merge conflicts automatically #13163

Open
stokito opened this issue Dec 1, 2024 · 4 comments
Open

Resolve merge conflicts automatically #13163

stokito opened this issue Dec 1, 2024 · 4 comments

Comments

@stokito
Copy link

stokito commented Dec 1, 2024

Describe the problem

When source code changed and the same line was changed in the Weblate too then it will result in merge conflict:

Rebasing (1/2)
Auto-merging info_ar.po
CONFLICT (content): Merge conflict in info_ar.po
error: could not apply af2fe15d36... Translated using Weblate
hint: Resolve all conflicts manually, mark them as resolved with

Then the Weblate is blocking in maintenance mode. This is highly inconvenient but also forces users to always use the Weblate.

Describe the solution you would like

In most cases the Weblate can do the merging itself: take the source string but the existing translation move to draft and notify a translator.

Describe alternatives you have considered

No response

Screenshots

No response

Additional context

openwrt/luci#7434

@nijel
Copy link
Member

nijel commented Dec 2, 2024

When possible, Weblate already does this thanks to the built-in Gettext PO merge driver (see
#55 for discussions about that).

Anything can be improved, so if you have any specific idea how to make it work better, please share it.

Meanwhile, you might want to implement an approach to avoid such conflicts in the first place, see https://docs.weblate.org/en/latest/admin/continuous.html#avoid-merge-conflicts (I've just tried to better structure that in #13167).

Generally speaking, squashing makes resolving conflicts always a bit harder because Git might not be able to see that a certain commit is already applied if it was squashed with another commit that changes the same block.

@rcc1101
Copy link

rcc1101 commented Dec 4, 2024

Hi,

I have the same issue. First of all why should merge happen? Isnt weblate few commits behind the source branch and it should just update itself? Like the same case when we try to update using git pull <> doesnt land into conflicts.

Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Dec 19, 2024
@nijel
Copy link
Member

nijel commented Dec 19, 2024

Of course, Weblate will fast-forward if that is possible.

@github-actions github-actions bot removed the wontfix Nobody will work on this. label Dec 20, 2024
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

No branches or pull requests

3 participants