Files
trainingstagebuch/scripts/run-fix-en-leaks.sh
Torsten Schulz (local) eb54b4f7cf
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 45s
feat(i18n): add scripts for locale translation and patching
- Implemented `fill-de-extended-gaps.js` to fill missing billing/orders keys in de-extended from de.
- Created `fill-i18n-deep.py` for deep translation of locale JSONs using deep-translator with fallback options.
- Added `fill-i18n-locales.js` to translate locale JSONs and write overrides for untranslated keys.
- Introduced `fix-en-leaks.py` to translate keys that still match the en-US merge, addressing English leaks.
- Developed `patch-de-ch-swiss.js` to replace 'ß' with 'ss' in de-CH.json without deleting existing entries.
- Created `patch-en-gb-au.js` to apply UK/AU spelling corrections in en-GB and en-AU locales.
- Added shell scripts `run-fix-en-leaks.sh` and `run-i18n-deep-fill.sh` for sequential execution of translation tasks.
- Implemented `update-i18n-todo-stats.js` to update statistics in the I18N_TODO.md file based on translation completeness.
2026-05-15 15:52:54 +02:00

20 lines
576 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
PY="$ROOT/scripts/.venv-i18n/bin/python"
LOG="/tmp/fix-en-leaks.log"
LOCALES=(th tl fil fr es it pl ja zh)
: >"$LOG"
echo "[$(date -Iseconds)] start" | tee -a "$LOG"
for loc in "${LOCALES[@]}"; do
echo "[$(date -Iseconds)] === $loc ===" | tee -a "$LOG"
PYTHONUNBUFFERED=1 "$PY" -u "$ROOT/scripts/fix-en-leaks.py" "$loc" --delay 0.15 2>&1 | tee -a "$LOG" || {
echo "[$(date -Iseconds)] FAILED $loc" | tee -a "$LOG"
exit 1
}
done
echo "[$(date -Iseconds)] ALL DONE" | tee -a "$LOG"