From 7bef57d1df66e728497588440850fd3cf9d93569 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Fri, 2 Oct 2026 11:38:29 +0200 Subject: [PATCH] fix: Let main win conflicting hunks when refreshing the translation branch The config version sync rewrites librechat.yaml snippets in every locale file on main, which conflicted with the translation branch's copies of the same lines and failed every Translate Docs run after #770 merged. --- .github/workflows/translate_docs.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/translate_docs.yml b/.github/workflows/translate_docs.yml index 4a43a2e5b..458068c30 100644 --- a/.github/workflows/translate_docs.yml +++ b/.github/workflows/translate_docs.yml @@ -70,7 +70,11 @@ jobs: git fetch origin "+refs/heads/main:refs/remotes/origin/main" if git fetch origin "+refs/heads/${TRANSLATE_BRANCH}:refs/remotes/origin/${TRANSLATE_BRANCH}" 2>/dev/null; then git switch -c "$TRANSLATE_BRANCH" "origin/$TRANSLATE_BRANCH" - git merge --no-edit origin/main + # main wins conflicting hunks: it also edits locale files directly (the + # config version sync rewrites every librechat.yaml snippet), and those + # edits would otherwise conflict with the branch's translations of the + # same lines and stop every run. Non-conflicting translations are kept. + git merge -X theirs --no-edit origin/main else git switch -c "$TRANSLATE_BRANCH" origin/main fi @@ -213,7 +217,7 @@ jobs: if git show-ref --verify --quiet "refs/remotes/origin/${TRANSLATE_BRANCH}"; then git merge --no-edit "origin/${TRANSLATE_BRANCH}" fi - git merge --no-edit origin/main + git merge -X theirs --no-edit origin/main sleep 5 done if [ "$pushed" != "true" ]; then