mirror of
https://github.com/Evolix/chexpire.git
synced 2024-06-06 01:24:29 +02:00
Real label for locale selection
This commit is contained in:
parent
9d62aceba4
commit
9b155e018c
|
@ -2,4 +2,8 @@ module ApplicationHelper
|
|||
def format_utc(time, format: :default)
|
||||
l(time.utc, format: format)
|
||||
end
|
||||
|
||||
def available_locales_collection
|
||||
I18n.available_locales.map { |k| [t("shared.locales.#{k}"), k]}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<%= f.input :password_confirmation, autocomplete: "off" %>
|
||||
</div>
|
||||
|
||||
<%= f.input :locale, label: t('.locale'), collection: I18n.available_locales, selected: resource.locale %>
|
||||
<%= f.input :locale, label: t('.locale'), collection: available_locales_collection, selected: resource.locale %>
|
||||
|
||||
<%= f.input :notifications_enabled %>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<%= f.input :password_confirmation, autocomplete: "off" %>
|
||||
|
||||
<%= f.input :locale, label: t('.locale'), collection: I18n.available_locales, selected: I18n.default_locale %>
|
||||
<%= f.input :locale, label: t('.locale'), collection: available_locales_collection, selected: I18n.default_locale %>
|
||||
|
||||
<%= f.input :tos_accepted, label: t('.tos_acceptance_html') %>
|
||||
|
||||
|
|
|
@ -40,6 +40,9 @@ en:
|
|||
|
||||
|
||||
shared:
|
||||
locales:
|
||||
en: English
|
||||
fr: French
|
||||
navbar:
|
||||
sign_up: "Sign up"
|
||||
sign_in: "Sign in"
|
||||
|
|
|
@ -40,6 +40,9 @@ fr:
|
|||
|
||||
|
||||
shared:
|
||||
locales:
|
||||
en: Anglais
|
||||
fr: Français
|
||||
navbar:
|
||||
sign_up: "Enregistrement"
|
||||
sign_in: "Connexion"
|
||||
|
|
Loading…
Reference in a new issue