about summary refs log tree commit diff stats
path: root/build/latex/letter
diff options
context:
space:
mode:
Diffstat (limited to 'build/latex/letter')
-rw-r--r--build/latex/letter/flake.lock129
-rwxr-xr-xbuild/latex/letter/init.local44
2 files changed, 43 insertions, 130 deletions
diff --git a/build/latex/letter/flake.lock b/build/latex/letter/flake.lock
deleted file mode 100644
index 544cbdf..0000000
--- a/build/latex/letter/flake.lock
+++ /dev/null
@@ -1,129 +0,0 @@
-{
-  "nodes": {
-    "flake-compat": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1696426674,
-        "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
-        "type": "github"
-      },
-      "original": {
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "type": "github"
-      }
-    },
-    "flake-utils": {
-      "inputs": {
-        "systems": [
-          "systems"
-        ]
-      },
-      "locked": {
-        "lastModified": 1710146030,
-        "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "type": "github"
-      }
-    },
-    "flake_version_update": {
-      "inputs": {
-        "flake-utils": [
-          "flake-utils"
-        ],
-        "nixpkgs": [
-          "nixpkgs"
-        ],
-        "systems": [
-          "systems"
-        ]
-      },
-      "locked": {
-        "lastModified": 1685288691,
-        "narHash": "sha256-oP6h34oJ8rm6KlUpyZrX+ww3hnoWny2ecrEXxkU7F3c=",
-        "ref": "refs/heads/prime",
-        "rev": "e9a97e01eca780bd16e1dbdbd8856b59558f4959",
-        "revCount": 5,
-        "type": "git",
-        "url": "https://codeberg.org/soispha/flake_version_update.git"
-      },
-      "original": {
-        "type": "git",
-        "url": "https://codeberg.org/soispha/flake_version_update.git"
-      }
-    },
-    "nixpkgs": {
-      "locked": {
-        "lastModified": 1711715736,
-        "narHash": "sha256-9slQ609YqT9bT/MNX9+5k5jltL9zgpn36DpFB7TkttM=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "807c549feabce7eddbf259dbdcec9e0600a0660d",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixpkgs-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "root": {
-      "inputs": {
-        "flake-compat": "flake-compat",
-        "flake-utils": "flake-utils",
-        "flake_version_update": "flake_version_update",
-        "nixpkgs": "nixpkgs",
-        "systems": "systems",
-        "treefmt-nix": "treefmt-nix"
-      }
-    },
-    "systems": {
-      "locked": {
-        "lastModified": 1680978846,
-        "narHash": "sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw=",
-        "owner": "nix-systems",
-        "repo": "x86_64-linux",
-        "rev": "2ecfcac5e15790ba6ce360ceccddb15ad16d08a8",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-systems",
-        "repo": "x86_64-linux",
-        "type": "github"
-      }
-    },
-    "treefmt-nix": {
-      "inputs": {
-        "nixpkgs": [
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1711803027,
-        "narHash": "sha256-Qic3OvsVLpetchzaIe2hJqgliWXACq2Oee6mBXa/IZQ=",
-        "owner": "numtide",
-        "repo": "treefmt-nix",
-        "rev": "1810d51a015c1730f2fe05a255258649799df416",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "treefmt-nix",
-        "type": "github"
-      }
-    }
-  },
-  "root": "root",
-  "version": 7
-}
diff --git a/build/latex/letter/init.local b/build/latex/letter/init.local
index ae57756..123e349 100755
--- a/build/latex/letter/init.local
+++ b/build/latex/letter/init.local
@@ -21,8 +21,50 @@ de_DE | de_*)
     ;;
 esac
 
+if [ "$bable_language" = "british" ]; then
+    todonotes_language="english"
+else
+    todonotes_language="$bable_language"
+fi
+
+siunitx_language=""
+# locales UK, US, DE (Germany), PL (Poland), FR (French), SI (Slovene) and ZA (South Africa).
+case "$LANGUAGE" in
+"en_GB")
+    siunitx_language="UK" # United Kingdom
+    ;;
+"en_US")
+    siunitx_language="US" # United States of Amerika
+    ;;
+en_ZA)
+    siunitx_language="ZA" # South Africa
+    ;;
+en_*)
+    echo "'$LANGUAGE' is not yet recognized! But it seems english, thus we set SIUNITX_LANGUAGE='UK'."
+    siunitx_language="UK"
+    ;;
+de_DE)
+    siunitx_language="DE" # Germany
+    ;;
+pl_PL)
+    siunitx_language="PL" # Poland
+    ;;
+fr_FR)
+    siunitx_language="FR" # French
+    ;;
+sl_SL)
+    siunitx_language="SI" # Slovene
+    ;;
+*)
+    echo "'$LANGUAGE' is not yet recognized by the init.local script! Please open an issue." 1>&2
+    echo "set 'SIUNITX_LANGUAGE' to 'NOT_YET_RECOGNIZED_PLEASE_REPLACE' to help you find instances of the variable use." 1>&2
+    siunitx_language="NOT_YET_RECOGNIZED_PLEASE_REPLACE"
+    ;;
+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 SIUNITX_LANGUAGE "The language to use for the siunitx package" "$(echo "$LANGUAGE" | sed 's/\(\w\w\).*/\U\1/')" "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"
 
 # vim: ft=sh