summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/comment-tagging.js10
-rw-r--r--template/en/default/bug/edit.html.tmpl7
2 files changed, 14 insertions, 3 deletions
diff --git a/js/comment-tagging.js b/js/comment-tagging.js
index 987dfd8da..f488000e1 100644
--- a/js/comment-tagging.js
+++ b/js/comment-tagging.js
@@ -20,6 +20,10 @@ YAHOO.bugzilla.commentTagging = {
can_edit : false,
pending : {},
+ label : '',
+ min_len_error: '',
+ max_len_error: '',
+
init : function(can_edit) {
this.can_edit = can_edit;
this.ctag_div = Dom.get('bz_ctag_div');
@@ -185,7 +189,7 @@ YAHOO.bugzilla.commentTagging = {
tags.sort();
if (tags.length) {
var div = document.createElement('div');
- div.appendChild(document.createTextNode('Comment Tags:'));
+ div.appendChild(document.createTextNode(this.label));
var ul = document.createElement('ul');
ul.id = 'comment_tags_collapse_expand';
div.appendChild(ul);
@@ -260,9 +264,9 @@ YAHOO.bugzilla.commentTagging = {
if (tag == '')
continue;
if (tag.length < YAHOO.bugzilla.commentTagging.min_len)
- throw new Error("Comment tags must be at least " + this.min_len + " characters.");
+ throw new Error(this.min_len_error)
if (tag.length > YAHOO.bugzilla.commentTagging.max_len)
- throw new Error("Comment tags cannot be longer than " + this.min_len + " characters.");
+ throw new Error(this.max_len_error)
// append new tag
if (bz_isValueInArrayIgnoreCase(tags, tag))
continue;
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 6917a89ec..ca0e771e0 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -29,6 +29,13 @@
YAHOO.bugzilla.commentTagging.init([% user.can_tag_comments ? 'true' : 'false' %]);
YAHOO.bugzilla.commentTagging.min_len = [% constants.MIN_COMMENT_TAG_LENGTH FILTER js %];
YAHOO.bugzilla.commentTagging.max_len = [% constants.MAX_COMMENT_TAG_LENGTH FILTER js %];
+ YAHOO.bugzilla.commentTagging.label = 'Comment Tags:';
+ YAHOO.bugzilla.commentTagging.min_len_error =
+ 'Comment tags must be at least
+ [%~ " " _ constants.MIN_COMMENT_TAG_LENGTH FILTER js %] characters.';
+ YAHOO.bugzilla.commentTagging.max_len_error =
+ 'Comment tags cannot be longer than
+ [%~ " " _ constants.MAX_COMMENT_TAG_LENGTH FILTER js %] characters.';
</script>
[% END %]
[% END %]