luci-base: fix translation issues
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Sun, 11 Nov 2018 06:24:18 +0000 (15:24 +0900)
committerINAGAKI Hiroshi <musashino.open@gmail.com>
Sun, 11 Nov 2018 06:24:18 +0000 (15:24 +0900)
Fixed several issues for translation.

- add translation markup to "Expecting "
- add missing ")" into "valid time (HH:MM:SS"

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
modules/luci-base/htdocs/luci-static/resources/cbi.js

index 1c2b14df6985cc80996023604dae127e087d096b..0230ae9fa0078bef1988be99820e75c716c1664a 100644 (file)
@@ -243,7 +243,7 @@ var CBIValidatorPrototype = {
                        valid = this.vstack[0].apply(this, this.vstack[1]);
 
                if (!valid) {
-                       this.field.setAttribute('data-tooltip', 'Expecting ' + this.error);
+                       this.field.setAttribute('data-tooltip', _('Expecting %s').format(this.error));
                        this.field.setAttribute('data-tooltip-style', 'error');
                        this.field.dispatchEvent(new CustomEvent('validation-failure', { bubbles: true }));
                }
@@ -530,7 +530,7 @@ var CBIValidatorPrototype = {
 
                timehhmmss: function() {
                        return this.assert(this.value.match(/^[0-6][0-9]:[0-6][0-9]:[0-6][0-9]$/),
-                               _('valid time (HH:MM:SS'));
+                               _('valid time (HH:MM:SS)'));
                },
 
                dateyyyymmdd: function() {