summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-04 15:28:47 +0100
committermkanat%bugzilla.org <>2009-12-04 15:28:47 +0100
commitbc19204d3dffa448b364bfa4b5691a24f39f6765 (patch)
tree1fa13715dc812d8e36240a85374a34b29248973a /template
parent9c623cb93101c9bb8bf8c0428ca66dd5f7fdc63d (diff)
downloadbugzilla-bc19204d3dffa448b364bfa4b5691a24f39f6765.tar.gz
bugzilla-bc19204d3dffa448b364bfa4b5691a24f39f6765.tar.xz
Bug 452919: Allow the "created an attachment" message in comments to be localized
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'template')
-rw-r--r--template/en/default/bug/format_comment.txt.tmpl13
-rw-r--r--template/en/default/bug/show.xml.tmpl3
-rw-r--r--template/en/default/global/code-error.html.tmpl17
-rw-r--r--template/en/default/global/user-error.html.tmpl4
4 files changed, 31 insertions, 6 deletions
diff --git a/template/en/default/bug/format_comment.txt.tmpl b/template/en/default/bug/format_comment.txt.tmpl
index 8e97d4d08..49ab95ad1 100644
--- a/template/en/default/bug/format_comment.txt.tmpl
+++ b/template/en/default/bug/format_comment.txt.tmpl
@@ -32,11 +32,6 @@
[% PROCESS 'global/variables.none.tmpl' %]
[% SET comment_body = comment.body %]
-[% IF is_bugmail %]
- [% comment_body = comment_body.replace( '(Created an attachment \(id=([0-9]+)\))',
- '$1' _ "\n" _ ' --> (' _ urlbase
- _ 'attachment.cgi?id=$2)' ) %]
-[% END %]
[% IF comment.type == constants.CMT_DUPE_OF %]
X[% comment_body %]
@@ -54,6 +49,14 @@ If the move succeeded, [% comment.extra_data %] will receive a mail containing
the number of the new [% terms.bug %] in the other database.
If all went well, please paste in a link to the new [% terms.bug %].
Otherwise, reopen this [% terms.bug %].
+[% ELSIF comment.type == constants.CMT_ATTACHMENT_CREATED %]
+Created attachment [% comment.extra_data %]
+[% IF is_bugmail %]
+ --> [% urlbase _ "attachment.cgi?id=" _ comment.extra_data %]
+[% END %]
+[%+ comment.attachment.description %]
+
+[%+ comment.body %]
[% ELSE %]
X[% comment_body %]
[% END %]
diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl
index 31e56d299..2349602dc 100644
--- a/template/en/default/bug/show.xml.tmpl
+++ b/template/en/default/bug/show.xml.tmpl
@@ -69,6 +69,9 @@
[% NEXT IF c.is_private && !user.is_insider %]
<long_desc isprivate="[% c.is_private FILTER xml %]">
<commentid>[% c.id FILTER xml %]</commentid>
+ [% IF c.is_about_attachment %]
+ <attachid>[% c.extra_data FILTER xml %]</attachid>
+ [% END %]
<who name="[% c.author.name FILTER xml %]">[% c.author.email FILTER email FILTER xml %]</who>
<bug_when>[% c.creation_ts FILTER time("%Y-%m-%d %T %z") FILTER xml %]</bug_when>
[% IF user.is_timetracker && (c.work_time - 0 != 0) %]
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl
index 09a1c4cf6..e851a00d9 100644
--- a/template/en/default/global/code-error.html.tmpl
+++ b/template/en/default/global/code-error.html.tmpl
@@ -120,6 +120,23 @@
without specifying a default or something for $set_nulls_to, because
there are NULL values currently in it.
+ [% ELSIF error == "comment_extra_data_not_allowed" %]
+ You tried to set the <code>extra_data</code> field to
+ '[% extra_data FILTER html %]' but comments of type [% type FILTER html %]
+ do not accept an <code>extra_data</code> argument.
+
+ [% ELSIF error == "comment_extra_data_required" %]
+ Comments of type [% type FILTER html %] require an <code>extra_data</code>
+ argument to be set.
+
+ [% ELSIF error == "comment_extra_data_not_numeric" %]
+ You tried to set the <code>extra_data</code> field to
+ '[% extra_data FILTER html %]' but comments of type [% type FILTER html %]
+ require a numeric <code>extra_data</code> argument.
+
+ [% ELSIF error == "comment_type_invalid" %]
+ '[% type FILTER html %]' is not a valid comment type.
+
[% ELSIF error == "db_rename_conflict" %]
Name conflict: Cannot rename [% old FILTER html %] to
[% new FILTER html %] because [% new FILTER html %] already exists.
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 144e2e7ea..c3e84c0ab 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1721,7 +1721,9 @@
[% PROCESS global/footer.html.tmpl %]
[% BLOCK object_name %]
- [% IF class == "Bugzilla::User" %]
+ [% IF class == "Bugzilla::Attachment" %]
+ attachment
+ [% ELSIF class == "Bugzilla::User" %]
user
[% ELSIF class == "Bugzilla::Component" %]
component