diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 5920219ce4..44b51e3b14 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -9180,12 +9180,15 @@ moment = require('moment'); i18n = require('./i18n.coffee'); t = function(string, vars) { - return function(lang) { + var func; + func = function(lang) { if (vars == null) { vars = lang; } return i18n.t(string, vars, lang); }; + func.i18nLangFunc = true; + return func; }; diff --git a/script/content.coffee b/script/content.coffee index 476060d16d..4f8534bc6f 100644 --- a/script/content.coffee +++ b/script/content.coffee @@ -3,9 +3,11 @@ api = module.exports moment = require 'moment' i18n = require './i18n.coffee' t = (string, vars) -> - (lang) -> + func = (lang) -> vars ?= lang i18n.t(string, vars, lang) + func.i18nLangFunc = true #Trick to recognize this type of function + func ### ---------------------------------------------------------------