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 24203c2..b4a852e 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