mirror of
https://github.com/Evolix/chexpire.git
synced 2024-06-05 00:54: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)
|
def format_utc(time, format: :default)
|
||||||
l(time.utc, format: format)
|
l(time.utc, format: format)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def available_locales_collection
|
||||||
|
I18n.available_locales.map { |k| [t("shared.locales.#{k}"), k]}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<%= f.input :password_confirmation, autocomplete: "off" %>
|
<%= f.input :password_confirmation, autocomplete: "off" %>
|
||||||
</div>
|
</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 %>
|
<%= f.input :notifications_enabled %>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<%= f.input :password_confirmation, autocomplete: "off" %>
|
<%= 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') %>
|
<%= f.input :tos_accepted, label: t('.tos_acceptance_html') %>
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,9 @@ en:
|
||||||
|
|
||||||
|
|
||||||
shared:
|
shared:
|
||||||
|
locales:
|
||||||
|
en: English
|
||||||
|
fr: French
|
||||||
navbar:
|
navbar:
|
||||||
sign_up: "Sign up"
|
sign_up: "Sign up"
|
||||||
sign_in: "Sign in"
|
sign_in: "Sign in"
|
||||||
|
|
|
@ -40,6 +40,9 @@ fr:
|
||||||
|
|
||||||
|
|
||||||
shared:
|
shared:
|
||||||
|
locales:
|
||||||
|
en: Anglais
|
||||||
|
fr: Français
|
||||||
navbar:
|
navbar:
|
||||||
sign_up: "Enregistrement"
|
sign_up: "Enregistrement"
|
||||||
sign_in: "Connexion"
|
sign_in: "Connexion"
|
||||||
|
|
Loading…
Reference in a new issue