gravitystorm left a comment (openstreetmap/openstreetmap-website#5878)

> * "yesterday" instead of "%{count} day ago"

Those are incorrect, and they should be converted to be "1 day ago" (or "one 
day ago" at least). The  `x_days` key is used with `:count => 1` [for 24...42 
hours 
ago](https://github.com/rails/rails/blob/3235827585d87661942c91bc81f64f56d710f0b2/actionview/lib/action_view/helpers/date_helper.rb#L126C1-L127C72).
 When a changeset was closed 36 or 41 hours ago, that might not have been 
"yesterday".

It makes our site look bad (and it makes us developers look like we can't do 
maths, or that we suck at i18n) if it's April 3rd and a changeset was closed on 
April 1st but the site displays "wczoraj".

> * "1" instead of "%{count}"
> * "one" instead of "%{count}"
>       Example: `{{PLURAL|one=vor einem Tag|vor %{count} Tagen}}`

In theory these are fine, so long as it's a language where `:one` == `:1` (like 
German, French etc). But if we allow this, we'll need to maintain a list of 
languages where this is not correct (Polish, Russian, etc). Perhaps we can 
extract this information from CLDR?

Note that we can't do "1" or "one" in `en.yml`, otherwise translatewiki won't 
allow `:count` as a placeholder for the `:one` key in other languages. So in 
`en.yml` we must use `%{count}` for all values.

> * nothing instead of "%{count}", probably in languages without indefinite 
> article

That's interesting, do you have examples? I wonder if these languages just have 
a choice between saying "day ago" vs "1 day ago" or whether they strictly can't 
use the number. I understand that "day ago" instead of "a day ago" is common, 
but I haven't found if there are languages where you can't use a number 1 with 
a noun.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5878#issuecomment-2775907242
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/issues/5878/2775907...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to