mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
- Adiciona health.description e health.noServer em en.json e pt-BR.json
- scripts/check/check-cli-i18n.mjs: valida que todas as 567 chaves t() dos
comandos existem em en.json e que pt-BR.json tem as mesmas seções top-level
- Adiciona check-cli-i18n ao hook pre-commit
- 7 testes unitários: completude do catálogo, detecção de locale (OMNIROUTE_LANG),
fallback en, interpolação {var}, t() pt-BR
25 lines
951 B
Bash
Executable File
25 lines
951 B
Bash
Executable File
#!/usr/bin/env sh
|
|
if ! command -v npx >/dev/null 2>&1; then
|
|
echo "⚠️ npx not found in PATH — skipping pre-commit hooks"
|
|
echo " Run 'npm run lint && npm run check:any-budget:t11' manually before pushing."
|
|
exit 0
|
|
fi
|
|
|
|
npx lint-staged
|
|
node scripts/check/check-docs-sync.mjs
|
|
npm run check:any-budget:t11
|
|
|
|
# Strict env-doc sync (FASE 2)
|
|
node scripts/check/check-env-doc-sync.mjs
|
|
|
|
# CLI i18n consistency check — all t() keys must exist in en.json (FASE 8.3)
|
|
node scripts/check/check-cli-i18n.mjs
|
|
|
|
# i18n docs drift advisory (FASE 5) — warn-only on pre-commit; CI enforces strict.
|
|
node scripts/i18n/check-translation-drift.mjs --warn || \
|
|
echo "⚠️ i18n drift detected. Run 'npm run i18n:run' to update locale mirrors."
|
|
|
|
# i18n UI coverage advisory (FASE 6) — pre-commit warns; CI enforces strict.
|
|
node scripts/i18n/check-ui-keys-coverage.mjs --threshold=80 || \
|
|
echo "⚠️ UI i18n coverage below 80% for at least one locale."
|