mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Use default locale for footer of embedded topics (#17760)
The content from the remote site and the footer get cached for 10 minutes, so Discourse should use the default locale instead of the user locale for the footer. Otherwise Discourse might cache the message in a different language.
This commit is contained in:
@@ -23,7 +23,9 @@ class TopicEmbed < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.imported_from_html(url)
|
||||
"\n<hr>\n<small>#{I18n.t('embed.imported_from', link: "<a href='#{url}'>#{url}</a>")}</small>\n"
|
||||
I18n.with_locale(SiteSetting.default_locale) do
|
||||
"\n<hr>\n<small>#{I18n.t('embed.imported_from', link: "<a href='#{url}'>#{url}</a>")}</small>\n"
|
||||
end
|
||||
end
|
||||
|
||||
# Import an article from a source (RSS/Atom/Other)
|
||||
|
||||
Reference in New Issue
Block a user