[openstreetmap/openstreetmap-website] Traces: Migrate list to bootstrap (#3036)
mmd
notifications at github.com
Mon Jan 4 20:14:45 UTC 2021
@mmd-osm commented on this pull request.
>
- <% badge_class = case trace.visibility
- when "public", "identifiable" then "success"
- else "danger"
- end %>
- <span class="badge badge-<%= badge_class %> text-white"><%= t(".#{trace.visibility}") %></span>
+ <p class="mb-0 text-muted" title="<%= trace.timestamp %>">
+ <%= time_ago_in_words(trace.timestamp, :scope => :'datetime.distance_in_words_ago') %>
+ <%= t ".by" %> <%= link_to trace.user.display_name, user_path(trace.user) %>
+ <% if trace.tags.present? %>
+ <%= t ".in" %>
+ <%= safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %>
+ <% end %>
This bit here looks like a Lego-style translation, as it translates the text word by word. Obviously I can't tell if that's causing some issue for any of the ~97 languages we support.
Typically you would define one locale string that includes multiple variables and let the translators figure out what the proper text would be in their language.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3036#pullrequestreview-561312806
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210104/ac644771/attachment.htm>
More information about the rails-dev
mailing list