Kaynağa Gözat

Translate the personal calendar

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v11.0RC2
Joas Schilling 7 yıl önce
ebeveyn
işleme
a4f82f13f3
No account linked to committer's email address

+ 3
- 0
apps/dav/lib/CalDAV/CalDavBackend.php Dosyayı Görüntüle

@@ -59,6 +59,9 @@ use Sabre\VObject\Recur\EventIterator;
*/
class CalDavBackend extends AbstractBackend implements SyncSupport, SubscriptionSupport, SchedulingSupport {

const PERSONAL_CALENDAR_URI = 'personal';
const PERSONAL_CALENDAR_NAME = 'Personal';

/**
* We need to specify a max date, because we need to stop *somewhere*
*

+ 4
- 0
apps/dav/lib/CalDAV/Calendar.php Dosyayı Görüntüle

@@ -38,6 +38,10 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Contact birthdays');
}
if ($this->getName() === CalDavBackend::PERSONAL_CALENDAR_URI &&
$this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Personal');
}
}

/**

+ 3
- 3
apps/dav/lib/HookManager.php Dosyayı Görüntüle

@@ -21,7 +21,6 @@
*/
namespace OCA\DAV;

use OCA\DAV\CalDAV\BirthdayService;
use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\SyncService;
@@ -124,8 +123,9 @@ class HookManager {
$principal = 'principals/users/' . $user->getUID();
if ($this->calDav->getCalendarsForUserCount($principal) === 0) {
try {
$this->calDav->createCalendar($principal, 'personal', [
'{DAV:}displayname' => 'Personal']);
$this->calDav->createCalendar($principal, CalDavBackend::PERSONAL_CALENDAR_URI, [
'{DAV:}displayname' => CalDavBackend::PERSONAL_CALENDAR_NAME,
]);
} catch (\Exception $ex) {
\OC::$server->getLogger()->logException($ex);
}

Loading…
İptal
Kaydet