Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Language of blog comment notification #1968

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 6 comments
Closed

Language of blog comment notification #1968

openstreetmap-trac opened this issue Jul 23, 2021 · 6 comments

Comments

@openstreetmap-trac
Copy link

Reporter: kaerast
[Submitted to the original trac issue database at 1.15am, Wednesday, 17th June 2009]

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.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 2.58am, Friday, 19th June 2009]

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.

@openstreetmap-trac
Copy link
Author

Author: kaerast
[Added to the original trac issue at 9.11am, Friday, 19th June 2009]

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

@openstreetmap-trac
Copy link
Author

Author: edgemaster
[Added to the original trac issue at 8.36pm, Saturday, 20th June 2009]

(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)

@openstreetmap-trac
Copy link
Author

Author: edgemaster
[Added to the original trac issue at 8.42pm, Saturday, 20th June 2009]

(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)

@openstreetmap-trac
Copy link
Author

Author: Edgemaster
[Added to the original trac issue at 8.44pm, Saturday, 20th June 2009]

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?

@openstreetmap-trac
Copy link
Author

Author: Edgemaster
[Added to the original trac issue at 8.46pm, Saturday, 20th June 2009]

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant