[openstreetmap/openstreetmap-website] Changeset comments have individual links, but no button to grab them with (#2796)
Máté Gyöngyösi
notifications at github.com
Fri Apr 19 21:35:39 UTC 2024
As far as I understand the `.comment_by_html` translations should be changed in all ~90 languages from [`"Comment from %{user} %{time_ago}"`](https://github.com/openstreetmap/openstreetmap-website/blob/29020530a8fabe1d02e3bc9c41970c9030efc380/config/locales/en.yml#L476) to something like `"%{comment} from %{user} %{time_ago}"`¹ in order to be able to send the _Comment_ word as a preformatted link from [here](https://github.com/openstreetmap/openstreetmap-website/blob/29020530a8fabe1d02e3bc9c41970c9030efc380/app/views/changesets/show.html.erb#L35) somehow like this:
```ruby
<%= t comment.visible ? ".comment_by_html" : ".hidden_comment_by_html",
:comment => link_to(xxxxxx, "https://www.openstreetmap.org/changeset/#{changeset.id}##{comment.id}"),
:time_ago => friendly_date_ago(comment.created_at),
:user => link_to(comment.author.display_name, comment.author) %>
```
¹ It's difficult because the word _Comment_ should still be translated in each language, so somehow it should keep the translations _and_ add links to them.
All in all, this seems a bit more complicated to me than a _good first issue_.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2796#issuecomment-2067311059
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/2796/2067311059 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240419/fe17f68c/attachment.htm>
More information about the rails-dev
mailing list