Skip to content

Commit

Permalink
fix: metric localization wasn't getting pluralized properly
Browse files Browse the repository at this point in the history
  • Loading branch information
filipgutica committed Jul 8, 2024
1 parent e0656cd commit f58edae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ onMounted(() => {
const metric = props.countryMetrics[iso_a2]
if (metric !== undefined) {
// @ts-ignore - dynamic i18n key
const popupHtml = props.showTooltipValue ? `<strong>${admin}</strong>: ${approxNum(metric, { capital: true })} ${i18n.t(`metricUnits.${props.metricUnit}`, { plural: metric.length > 1 ? 's' : '' })}` : `<strong>${admin}</strong>`
const popupHtml = props.showTooltipValue ? `<strong>${admin}</strong>: ${approxNum(metric, { capital: true })} ${i18n.t(`metricUnits.${props.metricUnit}`, { plural: metric > 1 ? 's' : '' })}` : `<strong>${admin}</strong>`
popup.setLngLat(e.lngLat).setHTML(popupHtml).addTo(map.value as Map)
} else {
popup.remove()
Expand Down

0 comments on commit f58edae

Please sign in to comment.