Commit d1cd9a76 authored by Stephane Glondu's avatar Stephane Glondu

Internationalization of blank votes

parent 8c4d9cb9
......@@ -145,7 +145,7 @@ let rec createQuestionNode sk params question_div num_questions i prev (q, answe
Dom.appendChild div c
in
let q_answers = match q.q_blank with
| Some true -> Array.append [|"Blank"|] q.q_answers
| Some true -> Array.append [|getHtmlById "str_blank_vote"|] q.q_answers
| _ -> q.q_answers
in
let () =
......@@ -204,7 +204,7 @@ let rec createQuestionNode sk params question_div num_questions i prev (q, answe
let total = Array.fold_left (+) 0 answers' in
if answers.(0) > 0 then (
if total <> 0 then
(alert "No other choices are allowed when voting blank"; false)
(alert (getHtmlById "no_other_blank"); false)
else true
) else check_min_max total
| _ ->
......@@ -263,7 +263,7 @@ let rec createQuestionNode sk params question_div num_questions i prev (q, answe
incr checked;
let li = document##createElement (Js.string "li") in
let text = match q.q_blank with
| Some true -> if i = 0 then "Blank" else q.q_answers.(i-1)
| Some true -> if i = 0 then getHtmlById "str_blank_vote" else q.q_answers.(i-1)
| _ -> q.q_answers.(i)
in
let t = document##createTextNode (Js.string text) in
......
......@@ -100,6 +100,8 @@ module type LocalizedStrings = sig
val come_back_later : string
val cookies_are_blocked : string
val please_enable_them : string
val blank_vote : string
val no_other_blank : string
val mail_password_subject : (string -> 'f, 'b, 'c, 'e, 'e, 'f) format6
val mail_password : (string -> string -> string -> string -> 'f, 'b, 'c, 'e, 'e, 'f) format6
val mail_credential_subject : (string -> 'f, 'b, 'c, 'e, 'e, 'f) format6
......
......@@ -99,6 +99,8 @@ let not_yet_open = "Entschuldigung, die Abstimmung ist noch nicht geöffnet."
let come_back_later = "Diese Abstimmung gibt es noch nicht. Bitte kommen Sie später wieder."
let cookies_are_blocked = "Cookies sind deaktiviert"
let please_enable_them = "Ihr Browser nimmt keine Cookies an, bitte aktivieren Sie diese."
let blank_vote = "Blank vote" (* FIXME *)
let no_other_blank = "No other choices are allowed when voting blank" (* FIXME *)
let mail_password_subject : ('a, 'b, 'c, 'd, 'e, 'f) format6 =
......
......@@ -99,6 +99,8 @@ let not_yet_open = "Sorry, this election is not yet open"
let come_back_later = "This election does not exist yet. Please come back later."
let cookies_are_blocked = "Cookies are blocked"
let please_enable_them = "Your browser seems to block cookies. Please enable them."
let blank_vote = "Blank vote"
let no_other_blank = "No other choices are allowed when voting blank"
let mail_password_subject : ('a, 'b, 'c, 'd, 'e, 'f) format6 =
......
......@@ -99,6 +99,8 @@ let not_yet_open = "Désolé, cette élection n'est pas encore ouverte"
let come_back_later = "Cette élection n'existe pas encore. Veuillez revenir plus tard."
let cookies_are_blocked = "Les cookies sont bloqués"
let please_enable_them = "Votre navigateur semble bloquer les cookies. Veuillez les activer."
let blank_vote = "Vote blanc"
let no_other_blank = "Vous ne pouvez pas sélectionner d'autres choix lors d'un vote blanc"
let mail_password_subject : ('a, 'b, 'c, 'd, 'e, 'f) format6 =
......
......@@ -99,6 +99,8 @@ let not_yet_open = "Din păcate, această alegere nu este încă deschisă"
let come_back_later = "Acesta alegere nu există încă. Vă rugăm să reveniți mai târziu."
let cookies_are_blocked = "Cookie-urile sunt blocate"
let please_enable_them = "Browser-ul dumneavoastră pare să blocheze cookie-urile. Vă rugăm să le activați."
let blank_vote = "Blank vote" (* FIXME *)
let no_other_blank = "No other choices are allowed when voting blank" (* FIXME *)
let mail_password_subject : ('a, 'b, 'c, 'd, 'e, 'f) format6 =
......
......@@ -1181,7 +1181,7 @@ let election_home w state () =
ul (List.mapi (fun i x ->
let answers = Array.to_list x.q_answers in
let answers = match x.q_blank with
| Some true -> "Blank" :: answers
| Some true -> L.blank_vote :: answers
| _ -> answers
in
let answers = List.mapi (fun j x ->
......@@ -2017,6 +2017,8 @@ let booth () =
span ~a:[a_id "str_nothing"] [pcdata L.nothing];
span ~a:[a_id "enter_cred"] [pcdata L.enter_cred];
span ~a:[a_id "invalid_cred"] [pcdata L.invalid_cred];
span ~a:[a_id "str_blank_vote"] [pcdata L.blank_vote];
span ~a:[a_id "no_other_blank"] [pcdata L.no_other_blank];
];
]
in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment