summaryrefslogtreecommitdiffstats
path: root/apps/sharebymail
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-09 16:31:52 +0200
committerGitHub <noreply@github.com>2018-10-09 16:31:52 +0200
commitab3599155f9b51cc17fca188f48269aeb44f9462 (patch)
tree030922d11135677bd059f7b9031bdd4d8e73299d /apps/sharebymail
parent031add6acc2082c59b1841a1152fc9df3ca914f8 (diff)
parentea21aa3f7a12c5d1bd80eea329de3eb695fde4e5 (diff)
downloadnextcloud-server-ab3599155f9b51cc17fca188f48269aeb44f9462.tar.gz
nextcloud-server-ab3599155f9b51cc17fca188f48269aeb44f9462.zip
Merge pull request #11716 from nextcloud/bugfix/noid/use-numeric-placeholders-for-rtl-translations
Use numeric placeholders if there are multiple, so that RTL languages…
Diffstat (limited to 'apps/sharebymail')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 9ae26442ac4..26a9beefdfc 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -165,8 +165,8 @@ class ShareByMailProvider implements IShareProvider {
*/
$alreadyShared = $this->getSharedWith($shareWith, \OCP\Share::SHARE_TYPE_EMAIL, $share->getNode(), 1, 0);
if (!empty($alreadyShared)) {
- $message = 'Sharing %s failed, this item is already shared with %s';
- $message_t = $this->l->t('Sharing %s failed, this item is already shared with %s', array($share->getNode()->getName(), $shareWith));
+ $message = 'Sharing %1$s failed, this item is already shared with %2$s';
+ $message_t = $this->l->t('Sharing %1$s failed, this item is already shared with %2$s', array($share->getNode()->getName(), $shareWith));
$this->logger->debug(sprintf($message, $share->getNode()->getName(), $shareWith), ['app' => 'Federated File Sharing']);
throw new \Exception($message_t);
}
@@ -400,10 +400,10 @@ class ShareByMailProvider implements IShareProvider {
'shareWith' => $shareWith,
]);
- $emailTemplate->setSubject($this->l->t('%s shared »%s« with you', array($initiatorDisplayName, $filename)));
+ $emailTemplate->setSubject($this->l->t('%1$s shared »%2$s« with you', array($initiatorDisplayName, $filename)));
$emailTemplate->addHeader();
- $emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$initiatorDisplayName, $filename]), false);
- $text = $this->l->t('%s shared »%s« with you.', [$initiatorDisplayName, $filename]);
+ $emailTemplate->addHeading($this->l->t('%1$s shared »%2$s« with you', [$initiatorDisplayName, $filename]), false);
+ $text = $this->l->t('%1$s shared »%2$s« with you.', [$initiatorDisplayName, $filename]);
$emailTemplate->addBodyText(
htmlspecialchars($text . ' ' . $this->l->t('Click the button below to open it.')),
@@ -419,7 +419,7 @@ class ShareByMailProvider implements IShareProvider {
// The "From" contains the sharers name
$instanceName = $this->defaults->getName();
$senderName = $this->l->t(
- '%s via %s',
+ '%1$s via %2$s',
[
$initiatorDisplayName,
$instanceName
@@ -462,8 +462,8 @@ class ShareByMailProvider implements IShareProvider {
$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator;
$initiatorEmailAddress = ($initiatorUser instanceof IUser) ? $initiatorUser->getEMailAddress() : null;
- $plainBodyPart = $this->l->t("%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n", [$initiatorDisplayName, $filename]);
- $htmlBodyPart = $this->l->t('%s shared »%s« with you. You should have already received a separate mail with a link to access it.', [$initiatorDisplayName, $filename]);
+ $plainBodyPart = $this->l->t("%1\$s shared »%2\$s« with you.\nYou should have already received a separate mail with a link to access it.\n", [$initiatorDisplayName, $filename]);
+ $htmlBodyPart = $this->l->t('%1$s shared »%2$s« with you. You should have already received a separate mail with a link to access it.', [$initiatorDisplayName, $filename]);
$message = $this->mailer->createMessage();
@@ -475,7 +475,7 @@ class ShareByMailProvider implements IShareProvider {
'shareWith' => $shareWith,
]);
- $emailTemplate->setSubject($this->l->t('Password to access »%s« shared to you by %s', [$filename, $initiatorDisplayName]));
+ $emailTemplate->setSubject($this->l->t('Password to access »%1$s« shared to you by %2$s', [$filename, $initiatorDisplayName]));
$emailTemplate->addHeader();
$emailTemplate->addHeading($this->l->t('Password to access »%s«', [$filename]), false);
$emailTemplate->addBodyText(htmlspecialchars($htmlBodyPart), $plainBodyPart);
@@ -485,7 +485,7 @@ class ShareByMailProvider implements IShareProvider {
// The "From" contains the sharers name
$instanceName = $this->defaults->getName();
$senderName = $this->l->t(
- '%s via %s',
+ '%1$s via %2$s',
[
$initiatorDisplayName,
$instanceName
@@ -586,7 +586,7 @@ class ShareByMailProvider implements IShareProvider {
);
}
- $bodyPart = $this->l->t("You just shared »%s« with %s. The share was already send to the recipient. Due to the security policies defined by the administrator of %s each share needs to be protected by password and it is not allowed to send the password directly to the recipient. Therefore you need to forward the password manually to the recipient.", [$filename, $shareWith, $this->defaults->getName()]);
+ $bodyPart = $this->l->t('You just shared »%1$s« with %2$s. The share was already send to the recipient. Due to the security policies defined by the administrator of %3$s each share needs to be protected by password and it is not allowed to send the password directly to the recipient. Therefore you need to forward the password manually to the recipient.', [$filename, $shareWith, $this->defaults->getName()]);
$message = $this->mailer->createMessage();
$emailTemplate = $this->mailer->createEMailTemplate('sharebymail.OwnerPasswordNotification', [
@@ -597,7 +597,7 @@ class ShareByMailProvider implements IShareProvider {
'shareWith' => $shareWith,
]);
- $emailTemplate->setSubject($this->l->t('Password to access »%s« shared with %s', [$filename, $shareWith]));
+ $emailTemplate->setSubject($this->l->t('Password to access »%1$s« shared with %2$s', [$filename, $shareWith]));
$emailTemplate->addHeader();
$emailTemplate->addHeading($this->l->t('Password to access »%s«', [$filename]), false);
$emailTemplate->addBodyText($bodyPart);