Skip to content

Commit 59e691e

Browse files
committed
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.
1 parent 346b919 commit 59e691e

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/website.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,25 @@ jobs:
5858
- name: Copy l10n locales into coreutils
5959
run: |
6060
# Only copy locales into utilities that already exist in coreutils
61+
# Exclude en-US.ftl to preserve the coreutils English originals
6162
for util_dir in coreutils-l10n/src/uu/*/; do
6263
util=$(basename "$util_dir")
63-
if [ -d "coreutils/src/uu/$util" ]; then
64-
cp -r "$util_dir/locales" "coreutils/src/uu/$util/" 2>/dev/null || true
64+
if [ -d "coreutils/src/uu/$util/locales" ]; then
65+
for ftl in "$util_dir"/locales/*.ftl; do
66+
[ -f "$ftl" ] || continue
67+
[ "$(basename "$ftl")" = "en-US.ftl" ] && continue
68+
cp "$ftl" "coreutils/src/uu/$util/locales/"
69+
done
6570
fi
6671
done
67-
cp -r coreutils-l10n/src/uucore/* coreutils/src/uucore/ 2>/dev/null || true
72+
# Copy uucore l10n files, excluding en-US.ftl
73+
if [ -d "coreutils-l10n/src/uucore/locales" ]; then
74+
for ftl in coreutils-l10n/src/uucore/locales/*.ftl; do
75+
[ -f "$ftl" ] || continue
76+
[ "$(basename "$ftl")" = "en-US.ftl" ] && continue
77+
cp "$ftl" "coreutils/src/uucore/locales/"
78+
done
79+
fi
6880
6981
- name: Patch mdbook theme with language selector
7082
run: |

0 commit comments

Comments
 (0)