FIX: incorrect localization in flagging dialog
- only happens when multiple locales enabled
This commit is contained in:
parent
dc859beff3
commit
dc10bdee3d
|
@ -28,13 +28,13 @@ class SiteSerializer < ApplicationSerializer
|
|||
end
|
||||
|
||||
def post_action_types
|
||||
cache_fragment("post_action_types") do
|
||||
cache_fragment("post_action_types_#{I18n.locale}") do
|
||||
ActiveModel::ArraySerializer.new(PostActionType.ordered).as_json
|
||||
end
|
||||
end
|
||||
|
||||
def topic_flag_types
|
||||
cache_fragment("post_action_flag_types") do
|
||||
cache_fragment("post_action_flag_types_#{I18n.locale}") do
|
||||
flags = PostActionType.ordered.where(name_key: ['inappropriate', 'spam', 'notify_moderators'])
|
||||
ActiveModel::ArraySerializer.new(flags, each_serializer: TopicFlagTypeSerializer).as_json
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue