-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow to validate translations
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |