mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Merge pull request #4873 from gisikw/repair_broken_test_suite
Repair Broken Test Suite - Full Passing Tests
This commit is contained in:
12
common/dist/scripts/habitrpg-shared.js
vendored
12
common/dist/scripts/habitrpg-shared.js
vendored
@@ -4889,7 +4889,11 @@ module.exports = {
|
||||
if ((locale == null) || (!module.exports.strings && !module.exports.translations[locale])) {
|
||||
locale = 'en';
|
||||
}
|
||||
string = !module.exports.strings ? module.exports.translations[locale][stringName] : module.exports.strings[stringName];
|
||||
if (module.exports.strings) {
|
||||
string = module.exports.strings[stringName];
|
||||
} else {
|
||||
string = module.exports.translations[locale] && module.exports.translations[locale][stringName];
|
||||
}
|
||||
clonedVars = _.clone(vars) || {};
|
||||
clonedVars.locale = locale;
|
||||
if (string) {
|
||||
@@ -4900,7 +4904,11 @@ module.exports = {
|
||||
return 'Error processing string. Please report to http://github.com/HabitRPG/habitrpg.';
|
||||
}
|
||||
} else {
|
||||
stringNotFound = !module.exports.strings ? module.exports.translations[locale].stringNotFound : module.exports.strings.stringNotFound;
|
||||
if (module.exports.strings) {
|
||||
stringNotFound = module.exports.strings.stringNotFound;
|
||||
} else if (module.exports.translations[locale]) {
|
||||
stringNotFound = module.exports.translations[locale] && module.exports.translations[locale].stringNotFound;
|
||||
}
|
||||
try {
|
||||
return _.template(stringNotFound, {
|
||||
string: stringName
|
||||
|
||||
Reference in New Issue
Block a user