diff options
Diffstat (limited to 'apps')
21 files changed, 287 insertions, 195 deletions
diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php index 9035087965c..170b20d7c27 100644 --- a/apps/comments/lib/Activity/Provider.php +++ b/apps/comments/lib/Activity/Provider.php @@ -30,9 +30,13 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Provider implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -52,14 +56,14 @@ class Provider implements IProvider { protected $displayNames = []; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param ICommentsManager $commentsManager * @param IUserManager $userManager * @param IManager $activityManager */ - public function __construct(IL10N $l, IURLGenerator $url, ICommentsManager $commentsManager, IUserManager $userManager, IManager $activityManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, ICommentsManager $commentsManager, IUserManager $userManager, IManager $activityManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->commentsManager = $commentsManager; $this->userManager = $userManager; @@ -67,17 +71,20 @@ class Provider implements IProvider { } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'comments') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('comments', $language); + if ($event->getSubject() === 'add_comment_subject') { $this->parseMessage($event); $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.svg'))); diff --git a/apps/dav/l10n/de.js b/apps/dav/l10n/de.js index bd51821511f..5ee0af7dbaa 100644 --- a/apps/dav/l10n/de.js +++ b/apps/dav/l10n/de.js @@ -1,44 +1,44 @@ OC.L10N.register( "dav", { + "Calendar" : "Kalender", + "Todos" : "Aufgaben", + "{actor} created calendar {calendar}" : "{actor} hat den Kalender {calendar} erstellt", + "You created calendar {calendar}" : "Du hast den Kalender {calendar} erstellt", + "{actor} deleted calendar {calendar}" : "{actor} hat den Kalender {calendar} gelöscht", + "You deleted calendar {calendar}" : "Du hast hat den Kalender {calendar} gelöscht", + "{actor} updated calendar {calendar}" : "{actor} hat den Kalender {calendar} aktualisiert", + "You updated calendar {calendar}" : "Du hast den Kalender {calendar} aktualisiert", + "{actor} shared calendar {calendar} with you" : "{actor} hat den Kalender {calendar} mit Ihnen geteilt", + "You shared calendar {calendar} with {user}" : "Du hast den Kalender {calendar} mit {user} geteilt", + "{actor} shared calendar {calendar} with {user}" : "{actor} hat den Kalender {calendar} mit {user} geteilt", + "{actor} unshared calendar {calendar} from you" : "{actor} teilt den Kalender {calendar} nicht mehr mit dir", + "You unshared calendar {calendar} from {user}" : "Du teilst den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from {user}" : "{actor} teilt den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from themselves" : "{actor} teilt den Kalender {calendar} nicht mehr mit sich selbst", + "You shared calendar {calendar} with group {group}" : "Du hast den Kalender {calendar} mit der Gruppe {group} geteilt", + "{actor} shared calendar {calendar} with group {group}" : "{actor} teilt den Kalender {calendar} mit der Gruppe {group}", + "You unshared calendar {calendar} from group {group}" : "Du teilst den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} unshared calendar {calendar} from group {group}" : "{actor} teilt den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} created event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} erstellt", + "You created event {event} in calendar {calendar}" : "Du hast das Ereignis {event} im Kalender {calendar} erstellt", + "{actor} deleted event {event} from calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} gelöscht", + "You deleted event {event} from calendar {calendar}" : "Du hast das Ereignis {event} im Kalender {calendar} gelöscht", + "{actor} updated event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} aktualisiert", + "You updated event {event} in calendar {calendar}" : "Du hast das Ereignis {event} im Kalender {calendar} aktualisiert", + "{actor} created todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erstellt", + "You created todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} erstellt", + "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} gelöscht", + "You deleted todo {todo} from list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} gelöscht", + "{actor} updated todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} aktualisiert", + "You updated todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} aktualisiert", + "{actor} solved todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erledigt", + "You solved todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} erledigt", + "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} wieder geöffnet", + "You reopened todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} wieder geöffnet", "A <strong>calendar</strong> was modified" : "Ein <strong>Kalender</strong> wurde bearbeitet", "A calendar <strong>event</strong> was modified" : "Ein <strong>Ereignis</strong> wurde bearbeitet", "A calendar <strong>todo</strong> was modified" : "Eine <strong>Aufgabe</strong> wurde bearbeitet", - "%1$s created calendar %2$s" : "%1$s hat den Kalender %2$s erstellt", - "You created calendar %2$s" : "Du hast den Kalender %2$s erstellt", - "%1$s deleted calendar %2$s" : "%1$s hat den Kalender %2$s entfernt", - "You deleted calendar %2$s" : "Du hast den Kalender %2$s entfernt", - "%1$s updated calendar %2$s" : "%1$s hat den Kalender %2$s aktualisiert", - "You updated calendar %2$s" : "Du hast den Kalender %2$s aktualisiert", - "%1$s shared calendar %2$s with you" : "%1$s hat den Kalender %2$s mit Ihnen geteilt", - "You shared calendar %2$s with %1$s" : "Du hast den Kalender %2$s mit %1$s geteilt", - "%3$s shared calendar %2$s with %1$s" : "%3$s hat den Kalender %2$s mit %1$s geteilt", - "%1$s unshared calendar %2$s from you" : "%1$s teilt den Kalender %2$s nicht mehr mit Ihnen", - "You unshared calendar %2$s from %1$s" : "Du hast den Kalender %2$s nicht mehr mit %1$s geteilt", - "%3$s unshared calendar %2$s from %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit %1$s geteilt", - "%1$s unshared calendar %2$s from themselves" : "%1$s teilt seinen Kalender %2$s nicht mehr", - "You shared calendar %2$s with group %1$s" : "Du hast den Kalender %2$s mit der Gruppe %1$s geteilt", - "%3$s shared calendar %2$s with group %1$s" : "%3$s hat den Kalender %2$s mit der Gruppe %1$s geteilt", - "You unshared calendar %2$s from group %1$s" : "Der Kalender %2$s ist nicht mehr mit der Gruppe %1$s geteilt", - "%3$s unshared calendar %2$s from group %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit der Gruppe %1$s geteilt", - "%1$s created event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s erstellt", - "You created event %3$s in calendar %2$s" : "Du hast das Ereignis %3$s in Kalender %2$s erstellt", - "%1$s deleted event %3$s from calendar %2$s" : "%1$s hat das Ereignis %3$s von Kalender %2$s entfernt", - "You deleted event %3$s from calendar %2$s" : "Du hast das Ereignis %3$s von Kalender %2$s entfernt", - "%1$s updated event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s aktualisiert", - "You updated event %3$s in calendar %2$s" : "Du hast das Ereignis %3$s in Kalender %2$s aktualisiert", - "%1$s created todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erstellt", - "You created todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s erstellt", - "%1$s deleted todo %3$s from list %2$s" : "%1$s hat die Aufgabe %3$s von Liste %2$s entfernt", - "You deleted todo %3$s from list %2$s" : "Du hast die Aufgabe %3$s von Liste %2$s entfernt", - "%1$s updated todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s aktualisiert", - "You updated todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s aktualisiert", - "%1$s solved todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erledigt", - "You solved todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s erledigt", - "%1$s reopened todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "You reopened todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "Calendar" : "Kalender", - "Todos" : "Aufgaben", "Contact birthdays" : "Geburtstage von Kontakten", "Personal" : "Persönlich", "Contacts" : "Kontakte", diff --git a/apps/dav/l10n/de.json b/apps/dav/l10n/de.json index 2ecc2e87a5c..915c2cfb540 100644 --- a/apps/dav/l10n/de.json +++ b/apps/dav/l10n/de.json @@ -1,42 +1,42 @@ { "translations": { + "Calendar" : "Kalender", + "Todos" : "Aufgaben", + "{actor} created calendar {calendar}" : "{actor} hat den Kalender {calendar} erstellt", + "You created calendar {calendar}" : "Du hast den Kalender {calendar} erstellt", + "{actor} deleted calendar {calendar}" : "{actor} hat den Kalender {calendar} gelöscht", + "You deleted calendar {calendar}" : "Du hast hat den Kalender {calendar} gelöscht", + "{actor} updated calendar {calendar}" : "{actor} hat den Kalender {calendar} aktualisiert", + "You updated calendar {calendar}" : "Du hast den Kalender {calendar} aktualisiert", + "{actor} shared calendar {calendar} with you" : "{actor} hat den Kalender {calendar} mit Ihnen geteilt", + "You shared calendar {calendar} with {user}" : "Du hast den Kalender {calendar} mit {user} geteilt", + "{actor} shared calendar {calendar} with {user}" : "{actor} hat den Kalender {calendar} mit {user} geteilt", + "{actor} unshared calendar {calendar} from you" : "{actor} teilt den Kalender {calendar} nicht mehr mit dir", + "You unshared calendar {calendar} from {user}" : "Du teilst den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from {user}" : "{actor} teilt den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from themselves" : "{actor} teilt den Kalender {calendar} nicht mehr mit sich selbst", + "You shared calendar {calendar} with group {group}" : "Du hast den Kalender {calendar} mit der Gruppe {group} geteilt", + "{actor} shared calendar {calendar} with group {group}" : "{actor} teilt den Kalender {calendar} mit der Gruppe {group}", + "You unshared calendar {calendar} from group {group}" : "Du teilst den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} unshared calendar {calendar} from group {group}" : "{actor} teilt den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} created event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} erstellt", + "You created event {event} in calendar {calendar}" : "Du hast das Ereignis {event} im Kalender {calendar} erstellt", + "{actor} deleted event {event} from calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} gelöscht", + "You deleted event {event} from calendar {calendar}" : "Du hast das Ereignis {event} im Kalender {calendar} gelöscht", + "{actor} updated event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} aktualisiert", + "You updated event {event} in calendar {calendar}" : "Du hast das Ereignis {event} im Kalender {calendar} aktualisiert", + "{actor} created todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erstellt", + "You created todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} erstellt", + "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} gelöscht", + "You deleted todo {todo} from list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} gelöscht", + "{actor} updated todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} aktualisiert", + "You updated todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} aktualisiert", + "{actor} solved todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erledigt", + "You solved todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} erledigt", + "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} wieder geöffnet", + "You reopened todo {todo} in list {calendar}" : "Du hast das ToDo {todo} in der Liste {calendar} wieder geöffnet", "A <strong>calendar</strong> was modified" : "Ein <strong>Kalender</strong> wurde bearbeitet", "A calendar <strong>event</strong> was modified" : "Ein <strong>Ereignis</strong> wurde bearbeitet", "A calendar <strong>todo</strong> was modified" : "Eine <strong>Aufgabe</strong> wurde bearbeitet", - "%1$s created calendar %2$s" : "%1$s hat den Kalender %2$s erstellt", - "You created calendar %2$s" : "Du hast den Kalender %2$s erstellt", - "%1$s deleted calendar %2$s" : "%1$s hat den Kalender %2$s entfernt", - "You deleted calendar %2$s" : "Du hast den Kalender %2$s entfernt", - "%1$s updated calendar %2$s" : "%1$s hat den Kalender %2$s aktualisiert", - "You updated calendar %2$s" : "Du hast den Kalender %2$s aktualisiert", - "%1$s shared calendar %2$s with you" : "%1$s hat den Kalender %2$s mit Ihnen geteilt", - "You shared calendar %2$s with %1$s" : "Du hast den Kalender %2$s mit %1$s geteilt", - "%3$s shared calendar %2$s with %1$s" : "%3$s hat den Kalender %2$s mit %1$s geteilt", - "%1$s unshared calendar %2$s from you" : "%1$s teilt den Kalender %2$s nicht mehr mit Ihnen", - "You unshared calendar %2$s from %1$s" : "Du hast den Kalender %2$s nicht mehr mit %1$s geteilt", - "%3$s unshared calendar %2$s from %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit %1$s geteilt", - "%1$s unshared calendar %2$s from themselves" : "%1$s teilt seinen Kalender %2$s nicht mehr", - "You shared calendar %2$s with group %1$s" : "Du hast den Kalender %2$s mit der Gruppe %1$s geteilt", - "%3$s shared calendar %2$s with group %1$s" : "%3$s hat den Kalender %2$s mit der Gruppe %1$s geteilt", - "You unshared calendar %2$s from group %1$s" : "Der Kalender %2$s ist nicht mehr mit der Gruppe %1$s geteilt", - "%3$s unshared calendar %2$s from group %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit der Gruppe %1$s geteilt", - "%1$s created event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s erstellt", - "You created event %3$s in calendar %2$s" : "Du hast das Ereignis %3$s in Kalender %2$s erstellt", - "%1$s deleted event %3$s from calendar %2$s" : "%1$s hat das Ereignis %3$s von Kalender %2$s entfernt", - "You deleted event %3$s from calendar %2$s" : "Du hast das Ereignis %3$s von Kalender %2$s entfernt", - "%1$s updated event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s aktualisiert", - "You updated event %3$s in calendar %2$s" : "Du hast das Ereignis %3$s in Kalender %2$s aktualisiert", - "%1$s created todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erstellt", - "You created todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s erstellt", - "%1$s deleted todo %3$s from list %2$s" : "%1$s hat die Aufgabe %3$s von Liste %2$s entfernt", - "You deleted todo %3$s from list %2$s" : "Du hast die Aufgabe %3$s von Liste %2$s entfernt", - "%1$s updated todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s aktualisiert", - "You updated todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s aktualisiert", - "%1$s solved todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erledigt", - "You solved todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s erledigt", - "%1$s reopened todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "You reopened todo %3$s in list %2$s" : "Du hast die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "Calendar" : "Kalender", - "Todos" : "Aufgaben", "Contact birthdays" : "Geburtstage von Kontakten", "Personal" : "Persönlich", "Contacts" : "Kontakte", diff --git a/apps/dav/l10n/de_DE.js b/apps/dav/l10n/de_DE.js index a9c746be4ee..03da3d51f7c 100644 --- a/apps/dav/l10n/de_DE.js +++ b/apps/dav/l10n/de_DE.js @@ -1,44 +1,44 @@ OC.L10N.register( "dav", { + "Calendar" : "Kalender", + "Todos" : "Aufgaben", + "{actor} created calendar {calendar}" : "{actor} hat den Kalender {calendar} erstellt", + "You created calendar {calendar}" : "Sie haben den Kalender {calendar} erstellt", + "{actor} deleted calendar {calendar}" : "{actor} hat den Kalender {calendar} gelöscht", + "You deleted calendar {calendar}" : "Sie haben den Kalender {calendar} gelöscht", + "{actor} updated calendar {calendar}" : "{actor} hat den Kalender {calendar} aktualisiert", + "You updated calendar {calendar}" : "Sie haben hat den Kalender {calendar} aktualisiert", + "{actor} shared calendar {calendar} with you" : "{actor} hat den Kalender {calendar} mit Ihnen geteilt", + "You shared calendar {calendar} with {user}" : "Sie haben den Kalender {calendar} mit {user} geteilt", + "{actor} shared calendar {calendar} with {user}" : "{actor} hat den Kalender {calendar} mit {user} geteilt", + "{actor} unshared calendar {calendar} from you" : "{actor} teilt den Kalender {calendar} nicht mehr mit Ihnen", + "You unshared calendar {calendar} from {user}" : "Sie teilen den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from {user}" : "{actor} teilt den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from themselves" : "{actor} teilt den Kalender {calendar} nicht mehr mit sich selbst", + "You shared calendar {calendar} with group {group}" : "Sie teilen den Kalender {calendar} mit der Gruppe {group}", + "{actor} shared calendar {calendar} with group {group}" : "{actor} teilt den Kalender {calendar} mit der Gruppe {group}", + "You unshared calendar {calendar} from group {group}" : "Sie teilen den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} unshared calendar {calendar} from group {group}" : "{actor} teilt den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} created event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} erstellt", + "You created event {event} in calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} erstellt", + "{actor} deleted event {event} from calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} gelöscht", + "You deleted event {event} from calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} gelöscht", + "{actor} updated event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} aktualisiert", + "You updated event {event} in calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} aktualisiert", + "{actor} created todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erstellt", + "You created todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erstellt", + "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} gelöscht", + "You deleted todo {todo} from list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} gelöscht", + "{actor} updated todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} aktualisiert", + "You updated todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} aktualisiert", + "{actor} solved todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erledigt", + "You solved todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erledigt", + "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} wieder geöffnet", + "You reopened todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} wieder geöffnet", "A <strong>calendar</strong> was modified" : "Ein <strong>Kalender</strong> wurde bearbeitet", "A calendar <strong>event</strong> was modified" : "Ein <strong>Ereignis</strong> wurde bearbeitet", "A calendar <strong>todo</strong> was modified" : "Eine <strong>Aufgabe</strong> wurde bearbeitet", - "%1$s created calendar %2$s" : "%1$s hat den Kalender %2$s erstellt", - "You created calendar %2$s" : "Sie haben den Kalender %2$s erstellt", - "%1$s deleted calendar %2$s" : "%1$s hat den Kalender %2$s entfernt", - "You deleted calendar %2$s" : "Sie haben den Kalender %2$s entfernt", - "%1$s updated calendar %2$s" : "%1$s hat den Kalender %2$s aktualisiert", - "You updated calendar %2$s" : "Sie haben den Kalender %2$s aktualisiert", - "%1$s shared calendar %2$s with you" : "%1$s hat den Kalender %2$s mit Ihnen geteilt", - "You shared calendar %2$s with %1$s" : "Sie haben den Kalender %2$s mit %1$s geteilt", - "%3$s shared calendar %2$s with %1$s" : "%3$s hat den Kalender %2$s mit %1$s geteilt", - "%1$s unshared calendar %2$s from you" : "%1$s teilt den Kalender %2$s nicht mehr mit Ihnen", - "You unshared calendar %2$s from %1$s" : "Sie haben den Kalender %2$s nicht mehr mit %1$s geteilt", - "%3$s unshared calendar %2$s from %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit %1$s geteilt", - "%1$s unshared calendar %2$s from themselves" : "%1$s teilt seinen Kalender %2$s nicht mehr", - "You shared calendar %2$s with group %1$s" : "Sie haben den Kalender %2$s mit der Gruppe %1$s geteilt", - "%3$s shared calendar %2$s with group %1$s" : "%3$s hat den Kalender %2$s mit der Gruppe %1$s geteilt", - "You unshared calendar %2$s from group %1$s" : "Der Kalender %2$s ist nicht mehr mit der Gruppe %1$s geteilt", - "%3$s unshared calendar %2$s from group %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit der Gruppe %1$s geteilt", - "%1$s created event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s erstellt", - "You created event %3$s in calendar %2$s" : "Sie haben das Ereignis %3$s in Kalender %2$s erstellt", - "%1$s deleted event %3$s from calendar %2$s" : "%1$s hat das Ereignis %3$s von Kalender %2$s entfernt", - "You deleted event %3$s from calendar %2$s" : "Sie haben das Ereignis %3$s von Kalender %2$s entfernt", - "%1$s updated event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s aktualisiert", - "You updated event %3$s in calendar %2$s" : "Sie haben das Ereignis %3$s in Kalender %2$s aktualisiert", - "%1$s created todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erstellt", - "You created todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s erstellt", - "%1$s deleted todo %3$s from list %2$s" : "%1$s hat die Aufgabe %3$s von Liste %2$s entfernt", - "You deleted todo %3$s from list %2$s" : "Sie haben die Aufgabe %3$s von Liste %2$s entfernt", - "%1$s updated todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s aktualisiert", - "You updated todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s aktualisiert", - "%1$s solved todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erledigt", - "You solved todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s erledigt", - "%1$s reopened todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "You reopened todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "Calendar" : "Kalender", - "Todos" : "Aufgaben", "Contact birthdays" : "Geburtstage von Kontakten", "Personal" : "Persönlich", "Contacts" : "Kontakte", diff --git a/apps/dav/l10n/de_DE.json b/apps/dav/l10n/de_DE.json index b9fc96b73ea..b7751ee32a4 100644 --- a/apps/dav/l10n/de_DE.json +++ b/apps/dav/l10n/de_DE.json @@ -1,42 +1,42 @@ { "translations": { + "Calendar" : "Kalender", + "Todos" : "Aufgaben", + "{actor} created calendar {calendar}" : "{actor} hat den Kalender {calendar} erstellt", + "You created calendar {calendar}" : "Sie haben den Kalender {calendar} erstellt", + "{actor} deleted calendar {calendar}" : "{actor} hat den Kalender {calendar} gelöscht", + "You deleted calendar {calendar}" : "Sie haben den Kalender {calendar} gelöscht", + "{actor} updated calendar {calendar}" : "{actor} hat den Kalender {calendar} aktualisiert", + "You updated calendar {calendar}" : "Sie haben hat den Kalender {calendar} aktualisiert", + "{actor} shared calendar {calendar} with you" : "{actor} hat den Kalender {calendar} mit Ihnen geteilt", + "You shared calendar {calendar} with {user}" : "Sie haben den Kalender {calendar} mit {user} geteilt", + "{actor} shared calendar {calendar} with {user}" : "{actor} hat den Kalender {calendar} mit {user} geteilt", + "{actor} unshared calendar {calendar} from you" : "{actor} teilt den Kalender {calendar} nicht mehr mit Ihnen", + "You unshared calendar {calendar} from {user}" : "Sie teilen den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from {user}" : "{actor} teilt den Kalender {calendar} nicht mehr mit {user}", + "{actor} unshared calendar {calendar} from themselves" : "{actor} teilt den Kalender {calendar} nicht mehr mit sich selbst", + "You shared calendar {calendar} with group {group}" : "Sie teilen den Kalender {calendar} mit der Gruppe {group}", + "{actor} shared calendar {calendar} with group {group}" : "{actor} teilt den Kalender {calendar} mit der Gruppe {group}", + "You unshared calendar {calendar} from group {group}" : "Sie teilen den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} unshared calendar {calendar} from group {group}" : "{actor} teilt den Kalender {calendar} nicht mehr mit der Gruppe {group}", + "{actor} created event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} erstellt", + "You created event {event} in calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} erstellt", + "{actor} deleted event {event} from calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} gelöscht", + "You deleted event {event} from calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} gelöscht", + "{actor} updated event {event} in calendar {calendar}" : "{actor} hat das Ereignis {event} im Kalender {calendar} aktualisiert", + "You updated event {event} in calendar {calendar}" : "Sie haben das Ereignis {event} im Kalender {calendar} aktualisiert", + "{actor} created todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erstellt", + "You created todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erstellt", + "{actor} deleted todo {todo} from list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} gelöscht", + "You deleted todo {todo} from list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} gelöscht", + "{actor} updated todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} aktualisiert", + "You updated todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} aktualisiert", + "{actor} solved todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} erledigt", + "You solved todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} erledigt", + "{actor} reopened todo {todo} in list {calendar}" : "{actor} hat das ToDo {todo} in der Liste {calendar} wieder geöffnet", + "You reopened todo {todo} in list {calendar}" : "Sie haben das ToDo {todo} in der Liste {calendar} wieder geöffnet", "A <strong>calendar</strong> was modified" : "Ein <strong>Kalender</strong> wurde bearbeitet", "A calendar <strong>event</strong> was modified" : "Ein <strong>Ereignis</strong> wurde bearbeitet", "A calendar <strong>todo</strong> was modified" : "Eine <strong>Aufgabe</strong> wurde bearbeitet", - "%1$s created calendar %2$s" : "%1$s hat den Kalender %2$s erstellt", - "You created calendar %2$s" : "Sie haben den Kalender %2$s erstellt", - "%1$s deleted calendar %2$s" : "%1$s hat den Kalender %2$s entfernt", - "You deleted calendar %2$s" : "Sie haben den Kalender %2$s entfernt", - "%1$s updated calendar %2$s" : "%1$s hat den Kalender %2$s aktualisiert", - "You updated calendar %2$s" : "Sie haben den Kalender %2$s aktualisiert", - "%1$s shared calendar %2$s with you" : "%1$s hat den Kalender %2$s mit Ihnen geteilt", - "You shared calendar %2$s with %1$s" : "Sie haben den Kalender %2$s mit %1$s geteilt", - "%3$s shared calendar %2$s with %1$s" : "%3$s hat den Kalender %2$s mit %1$s geteilt", - "%1$s unshared calendar %2$s from you" : "%1$s teilt den Kalender %2$s nicht mehr mit Ihnen", - "You unshared calendar %2$s from %1$s" : "Sie haben den Kalender %2$s nicht mehr mit %1$s geteilt", - "%3$s unshared calendar %2$s from %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit %1$s geteilt", - "%1$s unshared calendar %2$s from themselves" : "%1$s teilt seinen Kalender %2$s nicht mehr", - "You shared calendar %2$s with group %1$s" : "Sie haben den Kalender %2$s mit der Gruppe %1$s geteilt", - "%3$s shared calendar %2$s with group %1$s" : "%3$s hat den Kalender %2$s mit der Gruppe %1$s geteilt", - "You unshared calendar %2$s from group %1$s" : "Der Kalender %2$s ist nicht mehr mit der Gruppe %1$s geteilt", - "%3$s unshared calendar %2$s from group %1$s" : "%3$s hat den Kalender %2$s nicht mehr mit der Gruppe %1$s geteilt", - "%1$s created event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s erstellt", - "You created event %3$s in calendar %2$s" : "Sie haben das Ereignis %3$s in Kalender %2$s erstellt", - "%1$s deleted event %3$s from calendar %2$s" : "%1$s hat das Ereignis %3$s von Kalender %2$s entfernt", - "You deleted event %3$s from calendar %2$s" : "Sie haben das Ereignis %3$s von Kalender %2$s entfernt", - "%1$s updated event %3$s in calendar %2$s" : "%1$s hat das Ereignis %3$s in Kalender %2$s aktualisiert", - "You updated event %3$s in calendar %2$s" : "Sie haben das Ereignis %3$s in Kalender %2$s aktualisiert", - "%1$s created todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erstellt", - "You created todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s erstellt", - "%1$s deleted todo %3$s from list %2$s" : "%1$s hat die Aufgabe %3$s von Liste %2$s entfernt", - "You deleted todo %3$s from list %2$s" : "Sie haben die Aufgabe %3$s von Liste %2$s entfernt", - "%1$s updated todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s aktualisiert", - "You updated todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s aktualisiert", - "%1$s solved todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s erledigt", - "You solved todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s erledigt", - "%1$s reopened todo %3$s in list %2$s" : "%1$s hat die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "You reopened todo %3$s in list %2$s" : "Sie haben die Aufgabe %3$s in Liste %2$s wiedereröffnet", - "Calendar" : "Kalender", - "Todos" : "Aufgaben", "Contact birthdays" : "Geburtstage von Kontakten", "Personal" : "Persönlich", "Contacts" : "Kontakte", diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php index 2e2ce5bc27a..d7730da61f4 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php @@ -27,6 +27,7 @@ use OCP\Activity\IManager; use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUserManager; +use OCP\L10N\IFactory; class Calendar extends Base { @@ -38,6 +39,9 @@ class Calendar extends Base { const SUBJECT_UNSHARE_USER = 'calendar_user_unshare'; const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare'; + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -51,32 +55,35 @@ class Calendar extends Base { protected $eventMerger; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager * @param IEventMerger $eventMerger */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { parent::__construct($userManager); - $this->l = $l; + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->eventMerger = $eventMerger; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('dav', $language); + $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar-dark.svg'))); if ($event->getSubject() === self::SUBJECT_ADD) { diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php index 11c8d901ac9..daaace6b5be 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php @@ -27,6 +27,7 @@ use OCP\Activity\IManager; use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUserManager; +use OCP\L10N\IFactory; class Event extends Base { @@ -34,6 +35,9 @@ class Event extends Base { const SUBJECT_OBJECT_UPDATE = 'object_update'; const SUBJECT_OBJECT_DELETE = 'object_delete'; + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -47,32 +51,35 @@ class Event extends Base { protected $eventMerger; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager * @param IEventMerger $eventMerger */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { parent::__construct($userManager); - $this->l = $l; + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->eventMerger = $eventMerger; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar_event') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('dav', $language); + $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar-dark.svg'))); if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_event') { diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php index 43ab9e9c448..747b39ddb7f 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php @@ -26,17 +26,20 @@ use OCP\Activity\IEvent; class Todo extends Event { /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar_todo') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('dav', $language); + $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/checkmark.svg'))); if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_todo') { diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 5906cbc5c31..52ae4aaa6ad 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -776,7 +776,7 @@ html.ie8 #controls .button.new { } .newFileMenu { - width: 140px; + width: 200px; margin-left: -56px; margin-top: 25px; z-index: 1001; @@ -813,7 +813,9 @@ html.ie8 #controls .button.new { } .newFileMenu .filenameform input { - width: 100px; + width: 100%; + box-sizing: border-box; + margin: -2px 0; } #fileList .popovermenu .action { diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index fb0439114ed..a8daeadfd26 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1638,7 +1638,7 @@ return false; } - if (status === 404 || status === 405) { + if (status === 400 || status === 404 || status === 405) { // go back home this.changeDirectory('/'); return false; diff --git a/apps/files/js/sidebarpreviewmanager.js b/apps/files/js/sidebarpreviewmanager.js index 3d540119189..2cf4248897a 100644 --- a/apps/files/js/sidebarpreviewmanager.js +++ b/apps/files/js/sidebarpreviewmanager.js @@ -20,19 +20,28 @@ this._previewHandlers[mime] = handler; }, - getPreviewHandler: function (mime) { + getMimeTypePreviewHandler: function(mime) { var mimePart = mime.split('/').shift(); if (this._previewHandlers[mime]) { return this._previewHandlers[mime]; - } else if(this._previewHandlers[mimePart]) { + } else if (this._previewHandlers[mimePart]) { return this._previewHandlers[mimePart]; } else { + return null; + } + }, + + getPreviewHandler: function (mime) { + var mimetypeHandler = this.getMimeTypePreviewHandler(mime); + if (mimetypeHandler) { + return mimetypeHandler; + } else { return this.fallbackPreview.bind(this); } }, loadPreview: function (model, $thumbnailDiv, $thumbnailContainer) { - if (model.get('hasPreview') === false) { + if (model.get('hasPreview') === false && this.getMimeTypePreviewHandler(model.get('mimetype')) === null) { var mimeIcon = OC.MimeType.getIconUrl(model.get('mimetype')); $thumbnailDiv.removeClass('icon-loading icon-32'); $thumbnailContainer.removeClass('image'); //fall back to regular view diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php index 863e7644059..92686ec0c36 100644 --- a/apps/files/lib/Activity/Provider.php +++ b/apps/files/lib/Activity/Provider.php @@ -29,9 +29,13 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Provider implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -51,14 +55,14 @@ class Provider implements IProvider { protected $displayNames = []; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager * @param IEventMerger $eventMerger */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; @@ -66,17 +70,20 @@ class Provider implements IProvider { } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'files') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('files', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event, $previousEvent); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index d8fc3907d78..c5a75be7c62 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1454,6 +1454,11 @@ describe('OCA.Files.FileList tests', function() { deferredList.reject(404); expect(fileList.getCurrentDirectory()).toEqual('/'); }); + it('switches to root dir when current directory returns 400', function() { + fileList.changeDirectory('/unexist'); + deferredList.reject(400); + expect(fileList.getCurrentDirectory()).toEqual('/'); + }); it('switches to root dir when current directory returns 405', function() { fileList.changeDirectory('/unexist'); deferredList.reject(405); diff --git a/apps/files_sharing/css/sharetabview.css b/apps/files_sharing/css/sharetabview.css index 35b2d2f337d..1ef5ac3fe3c 100644 --- a/apps/files_sharing/css/sharetabview.css +++ b/apps/files_sharing/css/sharetabview.css @@ -104,7 +104,6 @@ .shareTabView .icon-loading-small { display: inline-block; z-index: 1; - background-color: white; padding: 2px 0; } @@ -122,6 +121,5 @@ } .shareTabView .icon { - display: inline-block; background-size: 16px 16px; } diff --git a/apps/files_sharing/lib/Activity/Providers/Downloads.php b/apps/files_sharing/lib/Activity/Providers/Downloads.php index 39e2a846b30..e1a25156441 100644 --- a/apps/files_sharing/lib/Activity/Providers/Downloads.php +++ b/apps/files_sharing/lib/Activity/Providers/Downloads.php @@ -26,9 +26,13 @@ use OCP\Activity\IManager; use OCP\Activity\IProvider; use OCP\IL10N; use OCP\IURLGenerator; +use OCP\L10N\IFactory; class Downloads implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -45,28 +49,31 @@ class Downloads implements IProvider { const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded'; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'files_sharing') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('files_sharing', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php index c42cc1bb59b..326ebba9ef7 100644 --- a/apps/files_sharing/lib/Activity/Providers/Groups.php +++ b/apps/files_sharing/lib/Activity/Providers/Groups.php @@ -28,9 +28,13 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Groups implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -53,30 +57,33 @@ class Groups implements IProvider { /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'files_sharing') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('files_sharing', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); diff --git a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php index a1c6333a86b..ec8152c5a32 100644 --- a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php +++ b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php @@ -28,9 +28,13 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class PublicLinks implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -55,30 +59,33 @@ class PublicLinks implements IProvider { /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'files_sharing') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('files_sharing', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php index 8760733a261..3ee5d82e932 100644 --- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php +++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php @@ -26,11 +26,13 @@ use OCP\Activity\IManager; use OCP\Activity\IProvider; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\IUser; -use OCP\IUserManager; +use OCP\L10N\IFactory; class RemoteShares implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -46,28 +48,31 @@ class RemoteShares implements IProvider { const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared'; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'files_sharing') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('files_sharing', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); diff --git a/apps/files_sharing/lib/Activity/Providers/Users.php b/apps/files_sharing/lib/Activity/Providers/Users.php index c85452aec06..d85eeadc315 100644 --- a/apps/files_sharing/lib/Activity/Providers/Users.php +++ b/apps/files_sharing/lib/Activity/Providers/Users.php @@ -28,9 +28,13 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Users implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -55,30 +59,33 @@ class Users implements IProvider { const SUBJECT_UNSHARED_BY = 'unshared_by'; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'files_sharing') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('files_sharing', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php index 58ab0a5cdcd..5342d013ade 100644 --- a/apps/sharebymail/lib/Activity.php +++ b/apps/sharebymail/lib/Activity.php @@ -29,9 +29,13 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Activity implements IProvider { + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -56,14 +60,14 @@ class Activity implements IProvider { const SUBJECT_SHARED_EMAIL_BY = 'shared_with_email_by'; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager * @param IContactsManager $contactsManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IContactsManager $contactsManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IContactsManager $contactsManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; @@ -71,17 +75,20 @@ class Activity implements IProvider { } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'sharebymail') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('sharebymail', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php index 37ede8c3b8f..5ef20c281bd 100644 --- a/apps/systemtags/lib/Activity/Provider.php +++ b/apps/systemtags/lib/Activity/Provider.php @@ -28,6 +28,7 @@ use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; +use OCP\L10N\IFactory; class Provider implements IProvider { @@ -38,6 +39,9 @@ class Provider implements IProvider { const ASSIGN_TAG = 'assign_tag'; const UNASSIGN_TAG = 'unassign_tag'; + /** @var IFactory */ + protected $languageFactory; + /** @var IL10N */ protected $l; @@ -54,30 +58,33 @@ class Provider implements IProvider { protected $displayNames = []; /** - * @param IL10N $l + * @param IFactory $languageFactory * @param IURLGenerator $url * @param IManager $activityManager * @param IUserManager $userManager */ - public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { - $this->l = $l; + public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) { + $this->languageFactory = $languageFactory; $this->url = $url; $this->activityManager = $activityManager; $this->userManager = $userManager; } /** + * @param string $language * @param IEvent $event * @param IEvent|null $previousEvent * @return IEvent * @throws \InvalidArgumentException * @since 11.0.0 */ - public function parse(IEvent $event, IEvent $previousEvent = null) { + public function parse($language, IEvent $event, IEvent $previousEvent = null) { if ($event->getApp() !== 'systemtags') { throw new \InvalidArgumentException(); } + $this->l = $this->languageFactory->get('systemtags', $language); + if ($this->activityManager->isFormattingFilteredObject()) { try { return $this->parseShortVersion($event); |