From dc10bdee3dd23ae8d2acb4729c119e4b0b3f4853 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 19 Oct 2015 11:42:33 +1100 Subject: [PATCH] FIX: incorrect localization in flagging dialog - only happens when multiple locales enabled --- app/serializers/site_serializer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/serializers/site_serializer.rb b/app/serializers/site_serializer.rb index 174008ce084..2a3a49170a6 100644 --- a/app/serializers/site_serializer.rb +++ b/app/serializers/site_serializer.rb @@ -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