[openstreetmap/openstreetmap-website] Avoid using html in translations (PR #3936)

Tom Hughes notifications at github.com
Wed Feb 22 10:31:43 UTC 2023


@tomhughes commented on this pull request.



> @@ -0,0 +1,14 @@
+<hr class="mb-3" />
+<a name="public"></a>
+<h2><%= t ".heading" %></h2>
+<p>
+  <%= t ".currently_not_public" %>
+  <strong><%= t ".only_public_can_edit" %></strong>
+  <%= t ".find_out_why_html", :link => link_to(t(".find_out_why"),
+                                               t(".find_out_why_url")) %>

I understand all that - my point was that what was previously a single piece of text is now three pieces. Sure it's not concatenated with `+` but three adjacent translation lookups in HTML amounts to the same thing.

So if you have a language where the "find out why" bit needs to be before the "only public can edit" bit for some reason you can no longer easily do that - you probably could just move the text from one translation to the other but people aren't going to realise that.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3936#discussion_r1114136359
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3936/review/1308959284 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230222/233e6216/attachment-0001.htm>


More information about the rails-dev mailing list