adds optgroup on local switcher
This commit is contained in:
@@ -5,12 +5,14 @@
|
||||
<%= t("layouts.header.locale") %>
|
||||
</label>
|
||||
<select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher">
|
||||
<% I18n.available_locales.map do |loc| %>
|
||||
<option <%= "selected" if loc == I18n.locale %>
|
||||
value="<%= current_path_with_query_params(locale: loc) %>">
|
||||
<%= name_for_locale(loc) %>
|
||||
</option>
|
||||
<% end %>
|
||||
<optgroup label="<%= t('layouts.header.available_locales') %>">
|
||||
<% I18n.available_locales.map do |loc| %>
|
||||
<option <%= "selected" if loc == I18n.locale %>
|
||||
value="<%= current_path_with_query_params(locale: loc) %>">
|
||||
<%= name_for_locale(loc) %>
|
||||
</option>
|
||||
<% end %>
|
||||
</optgroup>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -185,6 +185,7 @@ en:
|
||||
transparency_url: https://transparency.consul
|
||||
header:
|
||||
administration: Administration
|
||||
available_locales: Available languages
|
||||
debates: Debates
|
||||
external_link_blog: Blog
|
||||
external_link_opendata: Open data
|
||||
|
||||
@@ -185,6 +185,7 @@ es:
|
||||
transparency_url: https://transparency.consul
|
||||
header:
|
||||
administration: Administrar
|
||||
available_locales: Idiomas disponibles
|
||||
debates: Debates
|
||||
external_link_blog: Blog
|
||||
external_link_opendata: Datos abiertos
|
||||
|
||||
Reference in New Issue
Block a user