mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-17 11:32:16 +00:00
Compiled coffeescript
This commit is contained in:
parent
cb4da8b91e
commit
e5e9f054d1
1 changed files with 4 additions and 2 deletions
6
dist/habitrpg-shared.js
vendored
6
dist/habitrpg-shared.js
vendored
|
|
@ -14424,7 +14424,7 @@ module.exports = {
|
|||
strings: null,
|
||||
translations: {},
|
||||
t: function(stringName) {
|
||||
var e, locale, string, stringNotFound, vars;
|
||||
var clonedVars, e, locale, string, stringNotFound, vars;
|
||||
vars = arguments[1];
|
||||
if (_.isString(arguments[1])) {
|
||||
vars = null;
|
||||
|
|
@ -14437,9 +14437,11 @@ module.exports = {
|
|||
locale = 'en';
|
||||
}
|
||||
string = !module.exports.strings ? module.exports.translations[locale][stringName] : module.exports.strings[stringName];
|
||||
clonedVars = _.clone(vars) || {};
|
||||
clonedVars.locale = locale;
|
||||
if (string) {
|
||||
try {
|
||||
return _.template(string, vars || {});
|
||||
return _.template(string, clonedVars);
|
||||
} catch (_error) {
|
||||
e = _error;
|
||||
return 'Error processing string. Please report to http://github.com/HabitRPG/habitrpg.';
|
||||
|
|
|
|||
Loading…
Reference in a new issue