Fix i18n of timer options
It is important to return something falsey in the case where there is no translation. // FREEBIE
This commit is contained in:
parent
590284e4cb
commit
75dbc27cfa
1 changed files with 4 additions and 1 deletions
|
@ -5,7 +5,10 @@
|
|||
'use strict';
|
||||
var json = window.env.locale_json;
|
||||
window.i18n = function (message, substitutions) {
|
||||
var s = json[message] ? json[message].message : message;
|
||||
if (!json[message]) {
|
||||
return;
|
||||
}
|
||||
var s = json[message].message;
|
||||
if (substitutions instanceof Array) {
|
||||
substitutions.forEach(function(sub) {
|
||||
s = s.replace(/\$.+?\$/, sub);
|
||||
|
|
Loading…
Reference in a new issue