From a0eff70014eea25bd5bf45a2d609098b8663467e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Fri, 22 Mar 2024 22:31:06 -0700 Subject: [PATCH] Only load English as fallback localization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until we configure a translation management system, English is the only localization with complete coverage including OpenHistoricalMap’s custom strings. --- modules/core/localizer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index 2f4461b271..bcd9215f1e 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -120,7 +120,9 @@ export function coreLocalizer() { indexes.forEach((index, i) => { // Will always return the index for `en` if nothing else const fullCoverageIndex = _localeCodes.findIndex(function(locale) { - return index[locale] && index[locale].pct === 1; + // Only English contains everything including the OpenHistoricalMap additions, because we haven’t set up a translation management system yet. + // https://github.com/OpenHistoricalMap/issues/issues/470 + return locale === 'en' && index[locale] && index[locale].pct === 1; }); // We only need to load locales up until we find one with full coverage _localeCodes.slice(0, fullCoverageIndex + 1).forEach(function(code) {