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

Commit 14cfb41b authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

translation fix

parent 09353cb5
Loading
Loading
Loading
Loading
Loading
+29 −12
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@

 	/**

--- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2022-08-08 17:59:57.632858800 +0530
+++ ./apps/dav/lib/CalDAV/Schedule/IMipPlugin-new.php	2022-08-08 17:21:58.792858800 +0530
--- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2022-07-27 13:21:50.294113800 +0530
+++ apps/dav/lib/CalDAV/Schedule/IMipPlugin-New.php	2022-08-16 16:29:16.531866700 +0530
@@ -151,15 +151,6 @@
 	 */
 	public function schedule(Message $iTipMessage) {
@@ -86,7 +86,23 @@
 	 * @param IL10N $l10n
 	 * @param VEvent $vevent
 	 */
@@ -535,28 +542,85 @@
@@ -525,38 +532,99 @@
 	private function addSubjectAndHeading(IEMailTemplate $template, IL10N $l10n,
 										  $method, $summary) {
 		if ($method === self::METHOD_CANCEL) {
-			$template->setSubject('Canceled: ' . $summary);
+			//TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}"
+			$template->setSubject($l10n->t('Cancelled: %1$s', [$summary]));
 			$template->addHeading($l10n->t('Invitation canceled'));
 		} elseif ($method === self::METHOD_REPLY) {
-			$template->setSubject('Re: ' . $summary);
+			// TRANSLATORS Subject for email, when an invitation is updated. Ex: "Re: {{Event Name}}"
+			$template->setSubject($l10n->t('Re: %1$s', [$summary]));
 			$template->addHeading($l10n->t('Invitation updated'));
 		} else {
-			$template->setSubject('Invitation: ' . $summary);
+			// TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}"
+			$template->setSubject($l10n->t('Invitation: %1$s', [$summary]));
 			$template->addHeading($l10n->t('Invitation'));
 		}
 	}
@@ -100,13 +116,16 @@
+	private function addSubjectAndHeadingUpdated(IEMailTemplate $template, IL10N $l10n,
+										  $method, $summary) {
+		if ($method === self::METHOD_CANCEL) {
+			$template->setSubject('Canceled: ' . $summary);
+			//TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}"
+			$template->setSubject($l10n->t('Cancelled: %1$s', [$summary]));
+			$template->addHeading($l10n->t('Invitation canceled'));
+		} elseif ($method === self::METHOD_REPLY) {
+			$template->setSubject('Re: ' . $summary);
+			// TRANSLATORS Subject for email, when an invitation is updated. Ex: "Re: {{Event Name}}"
+			$template->setSubject($l10n->t('Re: %1$s', [$summary]));
+			$template->addHeading($l10n->t('Invitation updated'));
+		} else {
+			$template->setSubject('Invitation: ' . $summary);
+			// TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}"
+			$template->setSubject($l10n->t('Invitation: %1$s', [$summary]));
+			$template->addHeading($l10n->t('Invitation Update'));
+		}
+	}
@@ -164,9 +183,7 @@
-		if ($vevent->LOCATION) {
-			$template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'),
-				$this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT);
+
+		if ($selectedEvent->LOCATION) {
+
+			if(trim($selectedEvent->LOCATION)==trim($parentevent->LOCATION)){
+				$template->addBodyListItem($selectedEvent->LOCATION, $l10n->t('Location:'),
+					$this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT);
@@ -184,7 +201,7 @@
 			$template->addBodyListItem(sprintf('<a href="%s">%s</a>',
 					htmlspecialchars($url),
 					htmlspecialchars($url)),
@@ -565,12 +629,18 @@
@@ -565,12 +633,18 @@
 				$url,'',self::IMIP_INDENT);
 		}

@@ -207,7 +224,7 @@
 		}
 	}

@@ -671,7 +741,6 @@
@@ -671,7 +745,6 @@
 			$l10n->t('Maybe'),
 			$this->urlGenerator->getAbsoluteUrl('apps/calendar/invitation/tentative/'.$token)
 		);
@@ -215,7 +232,7 @@
 	}

 	/**
@@ -716,4 +785,4 @@
@@ -716,4 +789,4 @@

 		return $token;
 	}