ci(check-locale): fix issues with i18n-extract workflow (#2194)
This commit is contained in:
parent
8239ea99bd
commit
b699a94c57
2
.github/workflows/check_locale.yml
vendored
2
.github/workflows/check_locale.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
||||
run: |
|
||||
mkdir ./i18n-extract
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
npm run i18n-extract -- --languageFiles=src/locales/${file##*/} --output=i18n-extract/${file##*/}
|
||||
vue-i18n-extract --vueFiles './src/**/{*.?(js|ts|vue),.i18nignore}' --languageFiles './src/locales/${file##*/}' --output './i18n-extract/${file##*/}'
|
||||
MISSING=$(cat i18n-extract/${file##*/} | jq '.missingKeys | length')
|
||||
UNUSED=$(cat i18n-extract/${file##*/} | jq '.unusedKeys | length')
|
||||
echo "$file=|${file##*/}|${MISSING}|${UNUSED}|" >> $GITHUB_OUTPUT
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ package-lock.json
|
||||
cypress/screenshots/
|
||||
cypress/videos/
|
||||
components.d.ts
|
||||
i18n-extract
|
||||
|
@ -16,7 +16,7 @@
|
||||
"lint": "eslint --ignore-path .gitignore src",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"build.zip": "cd ./dist && zip -r mainsail.zip ./ -x '**.DS_Store' ./ && cd ..",
|
||||
"i18n-extract": "vue-i18n-extract use-config",
|
||||
"i18n-extract": "vue-i18n-extract --vueFiles './src/**/{*.?(js|ts|vue),.i18nignore}' --languageFiles './src/locales/*.json'",
|
||||
"preview": "vite preview",
|
||||
"start": "vite build && vite preview",
|
||||
"test": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run'",
|
||||
|
@ -1,8 +0,0 @@
|
||||
module.exports = {
|
||||
vueFiles: './src/**/{*.?(js|ts|vue),.i18nignore}',
|
||||
languageFiles: './src/locales/*.json',
|
||||
exclude: ['_last_update'],
|
||||
output: false,
|
||||
add: false,
|
||||
ci: false,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user