Ignore untranslated legacy widget copy
This commit is contained in:
@@ -1117,7 +1117,7 @@ function normalizeWidgetCopy(value, settings = {}) {
|
|||||||
for (const language of legacyLanguages) {
|
for (const language of legacyLanguages) {
|
||||||
const lang = allowedWidgetLanguage(language);
|
const lang = allowedWidgetLanguage(language);
|
||||||
if (!lang) continue;
|
if (!lang) continue;
|
||||||
copy[lang] = {
|
const legacyCopy = {
|
||||||
...(copy[lang] || {}),
|
...(copy[lang] || {}),
|
||||||
title: settings.title?.[lang],
|
title: settings.title?.[lang],
|
||||||
intro: settings.intro?.[lang],
|
intro: settings.intro?.[lang],
|
||||||
@@ -1125,6 +1125,8 @@ function normalizeWidgetCopy(value, settings = {}) {
|
|||||||
placeholder: settings.placeholder?.[lang],
|
placeholder: settings.placeholder?.[lang],
|
||||||
sendLabel: settings.sendLabel?.[lang]
|
sendLabel: settings.sendLabel?.[lang]
|
||||||
};
|
};
|
||||||
|
if (lang !== "cs" && lang !== "en" && widgetCopyLooksUntranslated(defaultWidgetCopy("cs"), normalizeWidgetCopyEntry(legacyCopy, lang))) continue;
|
||||||
|
copy[lang] = legacyCopy;
|
||||||
}
|
}
|
||||||
copy.cs = normalizeWidgetCopyEntry(copy.cs || defaultWidgetCopy("cs"), "cs");
|
copy.cs = normalizeWidgetCopyEntry(copy.cs || defaultWidgetCopy("cs"), "cs");
|
||||||
copy.en = normalizeWidgetCopyEntry(copy.en || defaultWidgetCopy("en"), "en");
|
copy.en = normalizeWidgetCopyEntry(copy.en || defaultWidgetCopy("en"), "en");
|
||||||
|
|||||||
Reference in New Issue
Block a user