Merge pull request #26510 from nextcloud/backport/26230/stable19

[stable19] l10n: Add word user in FederatedShareProvider.php
This commit is contained in:
Roeland Jago Douma 2021-04-12 10:18:10 +02:00 committed by GitHub
commit 0de63d7751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ class FederatedShareProvider implements IShareProvider {
$alreadySharedGroup = $this->getSharedWith($shareWith, \OCP\Share::SHARE_TYPE_REMOTE_GROUP, $share->getNode(), 1, 0);
if (!empty($alreadyShared) || !empty($alreadySharedGroup)) {
$message = 'Sharing %1$s failed, because this item is already shared with %2$s';
$message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with %2$s', [$share->getNode()->getName(), $shareWith]);
$message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with user %2$s', [$share->getNode()->getName(), $shareWith]);
$this->logger->debug(sprintf($message, $share->getNode()->getName(), $shareWith), ['app' => 'Federated File Sharing']);
throw new \Exception($message_t);
}

View File

@ -434,7 +434,7 @@ class FederatedShareProviderTest extends \Test\TestCase {
try {
$this->provider->create($share);
} catch (\Exception $e) {
$this->assertEquals('Sharing myFile failed, because this item is already shared with user@server.com', $e->getMessage());
$this->assertEquals('Sharing myFile failed, because this item is already shared with user user@server.com', $e->getMessage());
}
}