|
|
@ -79,9 +79,13 @@ define(req, function(Default, Language) {
|
|
|
|
messages._getKey = function (key, argArray) {
|
|
|
|
messages._getKey = function (key, argArray) {
|
|
|
|
if (!messages[key]) { return '?'; }
|
|
|
|
if (!messages[key]) { return '?'; }
|
|
|
|
var text = messages[key];
|
|
|
|
var text = messages[key];
|
|
|
|
return text.replace(/\{(\d+)\}/g, function (str, p1) {
|
|
|
|
if (typeof(text) === 'string') {
|
|
|
|
return argArray[p1] || null;
|
|
|
|
return text.replace(/\{(\d+)\}/g, function (str, p1) {
|
|
|
|
});
|
|
|
|
return argArray[p1] || null;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return text;
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Add handler to the language selector
|
|
|
|
// Add handler to the language selector
|
|
|
|