Merge pull request #1838 from bitwarden/add-locales-test
Add locales test
This commit is contained in:
commit
a2b71e4929
|
@ -41,10 +41,40 @@ jobs:
|
|||
echo "::set-output name=repo_url::$repo_url"
|
||||
echo "::set-output name=adj_build_number::$adj_build_num"
|
||||
|
||||
|
||||
browser:
|
||||
runs-on: windows-latest
|
||||
locales-test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Testing locales - extName length
|
||||
run: |
|
||||
found_error=false
|
||||
|
||||
echo "Locales Test"
|
||||
echo "============"
|
||||
echo "extName string must be 40 characters or less"
|
||||
echo
|
||||
for locale in $(ls src/_locales/); do
|
||||
string_length=$(jq '.extName.message | length' src/_locales/$locale/messages.json)
|
||||
if [[ $string_length -gt 40 ]]; then
|
||||
echo "$locale: $string_length"
|
||||
found_error=true
|
||||
fi
|
||||
done
|
||||
|
||||
if $found_error; then
|
||||
echo
|
||||
echo "Please fix 'extName' for the locales listed above."
|
||||
exit 1
|
||||
else
|
||||
echo "Test passed!"
|
||||
fi
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
needs: [ setup, locales-test ]
|
||||
env:
|
||||
REPO_URL: ${{ needs.setup.outputs.repo_url }}
|
||||
BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }}
|
||||
|
|
|
@ -64,9 +64,40 @@ jobs:
|
|||
prerelease: false
|
||||
|
||||
|
||||
browser:
|
||||
runs-on: windows-latest
|
||||
locales-test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Testing locales - extName length
|
||||
run: |
|
||||
found_error=false
|
||||
|
||||
echo "Locales Test"
|
||||
echo "============"
|
||||
echo "extName string must be 40 characters or less"
|
||||
echo
|
||||
for locale in $(ls src/_locales/); do
|
||||
string_length=$(jq '.extName.message | length' src/_locales/$locale/messages.json)
|
||||
if [[ $string_length -gt 40 ]]; then
|
||||
echo "$locale: $string_length"
|
||||
found_error=true
|
||||
fi
|
||||
done
|
||||
|
||||
if $found_error; then
|
||||
echo
|
||||
echo "Please fix 'extName' for the locales listed above."
|
||||
exit 1
|
||||
else
|
||||
echo "Test passed!"
|
||||
fi
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
needs: [ setup, locales-test ]
|
||||
env:
|
||||
REPO_URL: ${{ needs.setup.outputs.repo_url }}
|
||||
BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }}
|
||||
|
|
Loading…
Reference in New Issue