mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-18 11:48:52 +00:00
fix(i18n): super fast fix for i18n issues, REVISIT, cc @lefnire
This commit is contained in:
parent
0d1d53fff6
commit
f1e1ea11ef
1 changed files with 1 additions and 2 deletions
|
|
@ -14,11 +14,10 @@ module.exports =
|
|||
locale = arguments[2]
|
||||
|
||||
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]
|
||||
|
||||
if string
|
||||
if vars then _.template(string, vars) else string
|
||||
_.template(string, (vars or {}))
|
||||
else
|
||||
stringNotFound = if (!module.exports.strings) then module.exports.translations[locale].stringNotFound else module.exports.strings.stringNotFound
|
||||
_.template(stringNotFound, {string: stringName})
|
||||
Loading…
Reference in a new issue