PPLR maps: the ready counts use the library's count formatter
Two status lines formatted their counts with an inline en-US; they now call formatCount, the one place counts are formatted (fixed en-US while numerals are held for the Driver), so the only remaining LOC-ENUS site is the library's own.
This commit is contained in:
parent
a9e742697d
commit
af93cfb651
2 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<script setup>
|
||||
import { dataUrl, glFor, exposeMap, whenGeojsonDrawn } from '../utils/pplrData.js'
|
||||
import { usePplrT } from '../composables/usePplrT.js'
|
||||
import { formatCount } from '@map/utils/formatCount.js' // counts stay fixed en-US: numerals are held for the Driver
|
||||
import { tStatic } from '@map/i18n/index.js'
|
||||
/**
|
||||
* pplr-coverage.vue — Country choropleth: avg # of locales filled per PG in that country.
|
||||
|
|
@ -126,7 +127,7 @@ onMounted(async () => {
|
|||
new (glFor(map.value)).Popup({ maxWidth: '320px' })
|
||||
.setLngLat(f.geometry.coordinates).setHTML(popupForPG(f.properties)).addTo(map.value)
|
||||
})
|
||||
status.value = t('pplr.status.readyCoverage', { countries: countryStats.size, rows: [...countryStats.values()].reduce((n, c) => n + c.pgCount, 0).toLocaleString('en-US') })
|
||||
status.value = t('pplr.status.readyCoverage', { countries: countryStats.size, rows: formatCount([...countryStats.values()].reduce((n, c) => n + c.pgCount, 0)) })
|
||||
// keep the LoadingGlobe up until the pins are actually drawn, not merely added
|
||||
await whenGeojsonDrawn(map.value)
|
||||
dataReady.value = true
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
import { inject, onMounted, onBeforeUnmount, ref } from 'vue'
|
||||
import { glFor, exposeMap, whenGeojsonDrawn } from '../utils/pplrData.js'
|
||||
import { usePplrT } from '../composables/usePplrT.js'
|
||||
import { formatCount } from '@map/utils/formatCount.js' // counts stay fixed en-US: numerals are held for the Driver
|
||||
import { tStatic } from '@map/i18n/index.js'
|
||||
import { useMapInstance } from '@map/composables/useMapInstance.js'
|
||||
import { addCountryPolygons, addPGPoints, popupForPG, POPUP_CSS } from '../utils/pplrMap.js'
|
||||
|
|
@ -58,7 +59,7 @@ onMounted(async () => {
|
|||
.setHTML(popupForPG(f.properties))
|
||||
.addTo(map.value)
|
||||
})
|
||||
status.value = t('pplr.status.readyPins', { pins: fc.features.length.toLocaleString('en-US') })
|
||||
status.value = t('pplr.status.readyPins', { pins: formatCount(fc.features.length) })
|
||||
// keep the LoadingGlobe up until the pins are actually drawn, not merely added
|
||||
await whenGeojsonDrawn(map.value)
|
||||
dataReady.value = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue