[openstreetmap/openstreetmap-website] Update to i18n-js 4.x (PR #5811)

Tom Hughes notifications at github.com
Mon Mar 17 17:23:05 UTC 2025


@tomhughes commented on this pull request.



>  
   // '-' are replaced with '_' in https://github.com/eemeli/make-plural/tree/main/packages/plurals
   const pluralizer = plurals[locale.replace(/\W+/g, "_")] || plurals[locale.split("-")[0]];
   if (pluralizer) {
-    I18n.pluralization[locale] = (count) => [pluralizer(count), "other"];
+    OSM.i18n.pluralization.register(locale, I18n.useMakePlural({ pluralizer: locale }));

All updated.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5811#discussion_r1999287443
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5811/review/2691463598 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250317/8744c45a/attachment.htm>


More information about the rails-dev mailing list