Compare commits

...

3 commits

Author SHA1 Message Date
417922acf7 Replace 'Gruppe' in (result) templates.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2026-01-25 09:46:01 +01:00
ece94fc3f6 Fix typo, remove German umlaut.
Fix from Peter Heirich.

Signed-off-by: Thomas Hochstein <thh@thh.name>
2026-01-25 09:39:57 +01:00
fdf327cd17 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 <thh@thh.name>
2026-01-25 09:39:11 +01:00
7 changed files with 7 additions and 7 deletions

View file

@ -82,7 +82,7 @@ MENU_GETKEY = *** Return druecken, um fortzufahren ***
MENU_PROCESSING = Verarbeite Mails... MENU_PROCESSING = Verarbeite Mails...
MENU_ERROR_WARNING = WARNUNG 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_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_VOTE = Moeglicherweise doppelte Stimmabgabe!
MENU_DUP_FIRST = Erste Stimme: MENU_DUP_FIRST = Erste Stimme:
MENU_DUP_SECOND = Zweite Stimme: MENU_DUP_SECOND = Zweite Stimme:

View file

@ -3,7 +3,7 @@ body := value body | quote "> "
== TEMPLATE ================================================================= == TEMPLATE =================================================================
Dein Wahlschein enthielt widerspruechliche Stimmen (z.B. sowohl JA- als 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 Das passiert meistens, wenn du mehrere Zeilen schickst, die als Stimme
interpretiert werden, z. B. wenn du vergisst, eine Beispielzeile im CfV interpretiert werden, z. B. wenn du vergisst, eine Beispielzeile im CfV

View file

@ -14,7 +14,7 @@ Ergebnisse [$votename-first]
Es wurden [$numvalid] gueltige Stimmen abgegeben. 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] [@count|[$yes] [$no] : [?cond1| Ja |Nein] [?cond2| Ja |Nein] : [?result| Ja |Nein] : [$group-first]
[@group-more| : : : [$line]\n]\n] [@group-more| : : : [$line]\n]\n]

View file

@ -15,7 +15,7 @@ Ergebnisse [$votename-first]
Es wurden [$numvalid] gueltige Stimmen abgegeben. 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] [@count|[$yes] [$no] : [?cond1| Ja |Nein] [$proportion] : : [$group-first]
[@group-more| : : : [$line]\n]\n] [@group-more| : : : [$line]\n]\n]

View file

@ -181,7 +181,7 @@ templatedir = templates
# (kommaseparierte Liste mit Funktions-Modulen) # (kommaseparierte Liste mit Funktions-Modulen)
formats = UVformats.pm formats = UVformats.pm
# Dateiname der Steuerungsdatei fuer den Mailversandt # Dateiname der Steuerungsdatei fuer den Mailversand
controlfile = tmp/ack.control controlfile = tmp/ack.control
# Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0) # Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0)

View file

@ -46,7 +46,7 @@ templatedir = /home/gvv/usevote/templates
# (kommaseparierte Liste mit Funktions-Modulen) # (kommaseparierte Liste mit Funktions-Modulen)
formats = /home/gvv/usevote/UVformats.pm formats = /home/gvv/usevote/UVformats.pm
# Dateiname der Steuerungsdatei fuer den Mailversandt # Dateiname der Steuerungsdatei fuer den Mailversand
controlfile = tmp/ack.control controlfile = tmp/ack.control
# Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0) # Dateiname des Shellscripts zum Versenden der Bestaetigungsmails (falls smtp=0)

View file

@ -271,7 +271,7 @@ sub process_vote {
} }
# this matches on a single appearance: # this matches on a single appearance:
if ($$body =~ /#$votenum\W*?\[(.+)\]/) { if ($$body =~ /#$votenum\W*?\[(.+?)\]/) {
# one or more vote strings were found # one or more vote strings were found
$onevote ||= 1; # set $onevote to 1 if it was 0 $onevote ||= 1; # set $onevote to 1 if it was 0
my $votestring = $1; my $votestring = $1;