Language detection defaults to nil (#3666)
* Default to nil for statuses.language * Language detection defaults to nil instead of instance UI default
This commit is contained in:
		
				
					committed by
					
						
						Eugen Rochko
					
				
			
			
				
	
			
			
			
						parent
						
							a3715598cc
						
					
				
				
					commit
					022008a2a6
				
			@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user