From ff2cbcfb4674b97c6c1221152f58fc7a8ec256d4 Mon Sep 17 00:00:00 2001 From: Ejaz Ahmad <86868918+jajjibhai008@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:02:42 +0500 Subject: [PATCH] style: add github check to validate i18n string extraction (#432) --- .github/workflows/ci.yml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40496564..2ddf6d2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,8 @@ jobs: run: npm run test - name: Build run: npm run build - - name: i18n_extract - run: npm run i18n_extract + - name: extract_translations + run: make extract_translations - name: Coverage uses: codecov/codecov-action@v4 with: diff --git a/package.json b/package.json index 2f730d70..47de75d9 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "scripts": { "build": "fedx-scripts webpack", - "i18n_extract": "BABEL_ENV=i18n fedx-scripts babel src --quiet > /dev/null", + "i18n_extract": "fedx-scripts formatjs extract --throws", "lint": "fedx-scripts eslint --ext .js --ext .jsx .", "lint:fix": "fedx-scripts eslint --ext .js --ext .jsx . --fix", "snapshot": "fedx-scripts jest --updateSnapshot",