add support from localization based on browser and languages #2
Workflow file for this run
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
name: i18n | |
on: | |
push: | |
branches: | |
- 'master' # Default branch | |
pull_request: | |
branches: | |
- 'master' # Default branch | |
permissions: | |
contents: read | |
env: | |
NODE_VERSION: 18 | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/[email protected] | |
- name: Set up NodeJs | |
uses: actions/[email protected] | |
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/ |