mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Merge branch 'develop' of github.com:HabitRPG/habitrpg-shared into common-convert
Conflicts: common/dist/scripts/habitrpg-shared.js
This commit is contained in:
@@ -15,10 +15,13 @@ module.exports =
|
||||
|
||||
locale = 'en' if (!locale? or (!module.exports.strings and !module.exports.translations[locale]))
|
||||
string = if (!module.exports.strings) then module.exports.translations[locale][stringName] else module.exports.strings[stringName]
|
||||
|
||||
clonedVars = _.clone(vars) or {};
|
||||
clonedVars.locale = locale;
|
||||
|
||||
if string
|
||||
try
|
||||
_.template(string, (vars or {}))
|
||||
_.template(string, (clonedVars))
|
||||
catch e
|
||||
'Error processing string. Please report to http://github.com/HabitRPG/habitrpg.'
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user