Update locale length test
This commit is contained in:
parent
3d66e75ba1
commit
cb07bc2300
|
@ -48,26 +48,21 @@ jobs:
|
|||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Testing locale lengths
|
||||
- name: Testing locales - extName length
|
||||
run: |
|
||||
errors=0
|
||||
echo "Testing locales extName lengths"
|
||||
echo "All must be 40 or less for Safari"
|
||||
echo "================================="
|
||||
for file in $(ls src/_locales/);
|
||||
do
|
||||
test_string=$(cat src/_locales/$file/messages.json | jq .extName.message | tr -d '"')
|
||||
if [[ ${#test_string} -gt 40 ]]; then
|
||||
echo $file: ${#test_string}
|
||||
errors=1
|
||||
fi
|
||||
exit_status=0
|
||||
|
||||
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
|
||||
exit_status=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $errors -eq 1 ]]; then
|
||||
exit 1
|
||||
else
|
||||
echo "Test passed"
|
||||
fi
|
||||
|
||||
exit $exit_status
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
|
Loading…
Reference in New Issue