about summary refs log tree commit diff
path: root/app/helpers/formatting_helper.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-05-26 23:02:42 +0200
committerGitHub <noreply@github.com>2022-05-26 23:02:42 +0200
commit0a1992430db7a859b3b7faa3d9ce4f07734b5fd8 (patch)
tree7db13796c63ef4e9cec4653ec9cf6a0a10aeef21 /app/helpers/formatting_helper.rb
parent52f4e834f293c9fdbf5805639d022ac4e3856b75 (diff)
Fix errors when rendering RSS feeds (#18531)
Diffstat (limited to 'app/helpers/formatting_helper.rb')
-rw-r--r--app/helpers/formatting_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/formatting_helper.rb b/app/helpers/formatting_helper.rb
index f5b8dbed8..a9d2f9651 100644
--- a/app/helpers/formatting_helper.rb
+++ b/app/helpers/formatting_helper.rb
@@ -23,7 +23,7 @@ module FormattingHelper
 
     before_html = begin
       if status.spoiler_text?
-        "<p><strong>#{I18n.t('rss.content_warning', locale: valid_locale_or_nil(status.language))}</strong> #{h(status.spoiler_text)}</p><hr />"
+        "<p><strong>#{I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)}</strong> #{h(status.spoiler_text)}</p><hr />"
       else
         ''
       end