FIX: Use default locale for flag reasons
This commit is contained in:
parent
c4d1833588
commit
7311eeed39
|
@ -1020,7 +1020,12 @@ class User < ActiveRecord::Base
|
||||||
.where.not(post_id: disagreed_flag_post_ids)
|
.where.not(post_id: disagreed_flag_post_ids)
|
||||||
.each do |tl|
|
.each do |tl|
|
||||||
|
|
||||||
message = I18n.t('flag_reason.spam_hosts', domain: tl.domain, base_path: Discourse.base_path)
|
message = I18n.t(
|
||||||
|
'flag_reason.spam_hosts',
|
||||||
|
domain: tl.domain,
|
||||||
|
base_path: Discourse.base_path,
|
||||||
|
locale: SiteSetting.default_locale
|
||||||
|
)
|
||||||
results << PostActionCreator.create(Discourse.system_user, tl.post, :spam, message: message)
|
results << PostActionCreator.create(Discourse.system_user, tl.post, :spam, message: message)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,12 @@ class SpamRule::FlagSockpuppets
|
||||||
end
|
end
|
||||||
|
|
||||||
def flag_sockpuppet_users
|
def flag_sockpuppet_users
|
||||||
message = I18n.t('flag_reason.sockpuppet', ip_address: @post.user.ip_address, base_path: Discourse.base_path)
|
message = I18n.t(
|
||||||
|
'flag_reason.sockpuppet',
|
||||||
|
ip_address: @post.user.ip_address,
|
||||||
|
base_path: Discourse.base_path,
|
||||||
|
locale: SiteSetting.default_locale
|
||||||
|
)
|
||||||
|
|
||||||
PostActionCreator.create(Discourse.system_user, @post, :spam, message: message)
|
PostActionCreator.create(Discourse.system_user, @post, :spam, message: message)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue