Merge branch 'develop' of github.com:HabitRPG/habitrpg-shared into common-convert

Conflicts:
	common/dist/scripts/habitrpg-shared.js
This commit is contained in:
Blade Barringer
2015-02-09 22:18:22 -06:00
128 changed files with 7976 additions and 7669 deletions

View File

@@ -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