Skip to content

Commit

Permalink
fixup! Add localization support
Browse files Browse the repository at this point in the history
  • Loading branch information
cbosdo committed Apr 8, 2024
1 parent 8ccde2b commit 774578c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check_l10n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check localizable strings
run: ${PWD}/check_localizable
shell: bash -x {0}
run: ./check_localizable

8 changes: 6 additions & 2 deletions check_localizable
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
#
# SPDX-License-Identifier: Apache-2.0

find . -type f -not -name '*_test.go' -name '*.go' | xargs grep -n -e 'fmt\.Errorf("[^"]\+"' -e 'errors.New("[^"]\+"' -e '\(Fatal\|Error\|Info\|Warn\)()\(.Err(err)\?\).Msgf\?("'
exit $(test $? -ne 0)
grep -r . --include '*.go' --exclude '*_test.go' -n -e 'fmt\.Errorf("[^"]\+"' -e 'errors.New("[^"]\+"' -e '\(Fatal\|Error\|Info\|Warn\)()\(.Err(err)\?\).Msgf\?("'

if test $? -eq 0; then
echo "Fix the non localizable strings"
exit 1
fi

0 comments on commit 774578c

Please sign in to comment.