From fe36879dfb5f384e0414f24cd8eb62c4a121112c Mon Sep 17 00:00:00 2001 From: Moritz Reinel <129004253+moritz-reinel@users.noreply.github.com> Date: Sat, 12 Oct 2024 22:07:29 +0200 Subject: [PATCH] added note to Lang.zig and updated lang script to not process the comment --- res/lang/fix_missing_entries.sh | 4 +++- src/config/Lang.zig | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/res/lang/fix_missing_entries.sh b/res/lang/fix_missing_entries.sh index ab63965..8cdaae2 100644 --- a/res/lang/fix_missing_entries.sh +++ b/res/lang/fix_missing_entries.sh @@ -40,7 +40,9 @@ fi declare -a LANG_STRINGS while read -r line; do - if [[ "$line" =~ ^([^:]*): ]]; then + if [[ -z "$line" || "$line" =~ ^\/\/ ]]; then + : + elif [[ "$line" =~ ^([^:]*): ]]; then LANG_STRINGS+=("${BASH_REMATCH[1]}") else echo "ERROR: Line '$line' in file '$ZIG_LANG_FILE' does not contain an entry of the pattern ': ...'." >&2 diff --git a/src/config/Lang.zig b/src/config/Lang.zig index cd5f689..0e8d6c3 100644 --- a/src/config/Lang.zig +++ b/src/config/Lang.zig @@ -1,3 +1,8 @@ +// +// NOTE: After editing this file, please run `/res/lang/fix_missing_entries.sh` +// to update all the language files accordingly. +// + authenticating: []const u8 = "authenticating...", brightness_down: []const u8 = "decrease brightness", brightness_up: []const u8 = "increase brightness",