mirror of
https://github.com/discourse/discourse.git
synced 2025-04-27 03:44:31 +08:00
Merge pull request #3110 from riking/notification_lanaguage
FIX: Respect user locale for reply notifications
This commit is contained in:
commit
e3b4d12e46
@ -118,8 +118,14 @@ class PostAlerter
|
|||||||
if collapsed
|
if collapsed
|
||||||
post = first_unread_post(user,post.topic) || post
|
post = first_unread_post(user,post.topic) || post
|
||||||
count = unread_count(user, post.topic)
|
count = unread_count(user, post.topic)
|
||||||
|
I18n.with_locale(if SiteSetting.allow_user_locale && user.locale.present?
|
||||||
|
user.locale
|
||||||
|
else
|
||||||
|
SiteSetting.default_locale
|
||||||
|
end) do
|
||||||
opts[:display_username] = I18n.t('embed.replies', count: count) if count > 1
|
opts[:display_username] = I18n.t('embed.replies', count: count) if count > 1
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
UserActionObserver.log_notification(original_post, user, type, opts[:acting_user_id])
|
UserActionObserver.log_notification(original_post, user, type, opts[:acting_user_id])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user