habitica-self-host/common/script/content/translation.js

21 lines
336 B
JavaScript
Raw Normal View History

2015-10-03 11:39:10 +00:00
'use strict';
2015-11-12 02:32:00 +00:00
var i18n = require('../i18n');
2015-10-03 11:39:10 +00:00
var t = function(string, vars) {
var func = function(lang) {
if (vars == null) {
vars = {
a: 'a'
};
}
return i18n.t(string, vars, lang);
};
func.i18nLangFunc = true; // Trick to recognize this type of function
return func;
};
module.exports = t;