[openstreetmap/openstreetmap-website] Notifier message pluralization (#2431)

Andy Allan notifications at github.com
Wed Apr 15 16:28:18 UTC 2020


> Aside from the fact that it won't work? It's trying to pluralise but that only works if the variable is called `count` and neither variable here is called that.

The `:count` is being passed, and the pluralisation will be triggered, even though `%{count}` doesn't appear in the string itself. 

I think this is a neat workaround to avoid changing the parameter names in the existing strings.

> The core problem that is that there are two numeric variables here and either one could be singular or plural but pluralisation only supports a single controlling variable.

Yes, this is a limitation. I've done some research and found very little on the topic ([1](https://stackoverflow.com/questions/24303896/i18n-pluralization-of-a-sentence-with-few-counts) [2](https://stackoverflow.com/questions/45199525/rails-5-can-you-pluralize-two-words-in-a-string-with-two-different-counts)). But I think that in many cases, there only needs to be one noun to pluralise, and so I think we're better off merging this as-is, rather than waiting for perfection.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2431#issuecomment-614142346
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200415/22b8cdcd/attachment.htm>


More information about the rails-dev mailing list