Merge pull request #26511 from nextcloud/Valdnet-patch-4
l10n: Unify spelling
This commit is contained in:
commit
7ffee26aa8
|
@ -28,6 +28,6 @@ A reference to why it was very difficult to actually find good background pictur
|
||||||
- We need to have a good balance of different motives, e.g. not too many landscape pics.
|
- We need to have a good balance of different motives, e.g. not too many landscape pics.
|
||||||
- Same for a good balance of different colors.
|
- Same for a good balance of different colors.
|
||||||
- The photo needs to work as a background. Photos with objects focused in the middle don’t really work as they will be overlapped by the widgets anyway.
|
- The photo needs to work as a background. Photos with objects focused in the middle don’t really work as they will be overlapped by the widgets anyway.
|
||||||
- Especially the top part can’t have too much differing contrast, as then it’s not possible to see the navigation icons.
|
- Especially the top part cannot have too much differing contrast, as then it’s not possible to see the navigation icons.
|
||||||
- We serve the pictures at 4k resolution and most of the selected images are also available in 6k or higher so it is future-proof.
|
- We serve the pictures at 4k resolution and most of the selected images are also available in 6k or higher so it is future-proof.
|
||||||
- For the search of course we had to limit to CC0, CC By and CC By-Sa. Only CC0 would have been practically impossible cause there’s just not so many good ones which fit.
|
- For the search of course we had to limit to CC0, CC By and CC By-Sa. Only CC0 would have been practically impossible cause there’s just not so many good ones which fit.
|
||||||
|
|
|
@ -366,8 +366,8 @@ class Encryption implements IEncryptionModule {
|
||||||
*/
|
*/
|
||||||
public function decrypt($data, $position = 0) {
|
public function decrypt($data, $position = 0) {
|
||||||
if (empty($this->fileKey)) {
|
if (empty($this->fileKey)) {
|
||||||
$msg = 'Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.';
|
$msg = 'Cannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.';
|
||||||
$hint = $this->l->t('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
|
$hint = $this->l->t('Cannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
|
||||||
$this->logger->error($msg);
|
$this->logger->error($msg);
|
||||||
|
|
||||||
throw new DecryptionFailedException($msg, $hint);
|
throw new DecryptionFailedException($msg, $hint);
|
||||||
|
@ -492,7 +492,7 @@ class Encryption implements IEncryptionModule {
|
||||||
// valid private/public key
|
// valid private/public key
|
||||||
$msg = 'Encryption module "' . $this->getDisplayName() .
|
$msg = 'Encryption module "' . $this->getDisplayName() .
|
||||||
'" is not able to read ' . $path;
|
'" is not able to read ' . $path;
|
||||||
$hint = $this->l->t('Can not read this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
|
$hint = $this->l->t('Cannot read this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
|
||||||
$this->logger->warning($msg);
|
$this->logger->warning($msg);
|
||||||
throw new DecryptionFailedException($msg, $hint);
|
throw new DecryptionFailedException($msg, $hint);
|
||||||
}
|
}
|
||||||
|
|
|
@ -431,7 +431,7 @@ class EncryptionTest extends TestCase {
|
||||||
|
|
||||||
public function testDecrypt() {
|
public function testDecrypt() {
|
||||||
$this->expectException(\OC\Encryption\Exceptions\DecryptionFailedException::class);
|
$this->expectException(\OC\Encryption\Exceptions\DecryptionFailedException::class);
|
||||||
$this->expectExceptionMessage('Can not decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
|
$this->expectExceptionMessage('Cannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.');
|
||||||
|
|
||||||
$this->instance->decrypt('abc');
|
$this->instance->decrypt('abc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,24 +162,24 @@
|
||||||
mountPoint = $('#usedSpacePercent').data('mount-point');
|
mountPoint = $('#usedSpacePercent').data('mount-point');
|
||||||
if (usedSpacePercent > 98) {
|
if (usedSpacePercent > 98) {
|
||||||
if (owner !== OC.getCurrentUser().uid) {
|
if (owner !== OC.getCurrentUser().uid) {
|
||||||
OC.Notification.show(t('files', 'Storage of {owner} is full, files can not be updated or synced anymore!',
|
OC.Notification.show(t('files', 'Storage of {owner} is full, files cannot be updated or synced anymore!',
|
||||||
{owner: ownerDisplayName}), {type: 'error'}
|
{owner: ownerDisplayName}), {type: 'error'}
|
||||||
);
|
);
|
||||||
} else if (mountType === 'group') {
|
} else if (mountType === 'group') {
|
||||||
OC.Notification.show(t('files',
|
OC.Notification.show(t('files',
|
||||||
'Group folder "{mountPoint}" is full, files can not be updated or synced anymore!',
|
'Group folder "{mountPoint}" is full, files cannot be updated or synced anymore!',
|
||||||
{mountPoint: mountPoint}),
|
{mountPoint: mountPoint}),
|
||||||
{type: 'error'}
|
{type: 'error'}
|
||||||
);
|
);
|
||||||
} else if (mountType === 'external') {
|
} else if (mountType === 'external') {
|
||||||
OC.Notification.show(t('files',
|
OC.Notification.show(t('files',
|
||||||
'External storage "{mountPoint}" is full, files can not be updated or synced anymore!',
|
'External storage "{mountPoint}" is full, files cannot be updated or synced anymore!',
|
||||||
{mountPoint: mountPoint}),
|
{mountPoint: mountPoint}),
|
||||||
{type : 'error'}
|
{type : 'error'}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
OC.Notification.show(t('files',
|
OC.Notification.show(t('files',
|
||||||
'Your storage is full, files can not be updated or synced anymore!'),
|
'Your storage is full, files cannot be updated or synced anymore!'),
|
||||||
{type: 'error'}
|
{type: 'error'}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1103,7 +1103,7 @@ class ShareAPIController extends OCSController {
|
||||||
Constants::PERMISSION_READ | Constants::PERMISSION_UPDATE, // allow to edit single files
|
Constants::PERMISSION_READ | Constants::PERMISSION_UPDATE, // allow to edit single files
|
||||||
], true)
|
], true)
|
||||||
) {
|
) {
|
||||||
throw new OCSBadRequestException($this->l->t('Can\'t change permissions for public share links'));
|
throw new OCSBadRequestException($this->l->t('Cannot change permissions for public share links'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -1356,7 +1356,7 @@ class ApiTest extends TestCase {
|
||||||
$this->fail();
|
$this->fail();
|
||||||
} catch (OCSException $e) {
|
} catch (OCSException $e) {
|
||||||
$this->assertEquals(404, $e->getCode());
|
$this->assertEquals(404, $e->getCode());
|
||||||
$this->assertEquals('Can’t set expiration date more than 7 days in the future', $e->getMessage());
|
$this->assertEquals('Cannot set expiration date more than 7 days in the future', $e->getMessage());
|
||||||
}
|
}
|
||||||
$ocs->cleanup();
|
$ocs->cleanup();
|
||||||
|
|
||||||
|
|
|
@ -3475,13 +3475,13 @@ class ShareAPIControllerTest extends TestCase {
|
||||||
$this->shareManager->expects($this->once())
|
$this->shareManager->expects($this->once())
|
||||||
->method('updateShare')
|
->method('updateShare')
|
||||||
->with($share)
|
->with($share)
|
||||||
->willThrowException(new GenericShareException('Can’t increase permissions of path/file', 'Can’t increase permissions of path/file', 404));
|
->willThrowException(new GenericShareException('Cannot increase permissions of path/file', 'Cannot increase permissions of path/file', 404));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$ocs->updateShare(42, 31);
|
$ocs->updateShare(42, 31);
|
||||||
$this->fail();
|
$this->fail();
|
||||||
} catch (OCSException $e) {
|
} catch (OCSException $e) {
|
||||||
$this->assertEquals('Can’t increase permissions of path/file', $e->getMessage());
|
$this->assertEquals('Cannot increase permissions of path/file', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -200,7 +200,7 @@ const actions = {
|
||||||
if (!Array.isArray(appId)) {
|
if (!Array.isArray(appId)) {
|
||||||
context.commit('setError', {
|
context.commit('setError', {
|
||||||
appId: apps,
|
appId: apps,
|
||||||
error: t('settings', 'Error: This app can not be enabled because it makes the server unstable'),
|
error: t('settings', 'Error: This app cannot be enabled because it makes the server unstable'),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -212,7 +212,7 @@ class ShareByMailProvider implements IShareProvider {
|
||||||
|
|
||||||
if ($initiatorEMailAddress === null && !$allowPasswordByMail) {
|
if ($initiatorEMailAddress === null && !$allowPasswordByMail) {
|
||||||
throw new \Exception(
|
throw new \Exception(
|
||||||
$this->l->t("We can't send you the auto-generated password. Please set a valid email address in your personal settings and try again.")
|
$this->l->t("We cannot send you the auto-generated password. Please set a valid email address in your personal settings and try again.")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,7 +574,7 @@ class ShareByMailProvider implements IShareProvider {
|
||||||
|
|
||||||
if ($initiatorEMailAddress === null) {
|
if ($initiatorEMailAddress === null) {
|
||||||
throw new \Exception(
|
throw new \Exception(
|
||||||
$this->l->t("We can't send you the auto-generated password. Please set a valid email address in your personal settings and try again.")
|
$this->l->t("We cannot send you the auto-generated password. Please set a valid email address in your personal settings and try again.")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -61,7 +61,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p v-else-if="message === 'reset-error'"
|
<p v-else-if="message === 'reset-error'"
|
||||||
class="update warning">
|
class="update warning">
|
||||||
{{ t('core', 'Password can not be changed. Please contact your administrator.') }}
|
{{ t('core', 'Password cannot be changed. Please contact your administrator.') }}
|
||||||
</p>
|
</p>
|
||||||
<p v-else-if="message"
|
<p v-else-if="message"
|
||||||
class="update"
|
class="update"
|
||||||
|
|
|
@ -125,7 +125,7 @@ export default {
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.error = true
|
this.error = true
|
||||||
this.message = e.message ? e.message : t('core', 'Password can not be changed. Please contact your administrator.')
|
this.message = e.message ? e.message : t('core', 'Password cannot be changed. Please contact your administrator.')
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,10 +44,10 @@
|
||||||
<strong>{{ t('core', 'App download or installation failed') }}</strong>
|
<strong>{{ t('core', 'App download or installation failed') }}</strong>
|
||||||
</p>
|
</p>
|
||||||
<p v-else-if="!app.isCompatible">
|
<p v-else-if="!app.isCompatible">
|
||||||
<strong>{{ t('core', 'Can\'t install this app because it is not compatible') }}</strong>
|
<strong>{{ t('core', 'Cannot install this app because it is not compatible') }}</strong>
|
||||||
</p>
|
</p>
|
||||||
<p v-else-if="!app.canInstall">
|
<p v-else-if="!app.canInstall">
|
||||||
<strong>{{ t('core', 'Can\'t install this app') }}</strong>
|
<strong>{{ t('core', 'Cannot install this app') }}</strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -303,7 +303,7 @@ class Setup {
|
||||||
|
|
||||||
// validate the data directory
|
// validate the data directory
|
||||||
if ((!is_dir($dataDir) && !mkdir($dataDir)) || !is_writable($dataDir)) {
|
if ((!is_dir($dataDir) && !mkdir($dataDir)) || !is_writable($dataDir)) {
|
||||||
$error[] = $l->t("Can't create or write into the data directory %s", [$dataDir]);
|
$error[] = $l->t("Cannot create or write into the data directory %s", [$dataDir]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($error)) {
|
if (!empty($error)) {
|
||||||
|
|
|
@ -252,7 +252,7 @@ class Manager implements IManager {
|
||||||
} elseif ($share->getShareType() === IShare::TYPE_ROOM) {
|
} elseif ($share->getShareType() === IShare::TYPE_ROOM) {
|
||||||
} elseif ($share->getShareType() === IShare::TYPE_DECK) {
|
} elseif ($share->getShareType() === IShare::TYPE_DECK) {
|
||||||
} else {
|
} else {
|
||||||
// We can't handle other types yet
|
// We cannot handle other types yet
|
||||||
throw new \InvalidArgumentException('unknown share type');
|
throw new \InvalidArgumentException('unknown share type');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ class Manager implements IManager {
|
||||||
// Cannot share with yourself
|
// Cannot share with yourself
|
||||||
if ($share->getShareType() === IShare::TYPE_USER &&
|
if ($share->getShareType() === IShare::TYPE_USER &&
|
||||||
$share->getSharedWith() === $share->getSharedBy()) {
|
$share->getSharedWith() === $share->getSharedBy()) {
|
||||||
throw new \InvalidArgumentException('Can’t share with yourself');
|
throw new \InvalidArgumentException('Cannot share with yourself');
|
||||||
}
|
}
|
||||||
|
|
||||||
// The path should be set
|
// The path should be set
|
||||||
|
@ -278,14 +278,14 @@ class Manager implements IManager {
|
||||||
throw new \InvalidArgumentException('Path should be either a file or a folder');
|
throw new \InvalidArgumentException('Path should be either a file or a folder');
|
||||||
}
|
}
|
||||||
|
|
||||||
// And you can't share your rootfolder
|
// And you cannot share your rootfolder
|
||||||
if ($this->userManager->userExists($share->getSharedBy())) {
|
if ($this->userManager->userExists($share->getSharedBy())) {
|
||||||
$userFolder = $this->rootFolder->getUserFolder($share->getSharedBy());
|
$userFolder = $this->rootFolder->getUserFolder($share->getSharedBy());
|
||||||
} else {
|
} else {
|
||||||
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
|
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
|
||||||
}
|
}
|
||||||
if ($userFolder->getId() === $share->getNode()->getId()) {
|
if ($userFolder->getId() === $share->getNode()->getId()) {
|
||||||
throw new \InvalidArgumentException('You can’t share your root folder');
|
throw new \InvalidArgumentException('You cannot share your root folder');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we actually have share permissions
|
// Check if we actually have share permissions
|
||||||
|
@ -349,7 +349,7 @@ class Manager implements IManager {
|
||||||
// Check that we do not share with more permissions than we have
|
// Check that we do not share with more permissions than we have
|
||||||
if ($share->getPermissions() & ~$permissions) {
|
if ($share->getPermissions() & ~$permissions) {
|
||||||
$path = $userFolder->getRelativePath($share->getNode()->getPath());
|
$path = $userFolder->getRelativePath($share->getNode()->getPath());
|
||||||
$message_t = $this->l->t('Can’t increase permissions of %s', [$path]);
|
$message_t = $this->l->t('Cannot increase permissions of %s', [$path]);
|
||||||
throw new GenericShareException($message_t, $message_t, 404);
|
throw new GenericShareException($message_t, $message_t, 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,11 +365,11 @@ class Manager implements IManager {
|
||||||
|
|
||||||
if ($share->getNode() instanceof \OCP\Files\File) {
|
if ($share->getNode() instanceof \OCP\Files\File) {
|
||||||
if ($share->getPermissions() & \OCP\Constants::PERMISSION_DELETE) {
|
if ($share->getPermissions() & \OCP\Constants::PERMISSION_DELETE) {
|
||||||
$message_t = $this->l->t('Files can’t be shared with delete permissions');
|
$message_t = $this->l->t('Files cannot be shared with delete permissions');
|
||||||
throw new GenericShareException($message_t);
|
throw new GenericShareException($message_t);
|
||||||
}
|
}
|
||||||
if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
|
if ($share->getPermissions() & \OCP\Constants::PERMISSION_CREATE) {
|
||||||
$message_t = $this->l->t('Files can’t be shared with create permissions');
|
$message_t = $this->l->t('Files cannot be shared with create permissions');
|
||||||
throw new GenericShareException($message_t);
|
throw new GenericShareException($message_t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ class Manager implements IManager {
|
||||||
$date->setTime(0, 0, 0);
|
$date->setTime(0, 0, 0);
|
||||||
$date->add(new \DateInterval('P' . $defaultExpireDays . 'D'));
|
$date->add(new \DateInterval('P' . $defaultExpireDays . 'D'));
|
||||||
if ($date < $expirationDate) {
|
if ($date < $expirationDate) {
|
||||||
$message = $this->l->n('Can’t set expiration date more than %n day in the future', 'Can’t set expiration date more than %n days in the future', $defaultExpireDays);
|
$message = $this->l->n('Cannot set expiration date more than %n day in the future', 'Cannot set expiration date more than %n days in the future', $defaultExpireDays);
|
||||||
throw new GenericShareException($message, $message, 404);
|
throw new GenericShareException($message, $message, 404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -517,7 +517,7 @@ class Manager implements IManager {
|
||||||
$date->setTime(0, 0, 0);
|
$date->setTime(0, 0, 0);
|
||||||
$date->add(new \DateInterval('P' . $this->shareApiLinkDefaultExpireDays() . 'D'));
|
$date->add(new \DateInterval('P' . $this->shareApiLinkDefaultExpireDays() . 'D'));
|
||||||
if ($date < $expirationDate) {
|
if ($date < $expirationDate) {
|
||||||
$message = $this->l->n('Can’t set expiration date more than %n day in the future', 'Can’t set expiration date more than %n days in the future', $this->shareApiLinkDefaultExpireDays());
|
$message = $this->l->n('Cannot set expiration date more than %n day in the future', 'Cannot set expiration date more than %n days in the future', $this->shareApiLinkDefaultExpireDays());
|
||||||
throw new GenericShareException($message, $message, 404);
|
throw new GenericShareException($message, $message, 404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -796,7 +796,7 @@ class Manager implements IManager {
|
||||||
// Cannot share with the owner
|
// Cannot share with the owner
|
||||||
if ($share->getShareType() === IShare::TYPE_USER &&
|
if ($share->getShareType() === IShare::TYPE_USER &&
|
||||||
$share->getSharedWith() === $share->getShareOwner()) {
|
$share->getSharedWith() === $share->getShareOwner()) {
|
||||||
throw new \InvalidArgumentException('Can’t share with the share owner');
|
throw new \InvalidArgumentException('Cannot share with the share owner');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the target
|
// Generate the target
|
||||||
|
@ -964,9 +964,9 @@ class Manager implements IManager {
|
||||||
throw new \InvalidArgumentException('Share does not have a full id');
|
throw new \InvalidArgumentException('Share does not have a full id');
|
||||||
}
|
}
|
||||||
|
|
||||||
// We can't change the share type!
|
// We cannot change the share type!
|
||||||
if ($share->getShareType() !== $originalShare->getShareType()) {
|
if ($share->getShareType() !== $originalShare->getShareType()) {
|
||||||
throw new \InvalidArgumentException('Can’t change share type');
|
throw new \InvalidArgumentException('Cannot change share type');
|
||||||
}
|
}
|
||||||
|
|
||||||
// We can only change the recipient on user shares
|
// We can only change the recipient on user shares
|
||||||
|
@ -978,7 +978,7 @@ class Manager implements IManager {
|
||||||
// Cannot share with the owner
|
// Cannot share with the owner
|
||||||
if ($share->getShareType() === IShare::TYPE_USER &&
|
if ($share->getShareType() === IShare::TYPE_USER &&
|
||||||
$share->getSharedWith() === $share->getShareOwner()) {
|
$share->getSharedWith() === $share->getShareOwner()) {
|
||||||
throw new \InvalidArgumentException('Can’t share with the share owner');
|
throw new \InvalidArgumentException('Cannot share with the share owner');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->generalCreateChecks($share);
|
$this->generalCreateChecks($share);
|
||||||
|
@ -1013,7 +1013,7 @@ class Manager implements IManager {
|
||||||
* Cannot enable the getSendPasswordByTalk if there is no password set
|
* Cannot enable the getSendPasswordByTalk if there is no password set
|
||||||
*/
|
*/
|
||||||
if (empty($plainTextPassword) && $share->getSendPasswordByTalk()) {
|
if (empty($plainTextPassword) && $share->getSendPasswordByTalk()) {
|
||||||
throw new \InvalidArgumentException('Can’t enable sending the password by Talk with an empty password');
|
throw new \InvalidArgumentException('Cannot enable sending the password by Talk with an empty password');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1023,10 +1023,10 @@ class Manager implements IManager {
|
||||||
*/
|
*/
|
||||||
if (!$updatedPassword && $share->getShareType() === IShare::TYPE_EMAIL) {
|
if (!$updatedPassword && $share->getShareType() === IShare::TYPE_EMAIL) {
|
||||||
if (!$originalShare->getSendPasswordByTalk() && $share->getSendPasswordByTalk()) {
|
if (!$originalShare->getSendPasswordByTalk() && $share->getSendPasswordByTalk()) {
|
||||||
throw new \InvalidArgumentException('Can’t enable sending the password by Talk without setting a new password');
|
throw new \InvalidArgumentException('Cannot enable sending the password by Talk without setting a new password');
|
||||||
}
|
}
|
||||||
if ($originalShare->getSendPasswordByTalk() && !$share->getSendPasswordByTalk()) {
|
if ($originalShare->getSendPasswordByTalk() && !$share->getSendPasswordByTalk()) {
|
||||||
throw new \InvalidArgumentException('Can’t disable sending the password by Talk without setting a new password');
|
throw new \InvalidArgumentException('Cannot disable sending the password by Talk without setting a new password');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1246,7 +1246,7 @@ class Manager implements IManager {
|
||||||
public function moveShare(IShare $share, $recipientId) {
|
public function moveShare(IShare $share, $recipientId) {
|
||||||
if ($share->getShareType() === IShare::TYPE_LINK
|
if ($share->getShareType() === IShare::TYPE_LINK
|
||||||
|| $share->getShareType() === IShare::TYPE_EMAIL) {
|
|| $share->getShareType() === IShare::TYPE_EMAIL) {
|
||||||
throw new \InvalidArgumentException('Can’t change target of link share');
|
throw new \InvalidArgumentException('Cannot change target of link share');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($share->getShareType() === IShare::TYPE_USER && $share->getSharedWith() !== $recipientId) {
|
if ($share->getShareType() === IShare::TYPE_USER && $share->getSharedWith() !== $recipientId) {
|
||||||
|
@ -1447,7 +1447,7 @@ class Manager implements IManager {
|
||||||
* @throws ShareNotFound
|
* @throws ShareNotFound
|
||||||
*/
|
*/
|
||||||
public function getShareByToken($token) {
|
public function getShareByToken($token) {
|
||||||
// tokens can't be valid local user names
|
// tokens cannot be valid local user names
|
||||||
if ($this->userManager->userExists($token)) {
|
if ($this->userManager->userExists($token)) {
|
||||||
throw new ShareNotFound();
|
throw new ShareNotFound();
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,13 +216,13 @@ class OC_Files {
|
||||||
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
|
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
|
||||||
OC::$server->getLogger()->logException($ex);
|
OC::$server->getLogger()->logException($ex);
|
||||||
$l = \OC::$server->getL10N('lib');
|
$l = \OC::$server->getL10N('lib');
|
||||||
\OC_Template::printErrorPage($l->t('Can\'t read file'), $ex->getMessage(), 200);
|
\OC_Template::printErrorPage($l->t('Cannot read file'), $ex->getMessage(), 200);
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
|
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
|
||||||
OC::$server->getLogger()->logException($ex);
|
OC::$server->getLogger()->logException($ex);
|
||||||
$l = \OC::$server->getL10N('lib');
|
$l = \OC::$server->getL10N('lib');
|
||||||
$hint = method_exists($ex, 'getHint') ? $ex->getHint() : '';
|
$hint = method_exists($ex, 'getHint') ? $ex->getHint() : '';
|
||||||
\OC_Template::printErrorPage($l->t('Can\'t read file'), $hint, 200);
|
\OC_Template::printErrorPage($l->t('Cannot read file'), $hint, 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -596,7 +596,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
[$this->createShare(null, IShare::TYPE_GROUP, $file, $group0, null, $user0, 31, null, null), 'SharedBy should be set', true],
|
[$this->createShare(null, IShare::TYPE_GROUP, $file, $group0, null, $user0, 31, null, null), 'SharedBy should be set', true],
|
||||||
[$this->createShare(null, IShare::TYPE_LINK, $file, null, null, $user0, 31, null, null), 'SharedBy should be set', true],
|
[$this->createShare(null, IShare::TYPE_LINK, $file, null, null, $user0, 31, null, null), 'SharedBy should be set', true],
|
||||||
|
|
||||||
[$this->createShare(null, IShare::TYPE_USER, $file, $user0, $user0, $user0, 31, null, null), 'Can’t share with yourself', true],
|
[$this->createShare(null, IShare::TYPE_USER, $file, $user0, $user0, $user0, 31, null, null), 'Cannot share with yourself', true],
|
||||||
|
|
||||||
[$this->createShare(null, IShare::TYPE_USER, null, $user2, $user0, $user0, 31, null, null), 'Path should be set', true],
|
[$this->createShare(null, IShare::TYPE_USER, null, $user2, $user0, $user0, 31, null, null), 'Path should be set', true],
|
||||||
[$this->createShare(null, IShare::TYPE_GROUP, null, $group0, $user0, $user0, 31, null, null), 'Path should be set', true],
|
[$this->createShare(null, IShare::TYPE_GROUP, null, $group0, $user0, $user0, 31, null, null), 'Path should be set', true],
|
||||||
|
@ -639,9 +639,9 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$limitedPermssions->method('getMountPoint')->willReturn($mount);
|
$limitedPermssions->method('getMountPoint')->willReturn($mount);
|
||||||
|
|
||||||
|
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, 31, null, null), 'Can’t increase permissions of path', true];
|
$data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, 31, null, null), 'Cannot increase permissions of path', true];
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $limitedPermssions, $group0, $user0, $user0, 17, null, null), 'Can’t increase permissions of path', true];
|
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $limitedPermssions, $group0, $user0, $user0, 17, null, null), 'Cannot increase permissions of path', true];
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, 3, null, null), 'Can’t increase permissions of path', true];
|
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, 3, null, null), 'Cannot increase permissions of path', true];
|
||||||
|
|
||||||
$nonMoveableMountPermssions = $this->createMock(Folder::class);
|
$nonMoveableMountPermssions = $this->createMock(Folder::class);
|
||||||
$nonMoveableMountPermssions->method('isShareable')->willReturn(true);
|
$nonMoveableMountPermssions->method('isShareable')->willReturn(true);
|
||||||
|
@ -654,17 +654,17 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$nonMoveableMountPermssions->method('getStorage')
|
$nonMoveableMountPermssions->method('getStorage')
|
||||||
->willReturn($storage);
|
->willReturn($storage);
|
||||||
|
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_USER, $nonMoveableMountPermssions, $user2, $user0, $user0, 11, null, null), 'Can’t increase permissions of path', false];
|
$data[] = [$this->createShare(null, IShare::TYPE_USER, $nonMoveableMountPermssions, $user2, $user0, $user0, 11, null, null), 'Cannot increase permissions of path', false];
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonMoveableMountPermssions, $group0, $user0, $user0, 11, null, null), 'Can’t increase permissions of path', false];
|
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonMoveableMountPermssions, $group0, $user0, $user0, 11, null, null), 'Cannot increase permissions of path', false];
|
||||||
|
|
||||||
$rootFolder = $this->createMock(Folder::class);
|
$rootFolder = $this->createMock(Folder::class);
|
||||||
$rootFolder->method('isShareable')->willReturn(true);
|
$rootFolder->method('isShareable')->willReturn(true);
|
||||||
$rootFolder->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_ALL);
|
$rootFolder->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_ALL);
|
||||||
$rootFolder->method('getId')->willReturn(42);
|
$rootFolder->method('getId')->willReturn(42);
|
||||||
|
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_USER, $rootFolder, $user2, $user0, $user0, 30, null, null), 'You can’t share your root folder', true];
|
$data[] = [$this->createShare(null, IShare::TYPE_USER, $rootFolder, $user2, $user0, $user0, 30, null, null), 'You cannot share your root folder', true];
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $rootFolder, $group0, $user0, $user0, 2, null, null), 'You can’t share your root folder', true];
|
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $rootFolder, $group0, $user0, $user0, 2, null, null), 'You cannot share your root folder', true];
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $rootFolder, null, $user0, $user0, 16, null, null), 'You can’t share your root folder', true];
|
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $rootFolder, null, $user0, $user0, 16, null, null), 'You cannot share your root folder', true];
|
||||||
|
|
||||||
$allPermssions = $this->createMock(Folder::class);
|
$allPermssions = $this->createMock(Folder::class);
|
||||||
$allPermssions->method('isShareable')->willReturn(true);
|
$allPermssions->method('isShareable')->willReturn(true);
|
||||||
|
@ -697,7 +697,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
->willReturn($storage);
|
->willReturn($storage);
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 1, null, null), null, false];
|
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 1, null, null), null, false];
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 3, null, null), null, false];
|
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 3, null, null), null, false];
|
||||||
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 31, null, null), 'Can’t increase permissions of ', true];
|
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 31, null, null), 'Cannot increase permissions of ', true];
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
@ -753,7 +753,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testGeneralCheckShareRoot() {
|
public function testGeneralCheckShareRoot() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('You can’t share your root folder');
|
$this->expectExceptionMessage('You cannot share your root folder');
|
||||||
|
|
||||||
$thrown = null;
|
$thrown = null;
|
||||||
|
|
||||||
|
@ -925,7 +925,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
*/
|
*/
|
||||||
public function testValidateExpirationDateInternalEnforceTooFarIntoFuture($shareType) {
|
public function testValidateExpirationDateInternalEnforceTooFarIntoFuture($shareType) {
|
||||||
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
|
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
|
||||||
$this->expectExceptionMessage('Can’t set expiration date more than 3 days in the future');
|
$this->expectExceptionMessage('Cannot set expiration date more than 3 days in the future');
|
||||||
|
|
||||||
$future = new \DateTime();
|
$future = new \DateTime();
|
||||||
$future->add(new \DateInterval('P7D'));
|
$future->add(new \DateInterval('P7D'));
|
||||||
|
@ -1286,7 +1286,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testValidateExpirationDateEnforceTooFarIntoFuture() {
|
public function testValidateExpirationDateEnforceTooFarIntoFuture() {
|
||||||
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
|
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
|
||||||
$this->expectExceptionMessage('Can’t set expiration date more than 3 days in the future');
|
$this->expectExceptionMessage('Cannot set expiration date more than 3 days in the future');
|
||||||
|
|
||||||
$future = new \DateTime();
|
$future = new \DateTime();
|
||||||
$future->add(new \DateInterval('P7D'));
|
$future->add(new \DateInterval('P7D'));
|
||||||
|
@ -2970,7 +2970,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareCantChangeShareType() {
|
public function testUpdateShareCantChangeShareType() {
|
||||||
$this->expectException(\Exception::class);
|
$this->expectException(\Exception::class);
|
||||||
$this->expectExceptionMessage('Can’t change share type');
|
$this->expectExceptionMessage('Cannot change share type');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3024,7 +3024,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareCantShareWithOwner() {
|
public function testUpdateShareCantShareWithOwner() {
|
||||||
$this->expectException(\Exception::class);
|
$this->expectException(\Exception::class);
|
||||||
$this->expectExceptionMessage('Can’t share with the share owner');
|
$this->expectExceptionMessage('Cannot share with the share owner');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3238,7 +3238,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareLinkEnableSendPasswordByTalkWithNoPassword() {
|
public function testUpdateShareLinkEnableSendPasswordByTalkWithNoPassword() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t enable sending the password by Talk with an empty password');
|
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3558,7 +3558,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareMailEnableSendPasswordByTalkWithNoPassword() {
|
public function testUpdateShareMailEnableSendPasswordByTalkWithNoPassword() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t enable sending the password by Talk with an empty password');
|
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3631,7 +3631,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareMailEnableSendPasswordByTalkRemovingPassword() {
|
public function testUpdateShareMailEnableSendPasswordByTalkRemovingPassword() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t enable sending the password by Talk with an empty password');
|
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3704,7 +3704,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareMailEnableSendPasswordByTalkRemovingPasswordWithEmptyString() {
|
public function testUpdateShareMailEnableSendPasswordByTalkRemovingPasswordWithEmptyString() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t enable sending the password by Talk with an empty password');
|
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3777,7 +3777,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareMailEnableSendPasswordByTalkWithPreviousPassword() {
|
public function testUpdateShareMailEnableSendPasswordByTalkWithPreviousPassword() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t enable sending the password by Talk without setting a new password');
|
$this->expectExceptionMessage('Cannot enable sending the password by Talk without setting a new password');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3851,7 +3851,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareMailDisableSendPasswordByTalkWithPreviousPassword() {
|
public function testUpdateShareMailDisableSendPasswordByTalkWithPreviousPassword() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t disable sending the password by Talk without setting a new password');
|
$this->expectExceptionMessage('Cannot disable sending the password by Talk without setting a new password');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3925,7 +3925,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testUpdateShareMailDisableSendPasswordByTalkWithoutChangingPassword() {
|
public function testUpdateShareMailDisableSendPasswordByTalkWithoutChangingPassword() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t disable sending the password by Talk without setting a new password');
|
$this->expectExceptionMessage('Cannot disable sending the password by Talk without setting a new password');
|
||||||
|
|
||||||
$manager = $this->createManagerMock()
|
$manager = $this->createManagerMock()
|
||||||
->setMethods([
|
->setMethods([
|
||||||
|
@ -3999,7 +3999,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
|
|
||||||
public function testMoveShareLink() {
|
public function testMoveShareLink() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Can’t change target of link share');
|
$this->expectExceptionMessage('Cannot change target of link share');
|
||||||
|
|
||||||
$share = $this->manager->newShare();
|
$share = $this->manager->newShare();
|
||||||
$share->setShareType(IShare::TYPE_LINK);
|
$share->setShareType(IShare::TYPE_LINK);
|
||||||
|
|
Loading…
Reference in New Issue