- Affected version
- 2.3.0 Beta 1
Steps to reproduce
All non user-generated text in the email is in Moderator Language
Actual Result
Phrase
Why does this happen?
The email template is rendered in Moderator Language but the report title is taken from the report entity via cached getter
Suggested Fix
Use
- Create an additional language: Moderator Language
- Create a moderator, set its language to Moderator Language and enable option Receive email when content is reported
- Translate phrases
report_create_body_html,view_this_report,the_following_reason_was_given,reported_contentandpost_in_thread_xso their text is distinguishable from the default - Create a post
- Report that post using a language other than Moderator Language (=Reporter Language)
All non user-generated text in the email is in Moderator Language
Actual Result
Phrase
post_in_thread_x is rendered in Reporter LanguageWhy does this happen?
The email template is rendered in Moderator Language but the report title is taken from the report entity via cached getter
getTitle which calls getContentTitle on the handler class - this method then uses phrase post_in_thread_x.Suggested Fix
Use
{{ $report.getTitle() }} instead of {$report.title} to bypass getter cache.