Remove unneeded optgroup in locale switcher
The `<optgroup>` doesn't make much sense if all options are inside one group. And the information provided was redundant: when using a select field having "Language" as a label, it's obvious that the options are the available languages. Now that, since now the `<select>` field is smaller, we need to add an extra padding so the icon doesn't overlap the text.
This commit is contained in:
@@ -1012,7 +1012,8 @@ footer {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-top: $line-height / 4;
|
margin-top: $line-height / 4;
|
||||||
outline: none;
|
outline: none;
|
||||||
padding: 0 $line-height / 4;
|
padding-left: $line-height / 4;
|
||||||
|
padding-right: calc(#{$line-height / 4} + 1em);
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
|
|||||||
@@ -5,14 +5,12 @@
|
|||||||
<%= t("layouts.header.locale") %>
|
<%= t("layouts.header.locale") %>
|
||||||
</label>
|
</label>
|
||||||
<select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher">
|
<select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher">
|
||||||
<optgroup label="<%= t("layouts.header.available_locales") %>">
|
<% I18n.available_locales.map do |loc| %>
|
||||||
<% I18n.available_locales.map do |loc| %>
|
<option <%= "selected" if loc == I18n.locale %>
|
||||||
<option <%= "selected" if loc == I18n.locale %>
|
value="<%= current_path_with_query_params(locale: loc) %>">
|
||||||
value="<%= current_path_with_query_params(locale: loc) %>">
|
<%= name_for_locale(loc) %>
|
||||||
<%= name_for_locale(loc) %>
|
</option>
|
||||||
</option>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</optgroup>
|
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -226,7 +226,6 @@ en:
|
|||||||
header:
|
header:
|
||||||
administration_menu: Menu
|
administration_menu: Menu
|
||||||
administration: Administration
|
administration: Administration
|
||||||
available_locales: Available languages
|
|
||||||
collaborative_legislation: Collaborative legislation
|
collaborative_legislation: Collaborative legislation
|
||||||
debates: Debates
|
debates: Debates
|
||||||
locale: "Language:"
|
locale: "Language:"
|
||||||
|
|||||||
@@ -226,7 +226,6 @@ es:
|
|||||||
header:
|
header:
|
||||||
administration_menu: Menú
|
administration_menu: Menú
|
||||||
administration: Administración
|
administration: Administración
|
||||||
available_locales: Idiomas disponibles
|
|
||||||
collaborative_legislation: Legislación colaborativa
|
collaborative_legislation: Legislación colaborativa
|
||||||
debates: Debates
|
debates: Debates
|
||||||
locale: "Idioma:"
|
locale: "Idioma:"
|
||||||
|
|||||||
Reference in New Issue
Block a user