[openstreetmap/openstreetmap-website] More avoiding using raw html in translations (PR #3986)
Andy Allan
notifications at github.com
Thu Mar 23 10:08:28 UTC 2023
This PR continues the work of removing raw html from our translations.
I noticed as part of this a couple of issues with our timestamps (not withstanding #631):
* We are using `abbr` tags, but these aren't abbreviations. This could confuse screenreaders etc.
* We are inconsistent with how we display the timestamps. Sometimes we use the `friendly_date_ago` helper, which wraps the timestamp in a `span` with a title, and that is then wrapped again in an `abbr` with another, slightly different, title. Sometimes we just have one level of wrapping, in the `abbr` alone.
* This inconsistency means that the titles shown by browsers are also inconsistent - sometimes they are rounded to the nearest minute (friendly dates) and other times are to the second with `+00:00` timezones shown.
In this PR I made no attempt to address these issues, instead keeping everything exactly as it was previously. But I thought I should mention it here anyway, since wrapping `friendly_date_ago` looks a bit strange.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3986
-- Commit Summary --
* Avoid using raw html in translations on the about page
* Avoid using raw html in translations for the issues index
* Avoid raw html in translations for changeset comments
* Rework browse pages to avoid raw html in translations
-- File Changes --
M app/helpers/changesets_helper.rb (10)
M app/views/browse/_common_details.html.erb (8)
M app/views/browse/changeset.html.erb (12)
M app/views/issues/index.html.erb (10)
M app/views/site/about.html.erb (41)
M config/locales/en.yml (76)
M test/helpers/changesets_helper_test.rb (4)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3986.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3986.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3986
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3986 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230323/9f30c2d2/attachment.htm>
More information about the rails-dev
mailing list