Move translator to helpers.js

This commit is contained in:
Blade Barringer
2015-09-21 17:35:27 -05:00
parent 0e6f563c1f
commit ad7e01d87e
44 changed files with 45 additions and 46 deletions

View File

@@ -0,0 +1,18 @@
require('coffee-script');
import i18n from '../../../script/i18n.coffee';
export function translator(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;
};