Adds custom locale name for Português

This commit is contained in:
rgarcia
2016-10-31 11:14:05 +01:00
parent aeec264b8b
commit c0f400a4d9
3 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
module LocalesHelper
def name_for_locale(locale)
default = I18n.t("locale", locale: locale)
I18n.backend.translate(locale, "i18n.language.name", default: default)
end
end

View File

@@ -8,7 +8,7 @@
<% I18n.available_locales.map do |loc| %>
<option <%= "selected" if loc == I18n.locale %>
value="<%= current_path_with_query_params(locale: loc) %>">
<%= I18n.t("locale", locale: loc) %>
<%= name_for_locale(loc) %>
</option>
<% end %>
</select>

View File

@@ -1,5 +1,8 @@
---
pt-BR:
i18n:
language:
name: Português
account:
show:
change_credentials_link: Alterar meus dados pessoais