[openstreetmap/openstreetmap-website] Incorrect translation choice time_ago for 24-25 hours ago (Issue #5878)
Andy Allan
notifications at github.com
Wed Apr 2 16:27:48 UTC 2025
gravitystorm left a comment (openstreetmap/openstreetmap-website#5878)
This is a problem in the `ru` (and perhaps other) translations. The translators have hard-coded the "specifically one" translation into the "numbers that behave like one" key:
```yaml
datetime:
distance_in_words_ago:
about_x_hours:
one: около часа назад
few: около %{count} часов назад
many: около %{count} часов назад
```
In Russian, the `one` key is also used for numbers like 21:
```ruby
I18n.with_locale("ru") do
helper.friendly_date_ago(Time.now - 21.hours)
end
=> "<time title=\" 1 апреля 2025 в 20:16\" datetime=\"2025-04-01T20:16:22+01:00\">около часа назад</time>"
```
Without being able to read or write Russian, and just using Google Translate, it might be possible to fix here:
> около 1 часа назад
> около 21 часа назад
So this translation could simply be updated to be "около %{count} часа назад". Can you confirm this would work grammatically?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5878#issuecomment-2773120137
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/5878/2773120137 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250402/782a78b0/attachment.htm>
More information about the rails-dev
mailing list