Skip to content

Commit

Permalink
add workflow to validate translations
Browse files Browse the repository at this point in the history
Signed-off-by: Marlon Pina Tojal <marlont@backbase.com>
  • Loading branch information
Marlon Pina Tojal committed Apr 5, 2024
1 parent c95311e commit 4055cdd
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/i18n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: i18n
on:
push:
branches:
- 'master' # Default branch
pull_request:
branches:
- 'master' # Default branch

permissions:
contents: read

env:
NODE_VERSION: 18

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.1

- name: Set up NodeJs
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Check for Missing Keys
continue-on-error: false
run: |
cd src/
for filename in i18n/locales/*.json; do
LOCALE_FILE=`basename $filename .json`
npx @oreliain/vue-i18n-extract-keys -l $LOCALE_FILE -s .
done
git diff --exit-code i18n/locales/

0 comments on commit 4055cdd

Please sign in to comment.