mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-03 18:28:13 +01:00
Update locale length test
This commit is contained in:
parent
3d66e75ba1
commit
cb07bc2300
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
@ -48,26 +48,21 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Testing locale lengths
|
- name: Testing locales - extName length
|
||||||
run: |
|
run: |
|
||||||
errors=0
|
exit_status=0
|
||||||
echo "Testing locales extName lengths"
|
|
||||||
echo "All must be 40 or less for Safari"
|
echo "extName string must be 40 characters or less"
|
||||||
echo "================================="
|
echo "===================================="
|
||||||
for file in $(ls src/_locales/);
|
for locale in $(ls src/_locales/); do
|
||||||
do
|
string_length=$(jq '.extName.message | length' src/_locales/$locale/messages.json)
|
||||||
test_string=$(cat src/_locales/$file/messages.json | jq .extName.message | tr -d '"')
|
if [[ $string_length -gt 40 ]]; then
|
||||||
if [[ ${#test_string} -gt 40 ]]; then
|
echo $locale: $string_length
|
||||||
echo $file: ${#test_string}
|
exit_status=1
|
||||||
errors=1
|
fi
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $errors -eq 1 ]]; then
|
exit $exit_status
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Test passed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
Loading…
Reference in New Issue
Block a user