From 59e691e8e1095e21cd2241792e4db3c781c966e1 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 22 Mar 2026 18:14:10 +0100 Subject: [PATCH] Exclude en-US.ftl when copying l10n locales into coreutils The l10n repo contains en-US.ftl files that can overwrite the coreutils English originals, causing translated docs to show text from the wrong language. Skip en-US.ftl during the copy to preserve the authoritative English strings. --- .github/workflows/website.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 396d7ad60..d636539db 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -58,13 +58,25 @@ jobs: - name: Copy l10n locales into coreutils run: | # Only copy locales into utilities that already exist in coreutils + # Exclude en-US.ftl to preserve the coreutils English originals for util_dir in coreutils-l10n/src/uu/*/; do util=$(basename "$util_dir") - if [ -d "coreutils/src/uu/$util" ]; then - cp -r "$util_dir/locales" "coreutils/src/uu/$util/" 2>/dev/null || true + if [ -d "coreutils/src/uu/$util/locales" ]; then + for ftl in "$util_dir"/locales/*.ftl; do + [ -f "$ftl" ] || continue + [ "$(basename "$ftl")" = "en-US.ftl" ] && continue + cp "$ftl" "coreutils/src/uu/$util/locales/" + done fi done - cp -r coreutils-l10n/src/uucore/* coreutils/src/uucore/ 2>/dev/null || true + # Copy uucore l10n files, excluding en-US.ftl + if [ -d "coreutils-l10n/src/uucore/locales" ]; then + for ftl in coreutils-l10n/src/uucore/locales/*.ftl; do + [ -f "$ftl" ] || continue + [ "$(basename "$ftl")" = "en-US.ftl" ] && continue + cp "$ftl" "coreutils/src/uucore/locales/" + done + fi - name: Patch mdbook theme with language selector run: |