Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iMIP invitation sent with organizer's preferred language if no language set for attendee #28665

Closed
ChristophWurst opened this issue Aug 31, 2021 · 4 comments · Fixed by #29195
Assignees
Labels

Comments

@ChristophWurst
Copy link
Member

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Set the instance default_language to 'en'
  2. Set your language to something distinctive, like French
  3. Configure your calendar in Thunderbird
  4. Create a new event, invite an email attendee
  5. Save the event

Expected behavior

The invitation is sent out in English

Actual behavior

The invitation is sent out in French

Ref #12020
Ref #11795 (comment) @skjnldsv @oparoz

@ChristophWurst ChristophWurst added bug 1. to develop Accepted and waiting to be taken care of feature: dav labels Aug 31, 2021
@ChristophWurst
Copy link
Member Author

Some debugging findings.

The magic happens in \OCA\DAV\CalDAV\Schedule\IMipPlugin::schedule. \OCP\L10N\IFactory::findLanguage gives me fr as "default language" because the user has set their lang is set to fr. The global default_language is never taken into consideration.

@ChristophWurst
Copy link
Member Author

\OCP\L10N\IFactory::findLanguage claims to find the best language. I would argue this method finds the "best language" for the current user. We need something that finds the "best language" for the instance. The logic would be a bit of the opposite. It would first check if there is a default_language set, then it takes that. Then it can check if the current user has a lang set and use that, last it will use en. @nickvergessen what do you think? :)

@nickvergessen
Copy link
Member

Should first check force_language (still a thing?), then default_language, then sender and final en.
Lots of emails are doing this manually (activity mail) or should do (Talk email invites), so would make sense to have a dedicated method on the IFactory I think?

@ChristophWurst
Copy link
Member Author

PR at #29015

@miaulalala miaulalala added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants