From cb779eaab264b71e30c117ddcbe98eb770190d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sun, 25 Aug 2024 03:36:35 -0700 Subject: [PATCH] Removed workaround for unlocalized date formats --- modules/util/util.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/modules/util/util.js b/modules/util/util.js index 7c27510589..9c53fca876 100644 --- a/modules/util/util.js +++ b/modules/util/util.js @@ -216,12 +216,7 @@ export function utilDisplayName(entity) { var localizedNameKey = 'name:' + localizer.languageCode().toLowerCase(); var name = entity.tags[localizedNameKey] || entity.tags.name || ''; if (name) { - /* eslint-disable-next-line no-warning-comments */ - // FIXME: Make this localizable again once we're set up for translation. - // https://github.com/OpenHistoricalMap/issues/issues/652 - // https://github.com/OpenHistoricalMap/issues/issues/470 - //return dateRange ? t('inspector.display_name.dated', {dateRange: dateRange, name: name}) : name; - return dateRange ? `${name} [${dateRange}]` : name; + return dateRange ? t('inspector.display_name.dated', {dateRange: dateRange, name: name}) : name; } var tags = { @@ -258,12 +253,7 @@ export function utilDisplayName(entity) { name = t('inspector.display_name.' + keyComponents.join('_'), tags); } - /* eslint-disable-next-line no-warning-comments */ - // FIXME: Make this localizable again once we're set up for translation. - // https://github.com/OpenHistoricalMap/issues/issues/652 - // https://github.com/OpenHistoricalMap/issues/issues/470 - //return name && dateRange ? t('inspector.display_name.dated', {dateRange: dateRange, name: name}) : name; - return dateRange ? `${name} [${dateRange}]` : name; + return name && dateRange ? t('inspector.display_name.dated', {dateRange: dateRange, name: name}) : name; }