mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-27 12:13:30 +00:00
🌉 fix: Preserve Missing Locize Translations (#14917)
This commit is contained in:
parent
57ea1137f6
commit
c77e6a5ad2
2 changed files with 100 additions and 3 deletions
14
.github/workflows/locize-i18n-sync.yml
vendored
14
.github/workflows/locize-i18n-sync.yml
vendored
|
|
@ -2,11 +2,12 @@ name: Sync Locize Translations & Create Translation PR
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [dev]
|
||||
paths:
|
||||
- 'client/src/locales/en/**'
|
||||
repository_dispatch:
|
||||
types: [locize/versionPublished]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: locize-i18n-sync
|
||||
|
|
@ -51,7 +52,7 @@ jobs:
|
|||
|
||||
create-pull-request:
|
||||
name: Create Translation PR on Version Published
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: sync-translations
|
||||
permissions:
|
||||
|
|
@ -61,6 +62,7 @@ jobs:
|
|||
- name: Checkout Repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
ref: dev
|
||||
persist-credentials: false
|
||||
|
||||
# Keep a baseline so generated changes can be checked before opening a PR.
|
||||
|
|
@ -75,6 +77,12 @@ jobs:
|
|||
path: "client/src/locales"
|
||||
version: latest
|
||||
|
||||
- name: Preserve Repository Translations Missing from locize
|
||||
run: |
|
||||
node scripts/merge-locize-download.mjs \
|
||||
--base-dir "$RUNNER_TEMP/locize-locale-baseline" \
|
||||
--current-dir client/src/locales
|
||||
|
||||
- name: Validate Downloaded Translations
|
||||
run: |
|
||||
node scripts/validate-locize-download.mjs \
|
||||
|
|
@ -91,7 +99,7 @@ jobs:
|
|||
add-paths: |
|
||||
client/src/locales/**
|
||||
commit-message: "🌍 i18n: Update translation.json with latest translations"
|
||||
base: main
|
||||
base: dev
|
||||
branch: i18n/locize-translation-update
|
||||
title: "🌍 i18n: Update translation.json with latest translations"
|
||||
body: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue