[openstreetmap/openstreetmap-website] Source of translations of future dates (Issue #5769)

Minh Nguyễn notifications at github.com
Thu Mar 13 23:22:53 UTC 2025


1ec5 left a comment (openstreetmap/openstreetmap-website#5769)

Are rails-i18n and homegrown translation strings the only options for formatting dates? On the client side, JavaScript has [a robust API for formatting relative dates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat) according to a given locale. It’s powered by CLDR, which is the industry standard for this sort of thing. If we can find a Rails library that pulls data from CLDR, then we don’t need to burden translators with every permutation that their language doesn’t need. Or we could leave it as an absolute timestamp and rely on JavaScript to relativize it on the fly.

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

Message ID: <openstreetmap/openstreetmap-website/issues/5769/2722906195 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250313/9a8b5b17/attachment-0001.htm>


More information about the rails-dev mailing list