mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-29 12:55:21 +01:00
Update release workflow with locales test
This commit is contained in:
parent
1c3db8e18e
commit
1a4e8debd6
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@ -71,28 +71,30 @@ 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
|
||||
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 [[ $errors -eq 1 ]]; then
|
||||
if $found_error; then
|
||||
echo
|
||||
echo "Please fix 'extName' for the locales listed above."
|
||||
exit 1
|
||||
else
|
||||
echo "Test passed"
|
||||
echo "Test passed!"
|
||||
fi
|
||||
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
needs: [ setup, locales-test ]
|
||||
|
Loading…
Reference in New Issue
Block a user