Skip to content

Commit

Permalink
Removed workaround for unlocalized date formats
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 authored Aug 25, 2024
1 parent 846e2f2 commit cb779ea
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions modules/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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;
}


Expand Down

0 comments on commit cb779ea

Please sign in to comment.