From 2b4ce11c8bb9e0d5a0e10947c1f3fc62efd2325e Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 1 Dec 2024 12:33:38 +0100 Subject: fix(common/inits/latex): Use `-` instead of `_` as separator in languages LTex does not support the `_` syntax. --- common/inits/latex/init.local | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'common') diff --git a/common/inits/latex/init.local b/common/inits/latex/init.local index 123e349..0e61b4d 100755 --- a/common/inits/latex/init.local +++ b/common/inits/latex/init.local @@ -1,16 +1,16 @@ #!/usr/bin/env sh -prompt LANGUAGE "The language to use in the latex documents" "en_GB" +prompt LANGUAGE "The language to use in the latex documents" "en-GB" bable_language="" case "$LANGUAGE" in -"en_GB") +en-GB) bable_language="british" ;; -en_*) +en-*) bable_language="english" ;; -de_DE | de_*) +de-DE | de-*) bable_language="ngerman" ;; @@ -30,29 +30,29 @@ fi siunitx_language="" # locales UK, US, DE (Germany), PL (Poland), FR (French), SI (Slovene) and ZA (South Africa). case "$LANGUAGE" in -"en_GB") +en-GB) siunitx_language="UK" # United Kingdom ;; -"en_US") +en-US) siunitx_language="US" # United States of Amerika ;; -en_ZA) +en-ZA) siunitx_language="ZA" # South Africa ;; -en_*) +en-*) echo "'$LANGUAGE' is not yet recognized! But it seems english, thus we set SIUNITX_LANGUAGE='UK'." siunitx_language="UK" ;; -de_DE) +de-DE) siunitx_language="DE" # Germany ;; -pl_PL) +pl-PL) siunitx_language="PL" # Poland ;; -fr_FR) +fr-FR) siunitx_language="FR" # French ;; -sl_SL) +sl-SL) siunitx_language="SI" # Slovene ;; *) @@ -63,7 +63,7 @@ sl_SL) esac prompt BABLE_LANGUAGE "The language to use for the bable package" "$bable_language" "dont_ask" -prompt DATE_TIME_LANGUAGE "The language to use for the datetime2 package" "$(echo "$LANGUAGE" | sed 's/_/-/g')" "dont_ask" +prompt DATE_TIME_LANGUAGE "The language to use for the datetime2 package" "$LANGUAGE" "dont_ask" prompt SIUNITX_LANGUAGE "The language to use for the siunitx package" "$siunitx_language" "dont_ask" prompt TODONOTES_LANGUAGE "The language to use for the todonotes package" "$todonotes_language" "dont_ask" -- cgit 1.4.1