Opened 10 years ago

Closed 10 years ago

#1968 closed defect (fixed)

Language of blog comment notification

Reported by: kaerast Owned by: Tom Hughes
Priority: minor Milestone:
Component: website Version:
Keywords: Cc:

Description

The subject of diary comment notifications should be in the language of the blog post, not the language of the commentor's default language. Steps to reproduce:

1) Post a diary entry in English 2) A second user (with default language=Spanish) posts a comment on the diary entry 3) The notification has a subject of (eg) "[OpenStreetMap] PerroVerd? ha comentado en tu entrada de diario"

The rest of the email is in English, which presumably means it isn't being translated.

Change History (6)

comment:1 Changed 10 years ago by Tom Hughes

I'm not sure this makes sense at all - we are sending the comment (and we have no idea if the comment is in the same language as the diary entry) to a user so any text we add is in that user's preferred language.

It sounds like the real bug is that you're saying it is using the commenter's language not the diary entry writer's languages, but I can't see why - I'll have to look at it when I'm back home next week.

comment:2 Changed 10 years ago by kaerast

Yes that's it, the notification email is being sent using the commenter's language and not the diary entry writer's language.

comment:3 Changed 10 years ago by edgemaster

(In [16027]) Force locale on subject translation for diary comment notifications, since the sending user's locale is not that of recipient. It is assumed that sender locale is that of recipient for the rest of the emails, which is fine, since the sender is the recipient. The bodies are accounted for correctly by common_headers and the monkeypatching of ActionMailer?. (references #1968)

comment:4 Changed 10 years ago by edgemaster

(In [16028]) Contrary to what the previous commit message said, we do actually have more cases of user A triggering mail to user B. (references #1968)

comment:5 Changed 10 years ago by Thomas Wood

So, I think the case here is that the email body is being translated, but not the subject.

Can the original reporter check to see if this fixes the issue he's reporting once the fix is deployed?

comment:6 Changed 10 years ago by Thomas Wood

Resolution: fixed
Status: newclosed

One more clarification of what was happening:

Email body being translated into recipient's language.

Email subject being translated into triggering user's language.

The latter has been fixed to translate into recipient's language.

Note: See TracTickets for help on using tickets.