summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-08-14 08:06:51 +0200
committerByron Jones <glob@mozilla.com>2014-08-14 08:06:51 +0200
commit34101e9b71fdda0ecde0db61c065677e3ef2b502 (patch)
tree3fe69614270baf860503c2311ea67634787e100a /js
parentd4eb36bd5b8b7ebd0c1fdd08b6dc4c17129b98c3 (diff)
downloadbugzilla-34101e9b71fdda0ecde0db61c065677e3ef2b502.tar.gz
bugzilla-34101e9b71fdda0ecde0db61c065677e3ef2b502.tar.xz
Bug 1047405: Comment tagging GUI not fully localizable because of text in Javascript instead of template
Diffstat (limited to 'js')
-rw-r--r--js/comment-tagging.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/comment-tagging.js b/js/comment-tagging.js
index 94afbb61a..c110eb00e 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');
@@ -189,7 +193,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);
@@ -264,9 +268,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;