Adds custom locale name for Português
This commit is contained in:
8
app/helpers/locales_helper.rb
Normal file
8
app/helpers/locales_helper.rb
Normal 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
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<% 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) %>">
|
||||||
<%= I18n.t("locale", locale: loc) %>
|
<%= name_for_locale(loc) %>
|
||||||
</option>
|
</option>
|
||||||
<% end %>
|
<% end %>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
---
|
---
|
||||||
pt-BR:
|
pt-BR:
|
||||||
|
i18n:
|
||||||
|
language:
|
||||||
|
name: Português
|
||||||
account:
|
account:
|
||||||
show:
|
show:
|
||||||
change_credentials_link: Alterar meus dados pessoais
|
change_credentials_link: Alterar meus dados pessoais
|
||||||
|
|||||||
Reference in New Issue
Block a user