Change to using %{inviter_name} in locale files may have broken email templates

I’m not entirely sure when I did my last update (so I don’t know when this issue started), but I was contacted by one of our moderators today to say that some of the people she’d invited recently had messaged her to say that the invitation read just:

translation missing: en.invite_forum_mailer.text_body_template

I hadn’t changed my mailing templates for some weeks so I had to do a bit of research on Meta, and turned up this thread which suggested that the templating system will reoprt this error if it can’t find the right key in the locale files.

When I looked at and did some test edits on my email templates, I got the error:

image

And I know that %{invitee_name} has only just been changed to %{inviter_name} because I reported it as an issue and I saw the commit last week:

https://github.com/discourse/discourse/commit/248ad5466d5009476fb7170e878096a3e343ec1c

So if you are getting weird locale/translation missing errors on your invitations it could be caused by this. It’s easily fixed by changing %{invitee_name} to %{inviter_name} in all your invite templates (‘Invite Forum Mailer’, ‘Invite Mailer’, ‘Custom Invite Forum Mailer’, and ‘Custom Invite Mailer’).

It may only affect people who have edited their stock invite templates, as I have.

I’m on v1.9.0.beta15 +167

6 Likes

@techAPJ is there something we can do to help people here, or will they simply need to update their templates manually?

2 Likes

Maybe we should remove invalid translation overrides after upgrading Discourse.
Bonus: Notify admins about the removed translation overrides.

2 Likes

We should fix this @techAPJ

3 Likes

Fixed via:

https://github.com/discourse/discourse/commit/895cc0666bdea937d8144626bd334751df01818f

Thanks for reporting this issue @pacharanero :+1:

4 Likes

Thanks for fixing it so quickly @techAPJ! :discourse:

1 Like

This topic was automatically closed after 23 hours. New replies are no longer allowed.