1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

Update release workflow with locales test

This commit is contained in:
Vince Grassia 2021-05-13 17:08:18 -04:00
parent 1c3db8e18e
commit 1a4e8debd6

View File

@ -71,27 +71,29 @@ 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
done
found_error=false
if [[ $errors -eq 1 ]]; then
exit 1
else
echo "Test passed"
fi
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