From 7666f927b56d525234d77bf92731a016c4df2216 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Tue, 1 Dec 2020 11:45:02 -0500 Subject: [PATCH] Fix an issue with fallback preset strings --- modules/core/localizer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index 46e0c89b2..087d075f4 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -239,7 +239,8 @@ export function coreLocalizer() { * @param {string?} locale locale to use (defaults to currentLocale) * @return {string?} localized string */ - localizer.tInfo = function(stringId, replacements, locale) { + localizer.tInfo = function(origStringId, replacements, locale) { + let stringId = origStringId; let scopeId = 'general'; @@ -317,7 +318,7 @@ export function coreLocalizer() { if (index >= 0 && index < _localeCodes.length - 1) { // eventually this will be 'en' or another locale with 100% coverage let fallback = _localeCodes[index + 1]; - return localizer.tInfo(stringId, replacements, fallback); + return localizer.tInfo(origStringId, replacements, fallback); } if (replacements && 'default' in replacements) { @@ -328,7 +329,7 @@ export function coreLocalizer() { }; } - const missing = `Missing ${locale} translation: ${stringId}`; + const missing = `Missing ${locale} translation: ${origStringId}`; if (typeof console !== 'undefined') console.error(missing); // eslint-disable-line return {