mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Update release workflow with locales test
This commit is contained in:
38
.github/workflows/release.yml
vendored
38
.github/workflows/release.yml
vendored
@@ -71,27 +71,29 @@ 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
|
found_error=false
|
||||||
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
|
|
||||||
|
|
||||||
if [[ $errors -eq 1 ]]; then
|
echo "Locales Test"
|
||||||
exit 1
|
echo "============"
|
||||||
else
|
echo "extName string must be 40 characters or less"
|
||||||
echo "Test passed"
|
echo
|
||||||
fi
|
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:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user