about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-06-17 18:57:31 +0200
committerGitHub <noreply@github.com>2018-06-17 18:57:31 +0200
commita58ec29631f74259364dc71b408a8d66df657149 (patch)
treeedc8613a80d7e762d96f2ea1a25273276618aa32 /app/views
parentbb21c6414db64739637b4ea81526efe8e539cce0 (diff)
Allow selecting default posting language instead of auto-detect (#7828)
* Allow selecting default posting language instead of auto-detect

* Enable default language setting in credentials API

* Fix form saving
Diffstat (limited to 'app/views')
-rw-r--r--app/views/settings/preferences/show.html.haml2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml
index 6ec03ab4b..43430069f 100644
--- a/app/views/settings/preferences/show.html.haml
+++ b/app/views/settings/preferences/show.html.haml
@@ -12,6 +12,8 @@
   .fields-group
     = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, selected: I18n.locale
 
+    = f.input :setting_default_language, collection: [nil] + filterable_languages.sort, wrapper: :with_label, label_method: lambda { |locale| locale.nil? ? I18n.t('statuses.language_detection') : human_locale(locale) }, required: false, include_blank: false
+
     = f.input :chosen_languages, collection: filterable_languages.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
 
   %h4= t 'preferences.publishing'