[openstreetmap/openstreetmap-website] Apply lang attribute to localized name:* values (#6834) (PR #6854)
Pablo Brasero
notifications at github.com
Tue Mar 10 10:22:57 UTC 2026
@pablobm commented on this pull request.
> + <%= content_tag :td,
+ format_value(tag[0], tag[1]),
+ :class => "py-1 border-secondary-subtle border-start",
+ :dir => "auto",
+ :lang => lang %>
This (and the previous line with the regexp) should be moved to a helper. It's important to keep complex logic out of view templates. Perhaps the existing `BrowseTagsHelper` is the best place?
When that's done, the test can be simplified. Currently it's doing `render :partial => ...`, which not only is a bit indirect, but also could be placed in any test! It's not really in the realm of `test/helpers/browse_helper_test.rb` as it is now. With this code moved to a helper, you should be able to call the helper directly from the test.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6854#pullrequestreview-3921327133
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6854/review/3921327133 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260310/085bbf97/attachment-0001.htm>
More information about the rails-dev
mailing list