aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-08-10 15:06:50 +0000
committergerv%gerv.net <>2002-08-10 15:06:50 +0000
commitf35caa4adb4ae31c5ff7611194b00ebec5ff66aa (patch)
tree7d2298565ae01f9a7410bc83bc340ddf80dbd8a5
parent61890499431396f3209e0a135122a1af507364f6 (diff)
downloadbugs-f35caa4adb4ae31c5ff7611194b00ebec5ff66aa.tar
bugs-f35caa4adb4ae31c5ff7611194b00ebec5ff66aa.tar.gz
bugs-f35caa4adb4ae31c5ff7611194b00ebec5ff66aa.tar.bz2
bugs-f35caa4adb4ae31c5ff7611194b00ebec5ff66aa.tar.xz
bugs-f35caa4adb4ae31c5ff7611194b00ebec5ff66aa.zip
Bug 159901 - token.cgi: localize strings send to message.html.tmpl. Patch by burnus; r=gerv.
-rw-r--r--template/en/default/account/email/confirm.html.tmpl1
-rw-r--r--template/en/default/account/password/set-forgotten-password.html.tmpl1
-rw-r--r--template/en/default/global/messages.html.tmpl17
-rwxr-xr-xtoken.cgi16
4 files changed, 23 insertions, 12 deletions
diff --git a/template/en/default/account/email/confirm.html.tmpl b/template/en/default/account/email/confirm.html.tmpl
index 0b1ea5334..8cc6e1040 100644
--- a/template/en/default/account/email/confirm.html.tmpl
+++ b/template/en/default/account/email/confirm.html.tmpl
@@ -23,6 +23,7 @@
# token: string. The token to be used in this address change.
#%]
+[% title = "Confirm Change Email" %]
[% PROCESS global/header.html.tmpl %]
<p>
diff --git a/template/en/default/account/password/set-forgotten-password.html.tmpl b/template/en/default/account/password/set-forgotten-password.html.tmpl
index eaabf7dc4..cf4af8bda 100644
--- a/template/en/default/account/password/set-forgotten-password.html.tmpl
+++ b/template/en/default/account/password/set-forgotten-password.html.tmpl
@@ -19,6 +19,7 @@
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
+[% title = "Change Password" %]
[% PROCESS global/header.html.tmpl %]
<p>
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl
index 2cc25e0c5..6b12111a4 100644
--- a/template/en/default/global/messages.html.tmpl
+++ b/template/en/default/global/messages.html.tmpl
@@ -40,6 +40,23 @@
The cookie that was remembering your login is now gone. You will be
prompted for a login the next time it is required.
+ [% ELSIF message_tag == "login_changed" %]
+ [% title = "Bugzilla Login Changed" %]
+ Your Bugzilla login has been changed.
+
+ [% ELSIF message_tag == "password_changed" %]
+ [% title = "Password Changed" %]
+ Your password has been changed.
+
+ [% ELSIF message_tag == "password_change_canceled"
+ [% title = "Cancel Request to Change Password" %]
+ Your request has been cancelled.
+
+ [% ELSIF message_tag == "password_change_request" %]
+ [% title = "Request to Change Password" %]
+ A token for changing your password has been emailed to you.
+ Follow the instructions in that email to change your password.
+
[% ELSE %]
[%# Cope with legacy calling convention, where "message" was the string
# to print.
diff --git a/token.cgi b/token.cgi
index 72406223f..2225e4f8b 100755
--- a/token.cgi
+++ b/token.cgi
@@ -172,10 +172,7 @@ exit;
sub requestChangePassword {
Token::IssuePasswordToken($::FORM{'loginname'});
- $vars->{'title'} = "Request to Change Password";
- $vars->{'message'} = "A token for changing your password has been
- emailed to you. Follow the instructions in
- that email to change your password.";
+ $vars->{'message'} = "password_change_request";
print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars)
@@ -183,7 +180,6 @@ sub requestChangePassword {
}
sub confirmChangePassword {
- $vars->{'title'} = "Change Password";
$vars->{'token'} = $::token;
print "Content-Type: text/html\n\n";
@@ -194,8 +190,7 @@ sub confirmChangePassword {
sub cancelChangePassword {
Token::Cancel($::token, "user requested cancellation");
- $vars->{'title'} = "Cancel Request to Change Password";
- $vars->{'message'} = "Your request has been cancelled.";
+ $vars->{'message'} = "password_change_canceled";
print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars)
@@ -222,8 +217,7 @@ sub changePassword {
InvalidateLogins($userid);
- $vars->{'title'} = "Password Changed";
- $vars->{'message'} = "Your password has been changed.";
+ $vars->{'message'} = "password_changed";
print "Content-Type: text/html\n\n";
$template->process("global/message.html.tmpl", $vars)
@@ -234,7 +228,6 @@ sub confirmChangeEmail {
# Return HTTP response headers.
print "Content-Type: text/html\n\n";
- $vars->{'title'} = "Confirm Change Email";
$vars->{'token'} = $::token;
$template->process("account/email/confirm.html.tmpl", $vars)
@@ -279,8 +272,7 @@ sub changeEmail {
# Let the user know their email address has been changed.
- $vars->{'title'} = "Bugzilla Login Changed";
- $vars->{'message'} = "Your Bugzilla login has been changed.";
+ $vars->{'message'} = "login_changed";
$template->process("global/message.html.tmpl", $vars)
|| ThrowTemplateError($template->error());