about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-06-09 12:09:37 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-06-09 18:09:37 +0200
commit022008a2a6fb5fe872b04009e1029e2a904bafcc (patch)
treeb660e05c42166a38eb48b0daf095eb37fb79cf4c /app
parenta3715598cc888db462205d74a8b83e57e885dec8 (diff)
Language detection defaults to nil (#3666)
* Default to nil for statuses.language

* Language detection defaults to nil instead of instance UI default
Diffstat (limited to 'app')
-rw-r--r--app/lib/language_detector.rb4
-rw-r--r--app/models/status.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/lib/language_detector.rb b/app/lib/language_detector.rb
index 0d087f8d1..6d6ae2fb3 100644
--- a/app/lib/language_detector.rb
+++ b/app/lib/language_detector.rb
@@ -10,7 +10,7 @@ class LanguageDetector
   end
 
   def to_iso_s
-    detected_language_code || default_locale.to_sym
+    detected_language_code || default_locale
   end
 
   def prepared_text
@@ -43,6 +43,6 @@ class LanguageDetector
   end
 
   def default_locale
-    account&.user_locale || I18n.default_locale
+    account&.user_locale&.to_sym || nil
   end
 end
diff --git a/app/models/status.rb b/app/models/status.rb
index af9f7524e..24d3db2bf 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -20,7 +20,7 @@
 #  reply                  :boolean          default(FALSE)
 #  favourites_count       :integer          default(0), not null
 #  reblogs_count          :integer          default(0), not null
-#  language               :string           default("en"), not null
+#  language               :string
 #  conversation_id        :integer
 #