[openstreetmap/openstreetmap-website] Use Date().toLocaleString() to construct month titles (PR #5834)
Anton Khorev
notifications at github.com
Fri Mar 21 13:13:33 UTC 2025
In some languages month names when used inside dates may differ from month names when used alone as titles. `OSM.i18n.t("date.abbr_month_names")` gives you month names for dates. That doesn't work with calendar month titles.
Example in Russian:
"May" = "май"
"21 May, 2024" = "21 мая 2024"
You don't want "мая" as a title, you want "май".
Before:

After:

You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5834
-- Commit Summary --
* Use Date().toLocaleString() to construct month titles
-- File Changes --
M app/assets/javascripts/heatmap.js (3)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5834.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5834.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5834
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5834 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250321/0660a06a/attachment.htm>
More information about the rails-dev
mailing list