Add find-missing-translations as a CI check

This commit is contained in:
Matt Rubens 2025-03-17 09:36:39 -04:00
parent 21715287fc
commit 61339ee855
2 changed files with 17 additions and 0 deletions

View file

@ -28,6 +28,21 @@ jobs:
- name: Lint
run: npm run lint
check-translations:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm run install:all
- name: Verify all translations are complete
run: node scripts/find-missing-translations.js
knip:
runs-on: ubuntu-latest
steps:

View file

@ -206,6 +206,8 @@ function findMissingTranslations() {
console.log("1. Add the missing keys to the corresponding locale files")
console.log("2. Translate the English values to the appropriate language")
console.log("3. Run this script again to verify all translations are complete")
// Exit with error code to fail CI checks
process.exit(1)
}
} catch (error) {
console.error("Error:", error.message)