Skip to content

Commit f216e7a

Browse files
committed
Highlight the currently selected locale instead of hiding it.
I found the current behavior a bit confusing when working on #2960. I think it's pretty weird to select a locale, and then have it disappear from the list. Now, we highlight the current locale in blue.
1 parent 2e70711 commit f216e7a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

WcaOnRails/app/views/layouts/_navigation.html.erb

+5-7
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@
9292
</a>
9393
<ul class="dropdown-menu countries" role="menu">
9494
<% Locales::AVAILABLE.each do |l, data| %>
95-
<% unless l == I18n.locale %>
96-
<li>
97-
<%= link_to update_locale_path(l), method: :patch do %>
98-
<%= flag_icon data[:flag_id] %> <%= data[:name] %>
99-
<% end %>
100-
</li>
101-
<% end %>
95+
<li class="<%= l == I18n.locale ? "active" : "" %>">
96+
<%= link_to update_locale_path(l), method: :patch do %>
97+
<%= flag_icon data[:flag_id] %> <%= data[:name] %>
98+
<% end %>
99+
</li>
102100
<% end %>
103101
</ul>
104102
</li>

0 commit comments

Comments
 (0)