Enabling use of dict-translation %(key)s
This commit is contained in:
parent
f294caf3e3
commit
bc2c85b400
1 changed files with 2 additions and 1 deletions
|
|
@ -8,7 +8,8 @@ wn._ = function(txt, replace) {
|
|||
if(typeof(txt) != "string") return txt;
|
||||
preformat = wn._messages[txt.replace(/\n/g, "")] || txt;
|
||||
if(!replace) return preformat;
|
||||
return vsprintf(preformat, replace);
|
||||
if(replace instanceof Array) return vsprintf(preformat, replace);
|
||||
return repl(preformat, replace);
|
||||
};
|
||||
wn.translate = function(obj, keys) {
|
||||
$.each(keys, function(i, key) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue