Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
belenios
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
belenios
belenios
Commits
ded21ff2
Commit
ded21ff2
authored
Aug 31, 2016
by
Stephane Glondu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Translate email subjects
parent
0bc6de39
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
3 deletions
+41
-3
src/web/web_election.ml
src/web/web_election.ml
+1
-1
src/web/web_i18n_sig.mli
src/web/web_i18n_sig.mli
+3
-0
src/web/web_l10n_de.ml
src/web/web_l10n_de.ml
+9
-0
src/web/web_l10n_en.ml
src/web/web_l10n_en.ml
+9
-0
src/web/web_l10n_fr.ml
src/web/web_l10n_fr.ml
+9
-0
src/web/web_site.ml
src/web/web_site.ml
+10
-2
No files found.
src/web/web_election.ml
View file @
ded21ff2
...
...
@@ -53,7 +53,6 @@ module Make (D : ELECTION_DATA) (M : RANDOM with type 'a t = 'a Lwt.t) : WEB_ELE
let
send_confirmation_email
user
email
hash
=
let
title
=
D
.
election
.
e_params
.
e_name
in
let
subject
=
"Your vote for election "
^
title
in
let
x
=
(
D
.
election
.
e_params
.
e_uuid
,
()
)
in
let
url1
=
Eliom_uri
.
make_string_uri
~
absolute
:
true
~
service
:
Web_services
.
election_pretty_ballots
x
|>
rewrite_prefix
...
...
@@ -63,6 +62,7 @@ module Make (D : ELECTION_DATA) (M : RANDOM with type 'a t = 'a Lwt.t) : WEB_ELE
in
let
%
lwt
language
=
Eliom_reference
.
get
Web_state
.
language
in
let
module
L
=
(
val
Web_i18n
.
get_lang
language
)
in
let
subject
=
Printf
.
sprintf
L
.
mail_confirmation_subject
title
in
let
body
=
Printf
.
sprintf
L
.
mail_confirmation
user
title
hash
url1
url2
in
send_email
email
subject
body
...
...
src/web/web_i18n_sig.mli
View file @
ded21ff2
...
...
@@ -100,7 +100,10 @@ module type LocalizedStrings = sig
val
come_back_later
:
string
val
cookies_are_blocked
:
string
val
please_enable_them
:
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
val
mail_credential
:
(
string
->
string
->
string
->
string
->
'
f
,
'
b
,
'
c
,
'
e
,
'
e
,
'
f
)
format6
val
mail_confirmation_subject
:
(
string
->
'
f
,
'
b
,
'
c
,
'
e
,
'
e
,
'
f
)
format6
val
mail_confirmation
:
(
string
->
string
->
string
->
string
->
string
->
'
f
,
'
b
,
'
c
,
'
e
,
'
e
,
'
f
)
format6
end
src/web/web_l10n_de.ml
View file @
ded21ff2
...
...
@@ -101,6 +101,9 @@ let cookies_are_blocked = "Cookies sind deaktiviert"
let
please_enable_them
=
"Ihr Browser nimmt keine Cookies an, bitte aktivieren Sie diese."
let
mail_password_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Your password for election %s"
(* FIXME *)
let
mail_password
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Sie sind für die folgende Abstimmung als Wähler eingetragen:
...
...
@@ -121,6 +124,9 @@ Website der Abstimmung: %s
Sie können so oft abstimmen wie Sie wollen, nur die letzte Stimme zählt."
let
mail_credential_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Your credential for election %s"
(* FIXME *)
let
mail_credential
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Sie sind für die folgende Abstimmung als Wähler eingetragen:
...
...
@@ -141,6 +147,9 @@ Website der Abstimmung: %s
Sie können so oft abstimmen wie Sie wollen, nur die letzte Stimme zählt."
let
mail_confirmation_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Your vote for election %s"
(* FIXME *)
let
mail_confirmation
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"%s,
...
...
src/web/web_l10n_en.ml
View file @
ded21ff2
...
...
@@ -101,6 +101,9 @@ let cookies_are_blocked = "Cookies are blocked"
let
please_enable_them
=
"Your browser seems to block cookies. Please enable them."
let
mail_password_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Your password for election %s"
let
mail_password
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"You are listed as a voter for the election
...
...
@@ -121,6 +124,9 @@ Note that you are allowed to vote several times. Only the last vote
counts."
let
mail_credential_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Your credential for election %s"
let
mail_credential
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"You are listed as a voter for the election
...
...
@@ -141,6 +147,9 @@ Note that you are allowed to vote several times. Only the last vote
counts."
let
mail_confirmation_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Your vote for election %s"
let
mail_confirmation
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Dear %s,
...
...
src/web/web_l10n_fr.ml
View file @
ded21ff2
...
...
@@ -101,6 +101,9 @@ let cookies_are_blocked = "Les cookies sont bloqués"
let
please_enable_them
=
"Votre navigateur semble bloquer les cookies. Veuillez les activer."
let
mail_password_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Votre mot de passe pour l'élection %s"
let
mail_password
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Vous êtes enregistré(e) en tant qu'électeur(trice) pour l'élection
...
...
@@ -122,6 +125,9 @@ Notez que vous pouvez voter plusieurs fois. Seul le dernier vote est
pris en compte."
let
mail_credential_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Votre code de vote pour l'élection %s"
let
mail_credential
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Vous êtes enregistré(e) en tant qu'électeur(trice) pour l'élection
...
...
@@ -143,6 +149,9 @@ Notez que vous pouvez voter plusieurs fois. Seul le dernier vote est
pris en compte."
let
mail_confirmation_subject
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"Votre vote pour l'élection %s"
let
mail_confirmation
:
(
'
a
,
'
b
,
'
c
,
'
d
,
'
e
,
'
f
)
format6
=
"%s,
...
...
src/web/web_site.ml
View file @
ded21ff2
...
...
@@ -449,7 +449,11 @@ let generate_password langs title url id =
)
langs
in
let
body
=
PString
.
concat
"
\n\n
----------
\n\n
"
bodies
in
let
body
=
body
^
"
\n\n
--
\n
Belenios"
in
let
subject
=
"Your password for election "
^
title
in
let
subject
=
let
lang
=
List
.
hd
langs
in
let
module
L
=
(
val
Web_i18n
.
get_lang
lang
)
in
Printf
.
sprintf
L
.
mail_password_subject
title
in
send_email
email
subject
body
>>
return
(
salt
,
hashed
)
...
...
@@ -780,7 +784,11 @@ let () =
)
langs
in
let
body
=
PString
.
concat
"
\n\n
----------
\n\n
"
bodies
in
let
body
=
body
^
"
\n\n
--
\n
Belenios"
in
let
subject
=
"Your credential for election "
^
title
in
let
subject
=
let
lang
=
List
.
hd
langs
in
let
module
L
=
(
val
Web_i18n
.
get_lang
lang
)
in
Printf
.
sprintf
L
.
mail_credential_subject
title
in
let
%
lwt
()
=
send_email
email
subject
body
in
return
@@
S
.
add
pub_cred
accu
)
S
.
empty
se
.
se_voters
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment