build: i18n-add-language.sh: more lenient code validation
authorJo-Philipp Wich <jo@mein.io>
Wed, 5 Feb 2020 13:13:54 +0000 (14:13 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 5 Feb 2020 13:16:12 +0000 (14:16 +0100)
Allow language codes with underscores and capital letters.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
build/i18n-add-language.sh

index 24203c23317c301bcb58938cd03fac3ef23c8995..b4a852efb72f5c32fc4e9a64ea7e14c5bc6cfc87 100755 (executable)
@@ -3,7 +3,7 @@
 LANG=$1
 
 case "$LANG" in
-       [a-z][a-z]|[a-z][a-z]-[a-z][a-z]) : ;;
+       [a-z][a-z]|[a-z][a-z][_-][A-Za-z][A-Za-z]*) : ;;
        *)
                echo "Usage: $0 <ISO_CODE>\n" >&2
                exit 1