From 61339ee8550c460617855bdda4a710d931fc1cd7 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Mon, 17 Mar 2025 09:36:39 -0400 Subject: [PATCH] Add find-missing-translations as a CI check --- .github/workflows/code-qa.yml | 15 +++++++++++++++ scripts/find-missing-translations.js | 2 ++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/code-qa.yml b/.github/workflows/code-qa.yml index 2bbad069bb..e8f17d8fd6 100644 --- a/.github/workflows/code-qa.yml +++ b/.github/workflows/code-qa.yml @@ -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: diff --git a/scripts/find-missing-translations.js b/scripts/find-missing-translations.js index 120d703ed0..ad23bb581c 100644 --- a/scripts/find-missing-translations.js +++ b/scripts/find-missing-translations.js @@ -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)