From fdf327cd17ce1af4b8f39c08a14f5c91b0ea257c Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Tue, 29 Mar 2022 22:56:47 +0200 Subject: [PATCH 1/3] Non-greedy matching for votestrings. A single choice on a ballot has this format: #1 [ ] This or that The regexp in uvvote.pl's process_vote() will match and extract what's beetwen "[" and "]". But if "This or that" contains a "]", the match will be too greedy: #1 [ ] This [or that] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- match Fix that by using a non-greedy operator. Signed-off-by: Thomas Hochstein --- uvvote.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uvvote.pl b/uvvote.pl index 181aca2..7f23a42 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -271,7 +271,7 @@ sub process_vote { } # this matches on a single appearance: - if ($$body =~ /#$votenum\W*?\[(.+)\]/) { + if ($$body =~ /#$votenum\W*?\[(.+?)\]/) { # one or more vote strings were found $onevote ||= 1; # set $onevote to 1 if it was 0 my $votestring = $1; From ece94fc3f6ee38a638c31650df6e5838e70c9a16 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Thu, 6 Jul 2023 23:03:56 +0200 Subject: [PATCH 2/3] Fix typo, remove German umlaut. Fix from Peter Heirich. Signed-off-by: Thomas Hochstein --- messages.cfg | 2 +- usevote.cfg | 2 +- usevote.global.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/messages.cfg b/messages.cfg index e1f1b13..46eb986 100644 --- a/messages.cfg +++ b/messages.cfg @@ -82,7 +82,7 @@ MENU_GETKEY = *** Return druecken, um fortzufahren *** MENU_PROCESSING = Verarbeite Mails... MENU_ERROR_WARNING = WARNUNG MENU_ERROR_TEXT = Es wurden nicht alle Fehler behoben. Der Waehler wird eine Fehlermail erhalten und die Stimme wird ungueltig gewertet. -MENU_ERROR_GETKEY = Bitte mit 'y' bestätigen oder mit jeder anderen Eingabe zurück: +MENU_ERROR_GETKEY = Bitte mit 'y' bestaetigen oder mit jeder anderen Eingabe zurueck: MENU_DUP_VOTE = Moeglicherweise doppelte Stimmabgabe! MENU_DUP_FIRST = Erste Stimme: MENU_DUP_SECOND = Zweite Stimme: diff --git a/usevote.cfg b/usevote.cfg index 9cd7642..70b0632 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -181,7 +181,7 @@ templatedir = templates # (kommaseparierte Liste mit Funktions-Modulen) formats = UVformats.pm -# Dateiname der Steuerungsdatei fuer den Mailversandt +# Dateiname der Steuerungsdatei fuer den Mailversand controlfile = tmp/ack.control # Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0) diff --git a/usevote.global.cfg b/usevote.global.cfg index 177b2d9..d205879 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -46,7 +46,7 @@ templatedir = /home/gvv/usevote/templates # (kommaseparierte Liste mit Funktions-Modulen) formats = /home/gvv/usevote/UVformats.pm -# Dateiname der Steuerungsdatei fuer den Mailversandt +# Dateiname der Steuerungsdatei fuer den Mailversand controlfile = tmp/ack.control # Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0) From 417922acf7e5d95ae97a9472f2864427e21a2a33 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 25 Jan 2026 09:46:01 +0100 Subject: [PATCH 3/3] Replace 'Gruppe' in (result) templates. Signed-off-by: Thomas Hochstein --- templates/multiple-votes | 2 +- templates/result-multi | 2 +- templates/result-proportional | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/multiple-votes b/templates/multiple-votes index 7da6433..d56b3ec 100644 --- a/templates/multiple-votes +++ b/templates/multiple-votes @@ -3,7 +3,7 @@ body := value body | quote "> " == TEMPLATE ================================================================= Dein Wahlschein enthielt widerspruechliche Stimmen (z.B. sowohl JA- als -auch NEIN-Stimme fuer dieselbe Gruppe). +auch NEIN-Stimme fuer denselben Abstimmungsgegenstand). Das passiert meistens, wenn du mehrere Zeilen schickst, die als Stimme interpretiert werden, z. B. wenn du vergisst, eine Beispielzeile im CfV diff --git a/templates/result-multi b/templates/result-multi index 8c6cfba..74c6196 100644 --- a/templates/result-multi +++ b/templates/result-multi @@ -14,7 +14,7 @@ Ergebnisse [$votename-first] Es wurden [$numvalid] gueltige Stimmen abgegeben. - Ja Nein : 2/3? >=15? : ang.? : Gruppe + Ja Nein : 2/3? >=15? : ang.? : Abstimmungsgegenstand ---- ---- : ---- ----- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first] [@group-more| : : : [$line]\n]\n] diff --git a/templates/result-proportional b/templates/result-proportional index fa9db75..db6608b 100644 --- a/templates/result-proportional +++ b/templates/result-proportional @@ -15,7 +15,7 @@ Ergebnisse [$votename-first] Es wurden [$numvalid] gueltige Stimmen abgegeben. - Ja Nein : J>=N? Ja/Nein : ang.? : Gruppe + Ja Nein : J>=N? Ja/Nein : ang.? : Abstimmungsgegenstand ---- ---- : ----- ------- : ----- : --------------------------------------- [@count|[$yes] [$no] : [?cond1| Ja |Nein] [$proportion] : : [$group-first] [@group-more| : : : [$line]\n]\n]