mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Add coffeescript back in
This commit is contained in:
21
common/script/content/translation.js
Normal file
21
common/script/content/translation.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
require('coffee-script');
|
||||
var i18n = require('../i18n.coffee');
|
||||
|
||||
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;
|
||||
Reference in New Issue
Block a user