summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-07-27 05:39:14 +0200
committergerv%gerv.net <>2002-07-27 05:39:14 +0200
commite7cb77c38201a379f7a781e1acdd1355a472ad4d (patch)
tree2d73cda0bb78b34798679ca8d4a508b6f45a3574 /template/en
parentb9469415fc8d9fe25b153fcd48b0b4165e369809 (diff)
downloadbugzilla-e7cb77c38201a379f7a781e1acdd1355a472ad4d.tar.gz
bugzilla-e7cb77c38201a379f7a781e1acdd1355a472ad4d.tar.xz
Bug 106640 - allow translation of system messages. Patch by gerv; r=burnus.
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/global/code-error.html.tmpl36
-rw-r--r--template/en/default/global/user-error.html.tmpl33
2 files changed, 65 insertions, 4 deletions
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl
index 4b5ac2f67..64bf5064e 100644
--- a/template/en/default/global/code-error.html.tmpl
+++ b/template/en/default/global/code-error.html.tmpl
@@ -21,11 +21,43 @@
[%# INTERFACE:
# header_done: boolean. True if the header has already been printed.
- # error: string. The error message to be printed. May contain HTML.
+ # error: string. The tag of the error, or the error message to be displayed
+ # (deprecated). May contain HTML if it's an error message.
+ # title: string. If error is an error message, the title (deprecated.)
# variables: hash. Useful data about the problem. The keys are the variable
# names, and the values the variable values.
#%]
+[%# This is a list of all the possible code errors. Please keep them in
+ # alphabetical order by error tag, and leave a blank line between errors.
+ #%]
+
+[% DEFAULT title = "Internal Error" %]
+
+[% error_message = BLOCK %]
+ [% IF error == "aaa_example_error_tag" %]
+ [% title = "Example Error" %]
+ This is an example error. The title is set above. This text is the body
+ of the error. It can contain arbitrary <b>HTML</b>, and also references
+ to any [% parameters %] which you may have set before calling
+ ThrowCodeError.
+
+ [% ELSIF error == "another_error_tag" %]
+ This is another sample error, without a special title. This
+ should be the usual usage for this file. This sample can be removed.
+
+ [% ELSIF error == "template_error" %]
+ [% template_error_msg %]
+
+ [% ELSE %]
+ [%# Cope with legacy calling convention, where "error" was the string
+ # to print.
+ #%]
+
+ [% error %]
+ [% END %]
+[% END %]
+
[% UNLESS header_done %]
[% PROCESS global/header.html.tmpl %]
[% END %]
@@ -46,7 +78,7 @@
<tr>
<td bgcolor="#ff0000">
<font size="+2">
- [% error %]
+ [% error_message %]
</font>
</td>
</tr>
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index f24b5293f..b9654a135 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -21,9 +21,38 @@
[%# INTERFACE:
# header_done: boolean. True if the header has already been printed.
- # error: string. The error message to be displayed. May contain HTML.
+ # error: string. The tag of the error, or the error message to be displayed
+ # (deprecated). May contain HTML if it's an error message.
+ # title: string. If error is an error message, the title (deprecated.)
#%]
+
+[%# This is a list of all the possible user errors. Please keep them in
+ # alphabetical order by error tag, and leave a blank line between errors.
+ #%]
+
+[% DEFAULT title = "Error" %]
+[% error_message = BLOCK %]
+ [% IF error == "aaa_example_error_tag" %]
+ [% title = "Example Error" %]
+ This is an example error. The title is set above. This text is the body
+ of the error. It can contain arbitrary <b>HTML</b>, and also references
+ to any [% parameters %] which you may have set before calling
+ ThrowUserError.
+
+ [% ELSIF error == "another_error_tag" %]
+ [% title = "Another Error" %]
+ This is another sample error. It can be removed.
+
+ [% ELSE %]
+ [%# Cope with legacy calling convention, where "error" was the string
+ # to print.
+ #%]
+
+ [% error %]
+ [% END %]
+[% END %]
+
[% UNLESS header_done %]
[% PROCESS global/header.html.tmpl %]
[% END %]
@@ -32,7 +61,7 @@
<tr>
<td bgcolor="#ff0000">
<font size="+2">
- [% error %]
+ [% error_message %]
</font>
</td>
</tr>