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