Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <mail@danielkesselberg.de>2021-10-14 10:24:59 +0300
committerGitHub <noreply@github.com>2021-10-14 10:24:59 +0300
commitabc2472c5d63f2ebd0f165f812c4a2001232c63d (patch)
tree46595f6c5f6d74b075b6081a1aacc931e5530ebf
parent7129a51a957e9d9a421c0a4c823276083a8f7e84 (diff)
parent2148c448cc0f5ab891e649b0a2a4d32f1075012a (diff)
Merge pull request #29195 from nextcloud/fix/calendar-invitations-default-language
Fix default language detection for calendar emails
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php2
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php4
3 files changed, 4 insertions, 4 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
index 8df6ef06fa5..044e5fac4e2 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
@@ -104,7 +104,7 @@ abstract class AbstractProvider implements INotificationProvider {
return $this->fallbackLanguage;
}
- $fallbackLanguage = $this->l10nFactory->findLanguage();
+ $fallbackLanguage = $this->l10nFactory->findGenericLanguage();
$this->fallbackLanguage = $fallbackLanguage;
return $fallbackLanguage;
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index b7baef89ab9..8aacc33bb46 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -202,7 +202,7 @@ class IMipPlugin extends SabreIMipPlugin {
$vevent = $iTipMessage->message->VEVENT;
$attendee = $this->getCurrentAttendee($iTipMessage);
- $defaultLang = $this->l10nFactory->findLanguage();
+ $defaultLang = $this->l10nFactory->findGenericLanguage();
$lang = $this->getAttendeeLangOrDefault($defaultLang, $attendee);
$l10n = $this->l10nFactory->get('dav', $lang);
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
index 9e96a1f3bec..0352827aa5c 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php
@@ -104,7 +104,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest {
]);
$this->l10nFactory
- ->method('findLanguage')
+ ->method('findGenericLanguage')
->willReturn('en');
$this->l10nFactory
@@ -214,7 +214,7 @@ class EmailProviderTest extends AbstractNotificationProviderTest {
]);
$this->l10nFactory
- ->method('findLanguage')
+ ->method('findGenericLanguage')
->willReturn('en');
$this->l10nFactory