Add support for language preferences for trending statuses and links (#18288)
This commit is contained in:
parent
678fc4d292
commit
45ebdb72ca
29 changed files with 274 additions and 121 deletions
|
@ -26,7 +26,7 @@ module Trends
|
|||
end
|
||||
|
||||
def self.request_review!
|
||||
return unless enabled?
|
||||
return if skip_review? || !enabled?
|
||||
|
||||
links_requiring_review = links.request_review
|
||||
tags_requiring_review = tags.request_review
|
||||
|
@ -43,6 +43,10 @@ module Trends
|
|||
Setting.trends
|
||||
end
|
||||
|
||||
def skip_review?
|
||||
Setting.trendable_by_default
|
||||
end
|
||||
|
||||
def self.available_locales
|
||||
@available_locales ||= I18n.available_locales.map { |locale| locale.to_s.split(/[_-]/).first }.uniq
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue