case 4377
This commit is contained in:
@@ -98,11 +98,12 @@ function ayRegisterHelpers() {
|
||||
|
||||
Handlebars.registerHelper("ayT", function (translationKey) {
|
||||
if (ayTranslationKeyCache[translationKey] == undefined) {
|
||||
throw `ayT reporting helper error: the key "${translationKey}" is not present in the translation cache, did you forget to include it in your call to "await ayGetTranslations(['ExampleTranslationKey1','ExampleTranslationKey2','etc']);" in ayPrepareData()\nTranslationKeyCache contains: ${JSON.stringify(
|
||||
ayTranslationKeyCache,
|
||||
null,
|
||||
3
|
||||
)}?`;
|
||||
return `**Error: "${translationKey}" translation key not cached or unknown**`;
|
||||
// throw `ayT reporting helper error: the key "${translationKey}" is not present in the translation cache, did you forget to include it in your call to "await ayGetTranslations(['ExampleTranslationKey1','ExampleTranslationKey2','etc']);" in ayPrepareData()\nTranslationKeyCache contains: ${JSON.stringify(
|
||||
// ayTranslationKeyCache,
|
||||
// null,
|
||||
// 3
|
||||
// )}?`;
|
||||
// return translationKey;
|
||||
}
|
||||
return ayTranslationKeyCache[translationKey];
|
||||
|
||||
Reference in New Issue
Block a user