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

@ -115,7 +115,7 @@
"noActiveFireInMapCount":
"No hay fuegos activos en esta zona del mapa. <1><0>{{countTotal}}</0></1> fuegos activos en el mundo.",
"activeFireInMapCount":
"En rojo, <1><0>{{count,number}}</0></1> fuegos activos. <3><0>{{countTotal,number}}</0></3> fuegos activos en el mundo.",
"En rojo, <1><0>{{inMap,number}}</0></1> fuegos activos. <3><0>{{countTotal,number}}</0></3> fuegos activos en el mundo.",
"activeNeigFireInMapCount":
"En naranja, los fuegos notificados por nuestros usuarios/as recientemente.",
"Centrar en tu ubicación":