diff --git a/lib/open_fest/app/helpers/open_fest/application_helper.rb b/lib/open_fest/app/helpers/open_fest/application_helper.rb index 58f9765..e137b8a 100644 --- a/lib/open_fest/app/helpers/open_fest/application_helper.rb +++ b/lib/open_fest/app/helpers/open_fest/application_helper.rb @@ -1,4 +1,9 @@ module OpenFest module ApplicationHelper + def locale_collection + I18n.available_locales.map do |locale| + [t("locales.#{locale}"), locale] + end + end end end diff --git a/lib/open_fest/app/views/open_fest/events/new.slim b/lib/open_fest/app/views/open_fest/events/new.slim index bcd8909..6446c7b 100644 --- a/lib/open_fest/app/views/open_fest/events/new.slim +++ b/lib/open_fest/app/views/open_fest/events/new.slim @@ -14,7 +14,7 @@ -# TODO length is different for different types of events (translation problem) = form.input :length - = form.input :language, as: :radio_buttons, collection: I18n.available_locales, include_blank: false, default: I18n.locale, wrapper: :default + = form.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default, checked: current_user.language = form.input :abstract = form.input :description = form.input :notes