Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 421b75f0 authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

feat: add translation for default talk conversation title

parent 796f6426
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ namespace OCA\Calendar\Dav;

use OCA\Talk\Service\RoomService;
use OCP\App\IAppManager;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserSession;
@@ -32,6 +33,7 @@ class BeforeCreateFilePlugin extends ServerPlugin {
		private IURLGenerator $urlGenerator,
		private ContainerInterface $container,
		private LoggerInterface $logger,
		private IL10N $il10n,
	) {
	}

@@ -66,6 +68,7 @@ class BeforeCreateFilePlugin extends ServerPlugin {
			$vCalendar = Reader::read($data);
		} catch (\Exception $e) {
			// The data is not a valid vCalendar object.
			$this->logger->error($e->getMessage(), ['exception' => $e, 'app' => 'calendar']);
			return;
		}
		$this->processEventData($data, $vCalendar);
@@ -168,7 +171,7 @@ class BeforeCreateFilePlugin extends ServerPlugin {
			return null;
		}

		$title = 'Talk conversation for event';
		$title = $this->il10n->t('Talk conversation for event');
		if (isset($vCalendar->VEVENT, $vCalendar->VEVENT->SUMMARY)) {
			$summary = trim((string)$vCalendar->VEVENT->SUMMARY);
			if ($summary !== '') {