[openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

Anton Khorev notifications at github.com
Mon Sep 23 15:35:23 UTC 2024


@AntonKhorev commented on this pull request.



> @@ -76,6 +85,15 @@
           <li><%= link_to t("layouts.copyright"), copyright_path, :class => "dropdown-item" %></li>
           <li><%= link_to t("layouts.help"), help_path, :class => "dropdown-item" %></li>
           <li><%= link_to t("layouts.about"), about_path, :class => "dropdown-item" %></li>
+          <li>
+            <% if current_user && current_user.id %>
+              <%= link_to(preferences_path) do %>
+                <%= render "shared/language_selector", :hoverable => true, :black => true, :classes => "dropdown-item", :disabled => true %>

`dropdown-item` here doesn't entirely work, and possibly other Bootstrap classes either don't work as expected or are missing. Some related odd behavior of language link/label:

- not logged in, no compact mode: no focus outline
- not logged in, compact mode: same + keyboard up/down controls stop working correctly
- logged in, no compact mode: focus outline is present but non-standard because no `nav-link`, but if you add it you'll need more css fixes
- logged in, compact mode: keyboard controls also not working correctly, in a slightly different manner

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

Message ID: <openstreetmap/openstreetmap-website/pull/5201/review/2322665130 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240923/48657ab4/attachment.htm>


More information about the rails-dev mailing list