@AntonKhorev commented on this pull request.
> + <select role="button" class="p-0 position-absolute top-0 start-0 w-100
> h-100 language-change-trigger text-transparent bg-transparent <%= classes %>">
+ <% Locale.available
+ .select { |locale| I18n.exists?
"shared.language_selector.#{locale}" }
+ .sort_by { |locale| t(".#{locale}") }
+ .each do |locale| %>
+ <option class="form-select" value="<%= locale.to_s %>" <%= "selected"
if I18n.locale.to_s == locale.to_s %>><%= t(".#{locale}") %></option>
+ <% end %>
+ </select>
You'll get a dozen of exceptions where a language name x is not available in
the language x.
Meanwhile we have all the names in the first lines of `config/locales/*.yml`,
except for `en`.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5201#discussion_r2086953628
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5201/review/2836994...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev