fix: NaN in /fires 'active fires in map' count (react-i18next 14 <Trans>)

react-i18next 14 reserves `count` as the pluralization variable and no
longer interpolates it from a <Trans> object child, so <strong>{{count:N}}</strong>
left {{count,number}} unresolved -> the number formatter ran on undefined ->
"NaN". (t() and the countTotal var were unaffected; regression from the
i18next 10->23 / react-i18next 7->14 bump.)

Renamed the variable count -> inMap in FiresMap.js and in the
activeFireInMapCount value of the es/en/gl locales (the string has no plural
forms, so count was only an unlucky name). Browser-verified: /fires now shows
the real count; home/zones/fire-detail render with no real errors. REST smoke
byte-identical.
This commit is contained in:
vjrj 2026-07-21 13:45:59 +02:00
parent 6e28bf3545
commit 5661e129fb
4 changed files with 4 additions and 4 deletions

View file

@ -73,7 +73,7 @@
"noActiveFireInMapCount":
"There are no active fires in this area of the map. <1><0>{{countTotal}}</0></1> active fires worldwide.",
"activeFireInMapCount":
"Marked in red <1><0>{{count,number}}</0></1> active fires. <3><0>{{countTotal,number}} </0></3> active fires worldwide.",
"Marked in red <1><0>{{inMap,number}}</0></1> active fires. <3><0>{{countTotal,number}} </0></3> active fires worldwide.",
"activeNeigFireInMapCount": "In Orange, the fires recently reported by our users.",
"Centrar en tu ubicación": "Center on your location",
"Resaltar en verde el área vigilada por nuestros usuarios/as": "Highlight in green the area monitored by our users",