diff options
84 files changed, 263 insertions, 210 deletions
diff --git a/apps/comments/l10n/ar.js b/apps/comments/l10n/ar.js index 97cb4981860..39aa528f9f3 100644 --- a/apps/comments/l10n/ar.js +++ b/apps/comments/l10n/ar.js @@ -21,8 +21,8 @@ OC.L10N.register( "No more messages" : "لامزيد من الرسائل", "Retry" : "أعد المحاولة", "Unable to load the comments list" : "تعذر تحميل قائمة التعليقات", - "_%n unread comment_::_%n unread comments_" : ["%n تعليق غير مقروء","تعليقان غير مقروءة","%n تعليقات غير مقروء","%n تعليق غير مقروء","%n تعليق غير مقروء"], - "_1 new comment_::_{unread} new comments_" : ["1 تعليق جديد","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة"], + "_%n unread comment_::_%n unread comments_" : ["%n تعليق غير مقروء","%n تعليق غير مقروء","تعليقان غير مقروءة","%n تعليقات غير مقروء","%n تعليق غير مقروء","%n تعليق غير مقروء"], + "_1 new comment_::_{unread} new comments_" : ["1 تعليق جديد","1 تعليق جديد","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة"], "Comment" : "تعليق", "An error occurred while trying to edit the comment" : "حدث خطأ أثناء محاولة تعديل التعليق", "Comment deleted" : "التعليق حُذف", diff --git a/apps/comments/l10n/ar.json b/apps/comments/l10n/ar.json index 99afb0c1375..64b3d3eaea1 100644 --- a/apps/comments/l10n/ar.json +++ b/apps/comments/l10n/ar.json @@ -19,8 +19,8 @@ "No more messages" : "لامزيد من الرسائل", "Retry" : "أعد المحاولة", "Unable to load the comments list" : "تعذر تحميل قائمة التعليقات", - "_%n unread comment_::_%n unread comments_" : ["%n تعليق غير مقروء","تعليقان غير مقروءة","%n تعليقات غير مقروء","%n تعليق غير مقروء","%n تعليق غير مقروء"], - "_1 new comment_::_{unread} new comments_" : ["1 تعليق جديد","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة"], + "_%n unread comment_::_%n unread comments_" : ["%n تعليق غير مقروء","%n تعليق غير مقروء","تعليقان غير مقروءة","%n تعليقات غير مقروء","%n تعليق غير مقروء","%n تعليق غير مقروء"], + "_1 new comment_::_{unread} new comments_" : ["1 تعليق جديد","1 تعليق جديد","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة"], "Comment" : "تعليق", "An error occurred while trying to edit the comment" : "حدث خطأ أثناء محاولة تعديل التعليق", "Comment deleted" : "التعليق حُذف", diff --git a/apps/comments/l10n/lv.js b/apps/comments/l10n/lv.js index 6bfc76bb1d8..ea8c612be9f 100644 --- a/apps/comments/l10n/lv.js +++ b/apps/comments/l10n/lv.js @@ -15,7 +15,7 @@ OC.L10N.register( "Delete comment" : "Dzēst komentāru", "No comments yet, start the conversation!" : "Vēl nav komentāru, uzsāciet sarunu!", "Retry" : "Mēģināt vēlreiz", - "_%n unread comment_::_%n unread comments_" : ["%n nelasīti komentāri","%n nelasīti komentāri"], + "_%n unread comment_::_%n unread comments_" : ["%n nelasīti komentāri","%n nelasīti komentāri","%n nelasīti komentāri"], "Comment" : "Komentārs", "New comment …" : "Jauns komentārs...", "Post" : "Pievienot", diff --git a/apps/comments/l10n/lv.json b/apps/comments/l10n/lv.json index b06bdbe603b..4753017ed96 100644 --- a/apps/comments/l10n/lv.json +++ b/apps/comments/l10n/lv.json @@ -13,7 +13,7 @@ "Delete comment" : "Dzēst komentāru", "No comments yet, start the conversation!" : "Vēl nav komentāru, uzsāciet sarunu!", "Retry" : "Mēģināt vēlreiz", - "_%n unread comment_::_%n unread comments_" : ["%n nelasīti komentāri","%n nelasīti komentāri"], + "_%n unread comment_::_%n unread comments_" : ["%n nelasīti komentāri","%n nelasīti komentāri","%n nelasīti komentāri"], "Comment" : "Komentārs", "New comment …" : "Jauns komentārs...", "Post" : "Pievienot", diff --git a/apps/encryption/lib/Command/FixEncryptedVersion.php b/apps/encryption/lib/Command/FixEncryptedVersion.php index a85a96258fc..da8a69cf464 100644 --- a/apps/encryption/lib/Command/FixEncryptedVersion.php +++ b/apps/encryption/lib/Command/FixEncryptedVersion.php @@ -23,9 +23,9 @@ namespace OCA\Encryption\Command; use OC\Files\View; -use OC\HintException; use OCA\Encryption\Util; use OCP\Files\IRootFolder; +use OCP\HintException; use OCP\IConfig; use OCP\ILogger; use OCP\IUserManager; diff --git a/apps/federatedfilesharing/lib/AddressHandler.php b/apps/federatedfilesharing/lib/AddressHandler.php index 5b50be2a53a..d76ff9518b6 100644 --- a/apps/federatedfilesharing/lib/AddressHandler.php +++ b/apps/federatedfilesharing/lib/AddressHandler.php @@ -25,8 +25,8 @@ */ namespace OCA\FederatedFileSharing; -use OC\HintException; use OCP\Federation\ICloudIdManager; +use OCP\HintException; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php index 6e66e7f9b4a..404077e46af 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -31,7 +31,6 @@ */ namespace OCA\FederatedFileSharing\Controller; -use OC\HintException; use OCA\FederatedFileSharing\AddressHandler; use OCA\FederatedFileSharing\FederatedShareProvider; use OCP\AppFramework\Controller; @@ -39,6 +38,7 @@ use OCP\AppFramework\Http; use OCP\AppFramework\Http\JSONResponse; use OCP\Constants; use OCP\Federation\ICloudIdManager; +use OCP\HintException; use OCP\Http\Client\IClientService; use OCP\IL10N; use OCP\ILogger; diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php index 99adefde000..f19e251fc7a 100644 --- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php +++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php @@ -230,7 +230,7 @@ class RequestHandlerController extends OCSController { * @return Http\DataResponse * @throws OCSException * @throws ShareNotFound - * @throws \OC\HintException + * @throws \OCP\HintException */ public function acceptShare($id) { $token = isset($_POST['token']) ? $_POST['token'] : null; diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index d5fa99ef231..52b10cd9315 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -441,7 +441,7 @@ class FederatedShareProvider implements IShareProvider { * * @param IShare $share * @throws ShareNotFound - * @throws \OC\HintException + * @throws \OCP\HintException */ protected function sendPermissionUpdate(IShare $share) { $remoteId = $this->getRemoteId($share); @@ -550,7 +550,7 @@ class FederatedShareProvider implements IShareProvider { * * @param IShare $share * @throws ShareNotFound - * @throws \OC\HintException + * @throws \OCP\HintException */ public function delete(IShare $share) { [, $remote] = $this->addressHandler->splitUserRemote($share->getSharedWith()); @@ -577,7 +577,7 @@ class FederatedShareProvider implements IShareProvider { * @param IShare $share * @param bool $isOwner the user can either be the owner or the user who re-sahred it * @throws ShareNotFound - * @throws \OC\HintException + * @throws \OCP\HintException */ protected function revokeShare($share, $isOwner) { if ($this->userManager->userExists($share->getShareOwner()) && $this->userManager->userExists($share->getSharedBy())) { diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php index c72a0691fad..2a162abcd76 100644 --- a/apps/federatedfilesharing/lib/Notifications.php +++ b/apps/federatedfilesharing/lib/Notifications.php @@ -34,8 +34,8 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationProviderManager; use OCP\Http\Client\IClientService; -use OCP\OCS\IDiscoveryService; use OCP\ILogger; +use OCP\OCS\IDiscoveryService; class Notifications { public const RESPONSE_FORMAT = 'json'; // default response format for ocs calls @@ -97,7 +97,7 @@ class Notifications { * @param string $sharedByFederatedId * @param int $shareType (can be a remote user or group share) * @return bool - * @throws \OC\HintException + * @throws \OCP\HintException * @throws \OC\ServerNotAvailableException */ public function sendRemoteShare($token, $shareWith, $name, $remoteId, $owner, $ownerFederatedId, $sharedBy, $sharedByFederatedId, $shareType) { @@ -156,7 +156,7 @@ class Notifications { * @param int $permission * @param string $filename * @return array|false - * @throws \OC\HintException + * @throws \OCP\HintException * @throws \OC\ServerNotAvailableException */ public function requestReShare($token, $id, $shareId, $remote, $shareWith, $permission, $filename) { diff --git a/apps/federatedfilesharing/lib/Notifier.php b/apps/federatedfilesharing/lib/Notifier.php index a551a3cca0c..fa0119010cf 100644 --- a/apps/federatedfilesharing/lib/Notifier.php +++ b/apps/federatedfilesharing/lib/Notifier.php @@ -27,10 +27,10 @@ */ namespace OCA\FederatedFileSharing; -use OC\HintException; use OCP\Contacts\IManager; use OCP\Federation\ICloudId; use OCP\Federation\ICloudIdManager; +use OCP\HintException; use OCP\IURLGenerator; use OCP\L10N\IFactory; use OCP\Notification\INotification; diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php index 26b0288c354..cc6b260add6 100644 --- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php +++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php @@ -30,7 +30,6 @@ namespace OCA\FederatedFileSharing\OCM; use OC\AppFramework\Http; use OC\Files\Filesystem; -use OC\HintException; use OCA\FederatedFileSharing\AddressHandler; use OCA\FederatedFileSharing\FederatedShareProvider; use OCA\Files_Sharing\Activity\Providers\RemoteShares; @@ -48,6 +47,7 @@ use OCP\Federation\ICloudFederationProviderManager; use OCP\Federation\ICloudFederationShare; use OCP\Federation\ICloudIdManager; use OCP\Files\NotFoundException; +use OCP\HintException; use OCP\IConfig; use OCP\IDBConnection; use OCP\IGroupManager; @@ -55,7 +55,6 @@ use OCP\ILogger; use OCP\IURLGenerator; use OCP\IUserManager; use OCP\Notification\IManager as INotificationManager; -use OCP\Share; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; use OCP\Share\IShare; @@ -176,7 +175,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { * * @throws ProviderCouldNotAddShareException * @throws \OCP\AppFramework\QueryException - * @throws \OC\HintException + * @throws HintException * @since 14.0.0 */ public function shareReceived(ICloudFederationShare $share) { @@ -305,7 +304,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { * @throws ActionNotSupportedException * @throws AuthenticationFailedException * @throws BadRequestException - * @throws \OC\HintException + * @throws HintException * @since 14.0.0 */ public function notificationReceived($notificationType, $providerId, array $notification) { @@ -373,7 +372,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { * @throws ActionNotSupportedException * @throws AuthenticationFailedException * @throws BadRequestException - * @throws \OC\HintException + * @throws HintException */ private function shareAccepted($id, array $notification) { if (!$this->isS2SEnabled()) { @@ -442,7 +441,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider { * @throws AuthenticationFailedException * @throws BadRequestException * @throws ShareNotFound - * @throws \OC\HintException + * @throws HintException * */ protected function shareDeclined($id, array $notification) { diff --git a/apps/federatedfilesharing/templates/settings-admin.php b/apps/federatedfilesharing/templates/settings-admin.php index 7994db72991..093679bc16c 100644 --- a/apps/federatedfilesharing/templates/settings-admin.php +++ b/apps/federatedfilesharing/templates/settings-admin.php @@ -15,7 +15,7 @@ style('federatedfilesharing', 'settings-admin'); title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-sharing-federated')); ?>"></a> - <p class="settings-hint"><?php p($l->t('Adjust how people can share between servers.')); ?></p> + <p class="settings-hint"><?php p($l->t('Adjust how people can share between servers. This includes shares between users on this server as well if they are using federated sharing.')); ?></p> <p> <input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox" diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index d1d4f9cd70e..f21d29ebd7e 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -136,7 +136,7 @@ class AddressHandlerTest extends \Test\TestCase { * @param string $id */ public function testSplitUserRemoteError($id) { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->addressHandler->splitUserRemote($id); } diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index 385f644f6b4..d3a87a4c416 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -29,7 +29,6 @@ namespace OCA\FederatedFileSharing\Tests\Controller; use OC\Federation\CloudIdManager; -use OC\HintException; use OCA\FederatedFileSharing\AddressHandler; use OCA\FederatedFileSharing\Controller\MountPublicLinkController; use OCA\FederatedFileSharing\FederatedShareProvider; @@ -37,6 +36,7 @@ use OCP\AppFramework\Http; use OCP\Contacts\IManager as IContactsManager; use OCP\Federation\ICloudIdManager; use OCP\Files\IRootFolder; +use OCP\HintException; use OCP\Http\Client\IClientService; use OCP\IL10N; use OCP\IRequest; diff --git a/apps/federation/lib/Controller/SettingsController.php b/apps/federation/lib/Controller/SettingsController.php index 86c1df89caf..970211e4103 100644 --- a/apps/federation/lib/Controller/SettingsController.php +++ b/apps/federation/lib/Controller/SettingsController.php @@ -23,10 +23,10 @@ */ namespace OCA\Federation\Controller; -use OC\HintException; use OCA\Federation\TrustedServers; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; +use OCP\HintException; use OCP\IL10N; use OCP\IRequest; diff --git a/apps/federation/lib/DbHandler.php b/apps/federation/lib/DbHandler.php index ce4d1d7e44a..1dd0d1fc1c4 100644 --- a/apps/federation/lib/DbHandler.php +++ b/apps/federation/lib/DbHandler.php @@ -28,7 +28,7 @@ namespace OCA\Federation; use OC\Files\Filesystem; -use OC\HintException; +use OCP\HintException; use OCP\IDBConnection; use OCP\IL10N; diff --git a/apps/federation/lib/Middleware/AddServerMiddleware.php b/apps/federation/lib/Middleware/AddServerMiddleware.php index 2cfdad133ca..de6f7786679 100644 --- a/apps/federation/lib/Middleware/AddServerMiddleware.php +++ b/apps/federation/lib/Middleware/AddServerMiddleware.php @@ -28,12 +28,12 @@ */ namespace OCA\Federation\Middleware; -use OC\HintException; use OCA\Federation\Controller\SettingsController; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Middleware; +use OCP\HintException; use OCP\IL10N; use OCP\ILogger; diff --git a/apps/federation/lib/TrustedServers.php b/apps/federation/lib/TrustedServers.php index c1dced62102..57b9a505499 100644 --- a/apps/federation/lib/TrustedServers.php +++ b/apps/federation/lib/TrustedServers.php @@ -27,11 +27,11 @@ */ namespace OCA\Federation; -use OC\HintException; use OCA\Federation\BackgroundJob\RequestSharedSecret; use OCP\AppFramework\Http; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\IJobList; +use OCP\HintException; use OCP\Http\Client\IClientService; use OCP\IConfig; use OCP\ILogger; diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index 1f3617de389..856dcaa533f 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -88,7 +88,7 @@ class SettingsControllerTest extends TestCase { * @param bool $isOwnCloud */ public function testAddServerFail($isTrustedServer, $isOwnCloud) { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->trustedServers ->expects($this->any()) @@ -136,7 +136,7 @@ class SettingsControllerTest extends TestCase { * @param bool $isOwnCloud */ public function testCheckServerFail($isTrustedServer, $isOwnCloud) { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->trustedServers ->expects($this->any()) diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php index fdd9d1682d4..c3370cdbe90 100644 --- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php +++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php @@ -26,10 +26,10 @@ */ namespace OCA\Federation\Tests\Middleware; -use OC\HintException; use OCA\Federation\Controller\SettingsController; use OCA\Federation\Middleware\AddServerMiddleware; use OCP\AppFramework\Http; +use OCP\HintException; use OCP\IL10N; use OCP\ILogger; use Test\TestCase; diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index 3dd237ffcd3..3dd93a445cd 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -311,7 +311,7 @@ class TrustedServersTest extends TestCase { * @dataProvider dataTestCheckOwnCloudVersionTooLow */ public function testCheckOwnCloudVersionTooLow($status) { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->expectExceptionMessage('Remote server version is too low. 9.0 is required.'); $this->invokePrivate($this->trustedServers, 'checkOwnCloudVersion', [$status]); diff --git a/apps/files/l10n/ar.js b/apps/files/l10n/ar.js index 672bb9a2be3..9f86b0e6502 100644 --- a/apps/files/l10n/ar.js +++ b/apps/files/l10n/ar.js @@ -65,12 +65,12 @@ OC.L10N.register( "Name" : "الإسم", "Size" : "الحجم", "Modified" : "معدل", - "_%n folder_::_%n folders_" : ["1 مجلد %n","2 مجلد %n","عدد قليل من مجلدات %n","عدد كبير من مجلدات %n","مجلدات %n"], - "_%n file_::_%n files_" : ["ملف %n","2 ملف %n","قليل من ملفات %n","الكثير من ملفات %n"," ملفات %n"], + "_%n folder_::_%n folders_" : ["لا يوجد مجلدات %n","1 مجلد %n","2 مجلد %n","عدد قليل من مجلدات %n","عدد كبير من مجلدات %n","مجلدات %n"], + "_%n file_::_%n files_" : ["لا يوجد ملفات %n","ملف %n","2 ملف %n","قليل من ملفات %n","الكثير من ملفات %n"," ملفات %n"], "{dirs} and {files}" : "{dirs} و {files}", - "_including %n hidden_::_including %n hidden_" : ["يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي"], + "_including %n hidden_::_including %n hidden_" : ["يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي"], "You don’t have permission to upload or create files here" : "لا تملك الصلاحية لرفع او انشاء ملف هنا ", - "_Uploading %n file_::_Uploading %n files_" : ["تحميل 1 ملف %n","تحميل 2 ملف %n","يتم تحميل عدد قليل من ملفات %n","يتم تحميل عدد كبير من ملفات %n","يتم تحميل ملفات %n"], + "_Uploading %n file_::_Uploading %n files_" : ["لا يوجد ملفات %n لتحميلها","تحميل 1 ملف %n","تحميل 2 ملف %n","يتم تحميل عدد قليل من ملفات %n","يتم تحميل عدد كبير من ملفات %n","يتم تحميل ملفات %n"], "New" : "جديد", "Select file range" : "حدد نطاق الملف", "{used} of {quota} used" : "{used} من {quota} مستخدم", @@ -87,7 +87,7 @@ OC.L10N.register( "Copied!" : "نسخت!", "Copy direct link (only works for users who have access to this file/folder)" : "نسخ الرابط المباشر (يعمل فقط لـ المستخدمين الذين يمكنهم الولوج الى هذا الملف/الفايل)", "Path" : "المسار", - "_%n byte_::_%n bytes_" : ["بايت","بايت","بايت","بايت","%nبايت"], + "_%n byte_::_%n bytes_" : ["بايت","بايت","بايت","بايت","بايت","%nبايت"], "Favorited" : "المفضلة", "Favorite" : "المفضلة", "You can only favorite a single file or folder at a time" : "يمكنك فقط تفضيل ملف أو مجلد واحد في المرة الواحدة", diff --git a/apps/files/l10n/ar.json b/apps/files/l10n/ar.json index 25e3ccc5da3..43a0d7ffc68 100644 --- a/apps/files/l10n/ar.json +++ b/apps/files/l10n/ar.json @@ -63,12 +63,12 @@ "Name" : "الإسم", "Size" : "الحجم", "Modified" : "معدل", - "_%n folder_::_%n folders_" : ["1 مجلد %n","2 مجلد %n","عدد قليل من مجلدات %n","عدد كبير من مجلدات %n","مجلدات %n"], - "_%n file_::_%n files_" : ["ملف %n","2 ملف %n","قليل من ملفات %n","الكثير من ملفات %n"," ملفات %n"], + "_%n folder_::_%n folders_" : ["لا يوجد مجلدات %n","1 مجلد %n","2 مجلد %n","عدد قليل من مجلدات %n","عدد كبير من مجلدات %n","مجلدات %n"], + "_%n file_::_%n files_" : ["لا يوجد ملفات %n","ملف %n","2 ملف %n","قليل من ملفات %n","الكثير من ملفات %n"," ملفات %n"], "{dirs} and {files}" : "{dirs} و {files}", - "_including %n hidden_::_including %n hidden_" : ["يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي"], + "_including %n hidden_::_including %n hidden_" : ["يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي","يشمل %n مخفي"], "You don’t have permission to upload or create files here" : "لا تملك الصلاحية لرفع او انشاء ملف هنا ", - "_Uploading %n file_::_Uploading %n files_" : ["تحميل 1 ملف %n","تحميل 2 ملف %n","يتم تحميل عدد قليل من ملفات %n","يتم تحميل عدد كبير من ملفات %n","يتم تحميل ملفات %n"], + "_Uploading %n file_::_Uploading %n files_" : ["لا يوجد ملفات %n لتحميلها","تحميل 1 ملف %n","تحميل 2 ملف %n","يتم تحميل عدد قليل من ملفات %n","يتم تحميل عدد كبير من ملفات %n","يتم تحميل ملفات %n"], "New" : "جديد", "Select file range" : "حدد نطاق الملف", "{used} of {quota} used" : "{used} من {quota} مستخدم", @@ -85,7 +85,7 @@ "Copied!" : "نسخت!", "Copy direct link (only works for users who have access to this file/folder)" : "نسخ الرابط المباشر (يعمل فقط لـ المستخدمين الذين يمكنهم الولوج الى هذا الملف/الفايل)", "Path" : "المسار", - "_%n byte_::_%n bytes_" : ["بايت","بايت","بايت","بايت","%nبايت"], + "_%n byte_::_%n bytes_" : ["بايت","بايت","بايت","بايت","بايت","%nبايت"], "Favorited" : "المفضلة", "Favorite" : "المفضلة", "You can only favorite a single file or folder at a time" : "يمكنك فقط تفضيل ملف أو مجلد واحد في المرة الواحدة", diff --git a/apps/files/l10n/lv.js b/apps/files/l10n/lv.js index 9cccae535ae..71ce58c5fd2 100644 --- a/apps/files/l10n/lv.js +++ b/apps/files/l10n/lv.js @@ -53,12 +53,12 @@ OC.L10N.register( "Name" : "Nosaukums", "Size" : "Izmērs", "Modified" : "Mainīts", - "_%n folder_::_%n folders_" : ["%n mape","%n mapes"], - "_%n file_::_%n files_" : ["%n datne","%n datnes"], + "_%n folder_::_%n folders_" : ["%n mapes","%n mape","%n mapes"], + "_%n file_::_%n files_" : ["%n datnes","%n datne","%n datnes"], "{dirs} and {files}" : "{dirs} un {files}", - "_including %n hidden_::_including %n hidden_" : ["ieskaitot %n paslēptos","ieskaitot %n paslēptos"], + "_including %n hidden_::_including %n hidden_" : ["ieskaitot %n paslēptos","ieskaitot %n paslēptos","ieskaitot %n paslēptos"], "You don’t have permission to upload or create files here" : "Jums nav tiesību šeit augšupielādēt vai veidot datnes", - "_Uploading %n file_::_Uploading %n files_" : ["Augšupielāde %n failu","Augšupielādē %n datnes"], + "_Uploading %n file_::_Uploading %n files_" : ["%n","Augšupielāde %n failu","Augšupielādē %n datnes"], "New" : "Jauna", "\"{name}\" is an invalid file name." : "\"{name}\" ir nepareizs datnes nosaukums.", "File name cannot be empty." : "Datnes nosaukums nevar būt tukšs.", @@ -67,7 +67,7 @@ OC.L10N.register( "View in folder" : "Skatīt mapē", "Copied!" : "Nokopēts!", "Path" : "Ceļš", - "_%n byte_::_%n bytes_" : ["%n baits","%n baiti"], + "_%n byte_::_%n bytes_" : ["%n baiti","%n baits","%n baiti"], "Favorited" : "Favorīti", "Favorite" : "Iecienītais", "New folder" : "Jauna mape", @@ -135,7 +135,7 @@ OC.L10N.register( "Your storage is full, files can not be updated or synced anymore!" : "Jūsu glabātuve ir pilna, datnes vairs nevar augšupielādēt vai sinhronizēt!", "Storage of {owner} is almost full ({usedSpacePercent}%)" : "{owner} glabātuve ir gandrīz pilna ({usedSpacePercent}%)", "Your storage is almost full ({usedSpacePercent}%)" : "Jūsu glabātuve ir gandrīz pilna ({usedSpacePercent}%)", - "_matches '{filter}'_::_match '{filter}'_" : ["atrasts pēc '{filter}'","atrasti pēc '{filter}'"], + "_matches '{filter}'_::_match '{filter}'_" : ["atrasts pēc '{filter}'","atrasts pēc '{filter}'","atrasti pēc '{filter}'"], "A file or folder has been <strong>changed</strong> or <strong>renamed</strong>" : "Datne vai mape tika <strong>mainīta</strong> vai <strong>pārsaukta</strong>", "A new file or folder has been <strong>created</strong>" : "<strong>Izveidota</strong> jauna datne vai mape", "A file or folder has been <strong>deleted</strong>" : "<strong>Dzēsta</strong> datne vai mape", diff --git a/apps/files/l10n/lv.json b/apps/files/l10n/lv.json index e7417d3dd9d..9930519b736 100644 --- a/apps/files/l10n/lv.json +++ b/apps/files/l10n/lv.json @@ -51,12 +51,12 @@ "Name" : "Nosaukums", "Size" : "Izmērs", "Modified" : "Mainīts", - "_%n folder_::_%n folders_" : ["%n mape","%n mapes"], - "_%n file_::_%n files_" : ["%n datne","%n datnes"], + "_%n folder_::_%n folders_" : ["%n mapes","%n mape","%n mapes"], + "_%n file_::_%n files_" : ["%n datnes","%n datne","%n datnes"], "{dirs} and {files}" : "{dirs} un {files}", - "_including %n hidden_::_including %n hidden_" : ["ieskaitot %n paslēptos","ieskaitot %n paslēptos"], + "_including %n hidden_::_including %n hidden_" : ["ieskaitot %n paslēptos","ieskaitot %n paslēptos","ieskaitot %n paslēptos"], "You don’t have permission to upload or create files here" : "Jums nav tiesību šeit augšupielādēt vai veidot datnes", - "_Uploading %n file_::_Uploading %n files_" : ["Augšupielāde %n failu","Augšupielādē %n datnes"], + "_Uploading %n file_::_Uploading %n files_" : ["%n","Augšupielāde %n failu","Augšupielādē %n datnes"], "New" : "Jauna", "\"{name}\" is an invalid file name." : "\"{name}\" ir nepareizs datnes nosaukums.", "File name cannot be empty." : "Datnes nosaukums nevar būt tukšs.", @@ -65,7 +65,7 @@ "View in folder" : "Skatīt mapē", "Copied!" : "Nokopēts!", "Path" : "Ceļš", - "_%n byte_::_%n bytes_" : ["%n baits","%n baiti"], + "_%n byte_::_%n bytes_" : ["%n baiti","%n baits","%n baiti"], "Favorited" : "Favorīti", "Favorite" : "Iecienītais", "New folder" : "Jauna mape", @@ -133,7 +133,7 @@ "Your storage is full, files can not be updated or synced anymore!" : "Jūsu glabātuve ir pilna, datnes vairs nevar augšupielādēt vai sinhronizēt!", "Storage of {owner} is almost full ({usedSpacePercent}%)" : "{owner} glabātuve ir gandrīz pilna ({usedSpacePercent}%)", "Your storage is almost full ({usedSpacePercent}%)" : "Jūsu glabātuve ir gandrīz pilna ({usedSpacePercent}%)", - "_matches '{filter}'_::_match '{filter}'_" : ["atrasts pēc '{filter}'","atrasti pēc '{filter}'"], + "_matches '{filter}'_::_match '{filter}'_" : ["atrasts pēc '{filter}'","atrasts pēc '{filter}'","atrasti pēc '{filter}'"], "A file or folder has been <strong>changed</strong> or <strong>renamed</strong>" : "Datne vai mape tika <strong>mainīta</strong> vai <strong>pārsaukta</strong>", "A new file or folder has been <strong>created</strong>" : "<strong>Izveidota</strong> jauna datne vai mape", "A file or folder has been <strong>deleted</strong>" : "<strong>Dzēsta</strong> datne vai mape", diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index fbee6bf4b77..95c3303ae74 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -42,9 +42,9 @@ */ namespace OCA\Files_Sharing\Controller; +use OC\Security\CSP\ContentSecurityPolicy; use OC_Files; use OC_Util; -use OC\Security\CSP\ContentSecurityPolicy; use OCA\FederatedFileSharing\FederatedShareProvider; use OCA\Files_Sharing\Activity\Providers\Downloads; use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent; @@ -242,7 +242,7 @@ class ShareController extends AuthPublicShareController { * otherwise token * @param int $errorCode * @param string $errorMessage - * @throws \OC\HintException + * @throws \OCP\HintException * @throws \OC\ServerNotAvailableException */ protected function emitAccessShareHook($share, $errorCode = 200, $errorMessage = '') { diff --git a/apps/files_versions/l10n/lv.js b/apps/files_versions/l10n/lv.js index ef40e0547f7..f61fff9b8d1 100644 --- a/apps/files_versions/l10n/lv.js +++ b/apps/files_versions/l10n/lv.js @@ -4,7 +4,7 @@ OC.L10N.register( "Versions" : "Versijas", "This application automatically maintains older versions of files that are changed." : "Šī lietotne automātiski uztur vecākas versijas datnēm, kas tiek izmainītas.", "Failed to revert {file} to revision {timestamp}." : "Neizdevās atjaunot {file} no rediģējuma {timestamp} ", - "_%n byte_::_%n bytes_" : ["%n baiti","%n baiti"], + "_%n byte_::_%n bytes_" : ["%n baiti","%n baiti","%n baiti"], "Restore" : "Atjaunot", "No other versions available" : "Citas versijas nav pieejamas" }, diff --git a/apps/files_versions/l10n/lv.json b/apps/files_versions/l10n/lv.json index d8b815d382c..7acbe5f7b15 100644 --- a/apps/files_versions/l10n/lv.json +++ b/apps/files_versions/l10n/lv.json @@ -2,7 +2,7 @@ "Versions" : "Versijas", "This application automatically maintains older versions of files that are changed." : "Šī lietotne automātiski uztur vecākas versijas datnēm, kas tiek izmainītas.", "Failed to revert {file} to revision {timestamp}." : "Neizdevās atjaunot {file} no rediģējuma {timestamp} ", - "_%n byte_::_%n bytes_" : ["%n baiti","%n baiti"], + "_%n byte_::_%n bytes_" : ["%n baiti","%n baiti","%n baiti"], "Restore" : "Atjaunot", "No other versions available" : "Citas versijas nav pieejamas" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index d94e8fed8a8..01e4bac9c2b 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -47,7 +47,6 @@ use libphonenumber\PhoneNumber; use libphonenumber\PhoneNumberFormat; use libphonenumber\PhoneNumberUtil; use OC\Authentication\Token\RemoteWipe; -use OC\HintException; use OC\KnownUser\KnownUserService; use OC\User\Backend; use OCA\Settings\Mailer\NewUserMailHelper; @@ -59,6 +58,8 @@ use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCS\OCSForbiddenException; use OCP\AppFramework\OCSController; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\HintException; use OCP\IConfig; use OCP\IGroup; use OCP\IGroupManager; @@ -68,9 +69,8 @@ use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; use OCP\L10N\IFactory; -use OCP\Security\ISecureRandom; use OCP\Security\Events\GenerateSecurePasswordEvent; -use OCP\EventDispatcher\IEventDispatcher; +use OCP\Security\ISecureRandom; use OCP\User\Backend\ISetDisplayNameBackend; use Psr\Log\LoggerInterface; diff --git a/apps/settings/lib/Controller/ChangePasswordController.php b/apps/settings/lib/Controller/ChangePasswordController.php index 76ac2f792ac..8dd1e6ba028 100644 --- a/apps/settings/lib/Controller/ChangePasswordController.php +++ b/apps/settings/lib/Controller/ChangePasswordController.php @@ -36,11 +36,11 @@ namespace OCA\Settings\Controller; use OC\Group\Manager as GroupManager; -use OC\HintException; use OC\User\Session; use OCP\App\IAppManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; +use OCP\HintException; use OCP\IGroupManager; use OCP\IL10N; use OCP\IRequest; diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index b5226850fa4..74e78c48d86 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -40,7 +40,6 @@ */ namespace OCA\ShareByMail; -use OC\HintException; use OC\Share20\Exception\InvalidShare; use OC\Share20\Share; use OC\User\NoUserException; @@ -52,6 +51,7 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Node; +use OCP\HintException; use OCP\IDBConnection; use OCP\IL10N; use OCP\ILogger; diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 9c3b6525736..64d81aab254 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -479,7 +479,7 @@ class ShareByMailProviderTest extends TestCase { public function testCreateMailShareFailed() { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->share->expects($this->any())->method('getToken')->willReturn('token'); $this->share->expects($this->once())->method('setToken')->with('token'); diff --git a/apps/updatenotification/l10n/ar.js b/apps/updatenotification/l10n/ar.js index e502d5058d9..5d9e9777283 100644 --- a/apps/updatenotification/l10n/ar.js +++ b/apps/updatenotification/l10n/ar.js @@ -41,6 +41,6 @@ OC.L10N.register( "Checking apps for compatible updates" : "التحقق من التطبيقات للحصول على تحديثات متوافقة", "Could not connect to the appstore or the appstore returned no updates at all. Search manually for updates or make sure your server has access to the internet and can connect to the appstore." : "تعذر الاتصال بمتجر التطبيقات أو أن متجر التطبيقات لم يُرجع أي تحديثات على الإطلاق. ابحث يدويًا عن التحديثات أو تأكد من وصول الخادم إلى الإنترنت ويمكنه الاتصال بمتجر التطبيقات.", "<strong>All</strong> apps have an update for this version available" : "<strong>جميع</strong> التطبيقات لديها تحديث لهذا الإصدار", - "_<strong>%n</strong> app has no update for this version available_::_<strong>%n</strong> apps have no update for this version available_" : ["<strong>%n</strong> تطبيق لا يوجد لديه تحديث لهذه النسخة","<strong>%n</strong> تطبيقان لا يوجد لديهم تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong>تطبيقات لا توجد لديها تحديث لهذه النسخة"] + "_<strong>%n</strong> app has no update for this version available_::_<strong>%n</strong> apps have no update for this version available_" : ["<strong>%n</strong> تطبيق لا يوجد لديه تحديث لهذه النسخة","<strong>%n</strong> تطبيق لا يوجد لديه تحديث لهذه النسخة","<strong>%n</strong> تطبيقان لا يوجد لديهم تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong>تطبيقات لا توجد لديها تحديث لهذه النسخة"] }, "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"); diff --git a/apps/updatenotification/l10n/ar.json b/apps/updatenotification/l10n/ar.json index 150a1f3d208..ea59d2ac2f2 100644 --- a/apps/updatenotification/l10n/ar.json +++ b/apps/updatenotification/l10n/ar.json @@ -39,6 +39,6 @@ "Checking apps for compatible updates" : "التحقق من التطبيقات للحصول على تحديثات متوافقة", "Could not connect to the appstore or the appstore returned no updates at all. Search manually for updates or make sure your server has access to the internet and can connect to the appstore." : "تعذر الاتصال بمتجر التطبيقات أو أن متجر التطبيقات لم يُرجع أي تحديثات على الإطلاق. ابحث يدويًا عن التحديثات أو تأكد من وصول الخادم إلى الإنترنت ويمكنه الاتصال بمتجر التطبيقات.", "<strong>All</strong> apps have an update for this version available" : "<strong>جميع</strong> التطبيقات لديها تحديث لهذا الإصدار", - "_<strong>%n</strong> app has no update for this version available_::_<strong>%n</strong> apps have no update for this version available_" : ["<strong>%n</strong> تطبيق لا يوجد لديه تحديث لهذه النسخة","<strong>%n</strong> تطبيقان لا يوجد لديهم تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong>تطبيقات لا توجد لديها تحديث لهذه النسخة"] + "_<strong>%n</strong> app has no update for this version available_::_<strong>%n</strong> apps have no update for this version available_" : ["<strong>%n</strong> تطبيق لا يوجد لديه تحديث لهذه النسخة","<strong>%n</strong> تطبيق لا يوجد لديه تحديث لهذه النسخة","<strong>%n</strong> تطبيقان لا يوجد لديهم تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong> تطبيقات لا توجد لديها تحديث لهذه النسخة","<strong>%n</strong>تطبيقات لا توجد لديها تحديث لهذه النسخة"] },"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" }
\ No newline at end of file diff --git a/apps/user_ldap/l10n/lv.js b/apps/user_ldap/l10n/lv.js index 3ac4ab2b482..095a43b4e47 100644 --- a/apps/user_ldap/l10n/lv.js +++ b/apps/user_ldap/l10n/lv.js @@ -35,8 +35,8 @@ OC.L10N.register( "LDAP Operations error. Anonymous bind might not be allowed." : "LDAP operācijas kļūda. Anonīma sasaiste, iespējams, nav atļauta.", "Select attributes" : "Atlasīt atribūtus", "Password change rejected. Hint: " : "Paroles maiņas noraidīja. Padoms:", - "_%s group found_::_%s groups found_" : ["%s grupas atrastas","%s grupas atrastas"], - "_%s user found_::_%s users found_" : ["%s lietotāji atrasti","%s lietotāji atrasti"], + "_%s group found_::_%s groups found_" : ["%s grupas atrastas","%s grupas atrastas","%s grupas atrastas"], + "_%s user found_::_%s users found_" : ["%s lietotāji atrasti","%s lietotāji atrasti","%s lietotāji atrasti"], "Invalid Host" : "Nederīgs resursdators", "Test Configuration" : "Testa konfigurācija", "Help" : "Palīdzība", diff --git a/apps/user_ldap/l10n/lv.json b/apps/user_ldap/l10n/lv.json index 4c902ff6b8b..4e4dddbc8ac 100644 --- a/apps/user_ldap/l10n/lv.json +++ b/apps/user_ldap/l10n/lv.json @@ -33,8 +33,8 @@ "LDAP Operations error. Anonymous bind might not be allowed." : "LDAP operācijas kļūda. Anonīma sasaiste, iespējams, nav atļauta.", "Select attributes" : "Atlasīt atribūtus", "Password change rejected. Hint: " : "Paroles maiņas noraidīja. Padoms:", - "_%s group found_::_%s groups found_" : ["%s grupas atrastas","%s grupas atrastas"], - "_%s user found_::_%s users found_" : ["%s lietotāji atrasti","%s lietotāji atrasti"], + "_%s group found_::_%s groups found_" : ["%s grupas atrastas","%s grupas atrastas","%s grupas atrastas"], + "_%s user found_::_%s users found_" : ["%s lietotāji atrasti","%s lietotāji atrasti","%s lietotāji atrasti"], "Invalid Host" : "Nederīgs resursdators", "Test Configuration" : "Testa konfigurācija", "Help" : "Palīdzība", diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 47cecd1bf7d..33329c0f03a 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -47,7 +47,6 @@ namespace OCA\User_LDAP; use DomainException; -use OC\HintException; use OC\Hooks\PublicEmitter; use OC\ServerNotAvailableException; use OCA\User_LDAP\Exceptions\ConstraintViolationException; @@ -56,6 +55,7 @@ use OCA\User_LDAP\Mapping\AbstractMapping; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User\Manager; use OCA\User_LDAP\User\OfflineUser; +use OCP\HintException; use OCP\IConfig; use OCP\ILogger; use OCP\IUserManager; diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php index eb8b19192c3..66371cb3b49 100644 --- a/apps/user_ldap/lib/Controller/RenewPasswordController.php +++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php @@ -23,10 +23,10 @@ */ namespace OCA\User_LDAP\Controller; -use OC\HintException; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\TemplateResponse; +use OCP\HintException; use OCP\IConfig; use OCP\IL10N; use OCP\IRequest; @@ -139,7 +139,7 @@ class RenewPasswordController extends Controller { ]); return new RedirectResponse($this->urlGenerator->linkToRoute('user_ldap.renewPassword.showRenewPasswordForm', $args)); } - + try { if (!is_null($newPassword) && \OC_User::setPassword($user, $newPassword)) { $this->session->set('loginMessages', [ diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index ae07ea509ef..e49faca70cc 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -482,7 +482,7 @@ class AccessTest extends TestCase { public function testSetPasswordWithRejectedChange() { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->expectExceptionMessage('Password change rejected.'); $this->connection diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 78767ff6760..3142a256c9a 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -31,7 +31,6 @@ */ namespace OCA\User_LDAP\Tests; -use OC\HintException; use OC\User\Backend; use OC\User\Session; use OCA\User_LDAP\Access; @@ -44,6 +43,7 @@ use OCA\User_LDAP\User\User; use OCA\User_LDAP\User_LDAP; use OCA\User_LDAP\User_LDAP as UserLDAP; use OCA\User_LDAP\UserPluginManager; +use OCP\HintException; use OCP\IConfig; use OCP\IUser; use OCP\Notification\IManager as INotificationManager; @@ -1214,7 +1214,7 @@ class User_LDAPTest extends TestCase { public function testSetPasswordInvalid() { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->expectExceptionMessage('Password fails quality checking policy'); $this->prepareAccessForSetPassword($this->access); @@ -1359,7 +1359,7 @@ class User_LDAPTest extends TestCase { public function testSetDisplayNameErrorWithPlugin() { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $newDisplayName = 'J. Baker'; $this->pluginManager->expects($this->once()) diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 99427132f5e..bed96eeec83 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -35,11 +35,8 @@ */ namespace OC\Core\Controller; -use function array_filter; -use function count; use OC\Authentication\TwoFactorAuth\Manager; use OC\Core\Exception\ResetPasswordException; -use OC\HintException; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\TemplateResponse; @@ -47,6 +44,7 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Defaults; use OCP\Encryption\IEncryptionModule; use OCP\Encryption\IManager; +use OCP\HintException; use OCP\IConfig; use OCP\IInitialStateService; use OCP\IL10N; @@ -58,6 +56,8 @@ use OCP\IUserManager; use OCP\Mail\IMailer; use OCP\Security\ICrypto; use OCP\Security\ISecureRandom; +use function array_filter; +use function count; use function reset; /** diff --git a/core/css/apps.scss b/core/css/apps.scss index cb2b32611b1..370784c1785 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -729,8 +729,10 @@ $min-content-width: $breakpoint-mobile - $navigation-width - $list-min-width; border: 0; border-radius: 0; text-align: left; - padding-left: 42px; + padding-left: 44px; font-weight: normal; + font-size: 100%; + opacity: 0.8; /* like app-navigation a */ color: var(--color-main-text); diff --git a/core/l10n/ar.js b/core/l10n/ar.js index 582e6f133b7..13dda8e1e86 100644 --- a/core/l10n/ar.js +++ b/core/l10n/ar.js @@ -118,7 +118,7 @@ OC.L10N.register( "Hello {name}" : "مرحبا {name}", "<strong>These are your search results<script>alert(1)</script></strong>" : "<strong>هذه هي نتائج البحث الخاصة بك <script>تنبيه(1)</script> </strong>", "new" : "جديد", - "_download %n file_::_download %n files_" : ["تنزيل ملف واحد","تنزيل ملفين","تنزيل %n ملفات","تنزيل %n ملفات","تنزيل %n ملفات"], + "_download %n file_::_download %n files_" : ["تنزيل %n ملف","تنزيل ملف واحد","تنزيل ملفين","تنزيل %n ملفات","تنزيل %n ملفات","تنزيل %n ملفات"], "The update is in progress, leaving this page might interrupt the process in some environments." : "جاري التحديث، وقد يؤدي مغادرة هذه الصفحة إلى توقف العملية في بعض الاحيان.", "Update to {version}" : "التحديث إلى {version}", "An error occurred." : "حدث خطأ.", @@ -126,7 +126,7 @@ OC.L10N.register( "The update was unsuccessful. For more information <a href=\"{url}\">check our forum post</a> covering this issue." : "فشل التحديث. لمزيد من المعلومات <a href=\"{url}\"> تصفح مقالات المنتدى الخاص بنا </a> لإصلاح هذا الخطأ.", "The update was unsuccessful. Please report this issue to the <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\">Nextcloud community</a>." : "فشل التحديث. يرجى التبليغ عن هذه المشكلة إلى <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\"> مجتمع Nextcloud </a>.", "Continue to {productName}" : "أكمل إلى {productName}", - "_The update was successful. Redirecting you to {productName} in %n second._::_The update was successful. Redirecting you to {productName} in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني."], + "_The update was successful. Redirecting you to {productName} in %n second._::_The update was successful. Redirecting you to {productName} in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني."], "Log in" : "تسجيل الدخول", "Logging in …" : "تسجيل الدخول …", "Server side authentication failed!" : "رفض الخادم المصادقة!", @@ -173,7 +173,7 @@ OC.L10N.register( "Load more results" : " عرض المزيد من النتائج", "Search" : "البحث", "An error occurred while searching for {type}" : "حدث خطأ أثناء البحث عن {type}", - "_Please enter {minSearchLength} character or more to search_::_Please enter {minSearchLength} characters or more to search_" : ["من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث"], + "_Please enter {minSearchLength} character or more to search_::_Please enter {minSearchLength} characters or more to search_" : ["من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث"], "Search {types} …" : "بحث {types} …", "Settings" : "الإعدادات", "Could not load your contacts" : "تعذر تحميل جهات الإتصال", @@ -203,7 +203,7 @@ OC.L10N.register( "OK" : "موافق", "Error loading message template: {error}" : "حصل خطأ في القالب: {error}", "read-only" : "قراءة فقط", - "_{count} file conflict_::_{count} file conflicts_" : ["{count} ملف متعارض","ملفان متعارضان","{count} ملفات متعارضة"," {count} ملفا متعارضا","{count} ملفات متعارضه"], + "_{count} file conflict_::_{count} file conflicts_" : ["لا يوجد تعارض","{count} ملف متعارض","ملفان متعارضان","{count} ملفات متعارضة"," {count} ملفا متعارضا","{count} ملفات متعارضه"], "One file conflict" : "تعارض ملف واحد", "New Files" : "ملفات جديدة", "Already existing files" : "المفات موجودة مسبقاً", @@ -223,7 +223,7 @@ OC.L10N.register( "Failed to authenticate, try again" : "أخفقت المصادقة، أعد المحاولة", "seconds ago" : "منذ ثواني", "Connection to server lost" : "تم فقد الاتصال بالخادم", - "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني."], + "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثانية","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني."], "Add to a project" : "إضافة إلى مشروع", "Show details" : "عرض التفاصيل", "Hide details" : "إخفاء التفاصيل", @@ -394,10 +394,10 @@ OC.L10N.register( "The \"Strict-Transport-Security\" HTTP header is not set to at least \"{seconds}\" seconds. For enhanced security, it is recommended to enable HSTS as described in the <a href=\"{docUrl}\" rel=\"noreferrer noopener\">security tips ↗</a>." : "لم يتم تعيين رأس HTTP \"Strict-Transport-Security\" على \"{seconds}\" ثانية على الأقل. لتحسين الأمان ، يوصى بتمكين HSTS كما هو موضح في <a href=\"{docUrl}\" rel=\"noreferrer noopener\">إرشادات الأمان ↗</a>.", "Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the <a href=\"{docUrl}\">security tips ↗</a>." : "الوصول إلى الموقع بشكل غير آمن عبر HTTP. يُنصح بشدة تعيين الخادم الخاص بك لطلب HTTPS بدلاً من ذلك ، كما هو موضح في <a href=\"{docUrl}\">إرشادات الأمان ↗</a>.", "Continue to Nextcloud" : "المواصلة إلى نكست كلاود", - "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني."], + "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني."], "Searching other places" : "البحث في أماكن أخرى", "No search results in other folders for {tag}{filter}{endtag}" : "لا نتائج بحث في مجلدات اخرى ل {tag}{filter}{endtag}", - "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى"], + "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى"], "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "تم إرسال رسالة إعادة تعيين كلمة المرور إلى عنوان البريد الإلكتروني لهذا الحساب. إذا لم تستلمها ، فتحقق من مجلدات البريد الغير هام / غير المرغوب فيه أو اطلب المساعدة من المسؤول المحلي.", "Password can not be changed. Please contact your administrator." : "كلمة المرور لا يمكن تغييرها. فضلاً تحدث مع المسؤول", "Could not fetch list of apps from the app store." : "لا يمكن العثور على قائمة التطبيقات من متجر التطبيقات.", diff --git a/core/l10n/ar.json b/core/l10n/ar.json index 64998c6a4cc..e30907eb791 100644 --- a/core/l10n/ar.json +++ b/core/l10n/ar.json @@ -116,7 +116,7 @@ "Hello {name}" : "مرحبا {name}", "<strong>These are your search results<script>alert(1)</script></strong>" : "<strong>هذه هي نتائج البحث الخاصة بك <script>تنبيه(1)</script> </strong>", "new" : "جديد", - "_download %n file_::_download %n files_" : ["تنزيل ملف واحد","تنزيل ملفين","تنزيل %n ملفات","تنزيل %n ملفات","تنزيل %n ملفات"], + "_download %n file_::_download %n files_" : ["تنزيل %n ملف","تنزيل ملف واحد","تنزيل ملفين","تنزيل %n ملفات","تنزيل %n ملفات","تنزيل %n ملفات"], "The update is in progress, leaving this page might interrupt the process in some environments." : "جاري التحديث، وقد يؤدي مغادرة هذه الصفحة إلى توقف العملية في بعض الاحيان.", "Update to {version}" : "التحديث إلى {version}", "An error occurred." : "حدث خطأ.", @@ -124,7 +124,7 @@ "The update was unsuccessful. For more information <a href=\"{url}\">check our forum post</a> covering this issue." : "فشل التحديث. لمزيد من المعلومات <a href=\"{url}\"> تصفح مقالات المنتدى الخاص بنا </a> لإصلاح هذا الخطأ.", "The update was unsuccessful. Please report this issue to the <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\">Nextcloud community</a>." : "فشل التحديث. يرجى التبليغ عن هذه المشكلة إلى <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\"> مجتمع Nextcloud </a>.", "Continue to {productName}" : "أكمل إلى {productName}", - "_The update was successful. Redirecting you to {productName} in %n second._::_The update was successful. Redirecting you to {productName} in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني."], + "_The update was successful. Redirecting you to {productName} in %n second._::_The update was successful. Redirecting you to {productName} in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى {productName} خلال %n ثواني."], "Log in" : "تسجيل الدخول", "Logging in …" : "تسجيل الدخول …", "Server side authentication failed!" : "رفض الخادم المصادقة!", @@ -171,7 +171,7 @@ "Load more results" : " عرض المزيد من النتائج", "Search" : "البحث", "An error occurred while searching for {type}" : "حدث خطأ أثناء البحث عن {type}", - "_Please enter {minSearchLength} character or more to search_::_Please enter {minSearchLength} characters or more to search_" : ["من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث"], + "_Please enter {minSearchLength} character or more to search_::_Please enter {minSearchLength} characters or more to search_" : ["من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث","من فضلك ادخل أحرف {minSearchLength} أو أكثر للبحث"], "Search {types} …" : "بحث {types} …", "Settings" : "الإعدادات", "Could not load your contacts" : "تعذر تحميل جهات الإتصال", @@ -201,7 +201,7 @@ "OK" : "موافق", "Error loading message template: {error}" : "حصل خطأ في القالب: {error}", "read-only" : "قراءة فقط", - "_{count} file conflict_::_{count} file conflicts_" : ["{count} ملف متعارض","ملفان متعارضان","{count} ملفات متعارضة"," {count} ملفا متعارضا","{count} ملفات متعارضه"], + "_{count} file conflict_::_{count} file conflicts_" : ["لا يوجد تعارض","{count} ملف متعارض","ملفان متعارضان","{count} ملفات متعارضة"," {count} ملفا متعارضا","{count} ملفات متعارضه"], "One file conflict" : "تعارض ملف واحد", "New Files" : "ملفات جديدة", "Already existing files" : "المفات موجودة مسبقاً", @@ -221,7 +221,7 @@ "Failed to authenticate, try again" : "أخفقت المصادقة، أعد المحاولة", "seconds ago" : "منذ ثواني", "Connection to server lost" : "تم فقد الاتصال بالخادم", - "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني."], + "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثانية","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني ","حدث خطأ أثناء تحميل الصفحة، سيعاد التحميل خلال %n ثواني."], "Add to a project" : "إضافة إلى مشروع", "Show details" : "عرض التفاصيل", "Hide details" : "إخفاء التفاصيل", @@ -392,10 +392,10 @@ "The \"Strict-Transport-Security\" HTTP header is not set to at least \"{seconds}\" seconds. For enhanced security, it is recommended to enable HSTS as described in the <a href=\"{docUrl}\" rel=\"noreferrer noopener\">security tips ↗</a>." : "لم يتم تعيين رأس HTTP \"Strict-Transport-Security\" على \"{seconds}\" ثانية على الأقل. لتحسين الأمان ، يوصى بتمكين HSTS كما هو موضح في <a href=\"{docUrl}\" rel=\"noreferrer noopener\">إرشادات الأمان ↗</a>.", "Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead, as described in the <a href=\"{docUrl}\">security tips ↗</a>." : "الوصول إلى الموقع بشكل غير آمن عبر HTTP. يُنصح بشدة تعيين الخادم الخاص بك لطلب HTTPS بدلاً من ذلك ، كما هو موضح في <a href=\"{docUrl}\">إرشادات الأمان ↗</a>.", "Continue to Nextcloud" : "المواصلة إلى نكست كلاود", - "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني."], + "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال%n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني.","تم التحديث بنجاح، سوف يعاد توجيهك إلى نكست كلاود خلال %n ثواني."], "Searching other places" : "البحث في أماكن أخرى", "No search results in other folders for {tag}{filter}{endtag}" : "لا نتائج بحث في مجلدات اخرى ل {tag}{filter}{endtag}", - "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى"], + "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى","{count} نتائج البحث في مجلدات اخرى"], "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "تم إرسال رسالة إعادة تعيين كلمة المرور إلى عنوان البريد الإلكتروني لهذا الحساب. إذا لم تستلمها ، فتحقق من مجلدات البريد الغير هام / غير المرغوب فيه أو اطلب المساعدة من المسؤول المحلي.", "Password can not be changed. Please contact your administrator." : "كلمة المرور لا يمكن تغييرها. فضلاً تحدث مع المسؤول", "Could not fetch list of apps from the app store." : "لا يمكن العثور على قائمة التطبيقات من متجر التطبيقات.", diff --git a/core/l10n/lv.js b/core/l10n/lv.js index a74b8e2eb2d..0ce7091f76a 100644 --- a/core/l10n/lv.js +++ b/core/l10n/lv.js @@ -64,7 +64,7 @@ OC.L10N.register( "Hello {name}, the weather is {weather}" : "Sveiks {name}, laiks ir {weather}", "Hello {name}" : "Sveiks {name}", "new" : "jauns", - "_download %n file_::_download %n files_" : ["lejupielādēt %n failus","lejupielādēt %n datnes"], + "_download %n file_::_download %n files_" : ["lejupielādēt %n failus","lejupielādēt %n failus","lejupielādēt %n datnes"], "The update is in progress, leaving this page might interrupt the process in some environments." : "Notiek atjaunināšana, šīs lapas atstāšana var pārtraukt procesu dažās vidēs.", "Update to {version}" : "Atjaunināts uz {version}", "An error occurred." : "Radās kļūda.", @@ -134,7 +134,7 @@ OC.L10N.register( "OK" : "Labi", "Error loading message template: {error}" : "Kļūda ielādējot ziņojuma veidni: {error}", "read-only" : "tikai-skatīt", - "_{count} file conflict_::_{count} file conflicts_" : ["{count} datnes konflikts","{count} datņu konflikti"], + "_{count} file conflict_::_{count} file conflicts_" : ["{count} datnes konflikts","{count} datnes konflikts","{count} datņu konflikti"], "One file conflict" : "Vienas datnes konflikts", "New Files" : "Jaunas datnes", "Already existing files" : "Jau esošas datnes", @@ -154,7 +154,7 @@ OC.L10N.register( "Failed to authenticate, try again" : "Neizdevās autentificēt, mēģiniet vēlreiz", "seconds ago" : "pirms mirkļa", "Connection to server lost" : "Zaudēts savienojums ar serveri", - "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm","Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm"], + "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm","Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm","Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm"], "Add to a project" : "Pievienot projektam", "Show details" : "Rādīt detaļas", "Hide details" : "Slēpt detaļas", @@ -259,10 +259,10 @@ OC.L10N.register( "Last background job execution ran {relativeTime}. Something seems wrong." : "Pēdējā fona darba palaišana aizņēma {relativeTime}. Kaut kas škiet nepareizi.", "Check the background job settings" : "Pārmainīt fona darbu iestatījumus", "Continue to Nextcloud" : "Turpināt ar Nextcloud", - "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundes.","Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundēm."], + "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundēm.","Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundes.","Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundēm."], "Searching other places" : "Meklēt citās vietās", "No search results in other folders for {tag}{filter}{endtag}" : "Nav nekas atrasts citā mapēs {tag}{filter}{endtag}", - "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} meklēšanas rezultāti citās mapēs","{count} meklēšanas rezultāti citās mapēs"], + "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} meklēšanas rezultāti citās mapēs","{count} meklēšanas rezultāti citās mapēs","{count} meklēšanas rezultāti citās mapēs"], "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "Paroles atiestatīšanas ziņojums ir nosūtīts uz šī konta e-pasta adresi. Ja to nesaņemat, pārbaudiet mēstuļu mapes vai lūdziet palīdzību savam vietējam administratoram.", "Password can not be changed. Please contact your administrator." : "Paroli, nevar nomainīt. Lūdzu kontaktēties ar savu administratoru.", "Could not fetch list of apps from the app store." : "Nevarēja ielādēt lietotņu sarakstu no lietotņu veikala.", diff --git a/core/l10n/lv.json b/core/l10n/lv.json index cb5b9862d2f..34462e4023a 100644 --- a/core/l10n/lv.json +++ b/core/l10n/lv.json @@ -62,7 +62,7 @@ "Hello {name}, the weather is {weather}" : "Sveiks {name}, laiks ir {weather}", "Hello {name}" : "Sveiks {name}", "new" : "jauns", - "_download %n file_::_download %n files_" : ["lejupielādēt %n failus","lejupielādēt %n datnes"], + "_download %n file_::_download %n files_" : ["lejupielādēt %n failus","lejupielādēt %n failus","lejupielādēt %n datnes"], "The update is in progress, leaving this page might interrupt the process in some environments." : "Notiek atjaunināšana, šīs lapas atstāšana var pārtraukt procesu dažās vidēs.", "Update to {version}" : "Atjaunināts uz {version}", "An error occurred." : "Radās kļūda.", @@ -132,7 +132,7 @@ "OK" : "Labi", "Error loading message template: {error}" : "Kļūda ielādējot ziņojuma veidni: {error}", "read-only" : "tikai-skatīt", - "_{count} file conflict_::_{count} file conflicts_" : ["{count} datnes konflikts","{count} datņu konflikti"], + "_{count} file conflict_::_{count} file conflicts_" : ["{count} datnes konflikts","{count} datnes konflikts","{count} datņu konflikti"], "One file conflict" : "Vienas datnes konflikts", "New Files" : "Jaunas datnes", "Already existing files" : "Jau esošas datnes", @@ -152,7 +152,7 @@ "Failed to authenticate, try again" : "Neizdevās autentificēt, mēģiniet vēlreiz", "seconds ago" : "pirms mirkļa", "Connection to server lost" : "Zaudēts savienojums ar serveri", - "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm","Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm"], + "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm","Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm","Problēma ielādējot lapu, pārlādēšana pēc %n sekundēm"], "Add to a project" : "Pievienot projektam", "Show details" : "Rādīt detaļas", "Hide details" : "Slēpt detaļas", @@ -257,10 +257,10 @@ "Last background job execution ran {relativeTime}. Something seems wrong." : "Pēdējā fona darba palaišana aizņēma {relativeTime}. Kaut kas škiet nepareizi.", "Check the background job settings" : "Pārmainīt fona darbu iestatījumus", "Continue to Nextcloud" : "Turpināt ar Nextcloud", - "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundes.","Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundēm."], + "_The update was successful. Redirecting you to Nextcloud in %n second._::_The update was successful. Redirecting you to Nextcloud in %n seconds._" : ["Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundēm.","Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundes.","Atjaunināšana ir bijusi veiksmīga. Novirzīsim jūs uz Nextcloud pēc %n sekundēm."], "Searching other places" : "Meklēt citās vietās", "No search results in other folders for {tag}{filter}{endtag}" : "Nav nekas atrasts citā mapēs {tag}{filter}{endtag}", - "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} meklēšanas rezultāti citās mapēs","{count} meklēšanas rezultāti citās mapēs"], + "_{count} search result in another folder_::_{count} search results in other folders_" : ["{count} meklēšanas rezultāti citās mapēs","{count} meklēšanas rezultāti citās mapēs","{count} meklēšanas rezultāti citās mapēs"], "A password reset message has been sent to the e-mail address of this account. If you do not receive it, check your spam/junk folders or ask your local administrator for help." : "Paroles atiestatīšanas ziņojums ir nosūtīts uz šī konta e-pasta adresi. Ja to nesaņemat, pārbaudiet mēstuļu mapes vai lūdziet palīdzību savam vietējam administratoram.", "Password can not be changed. Please contact your administrator." : "Paroli, nevar nomainīt. Lūdzu kontaktēties ar savu administratoru.", "Could not fetch list of apps from the app store." : "Nevarēja ielādēt lietotņu sarakstu no lietotņu veikala.", diff --git a/index.php b/index.php index 54b2f9f4c21..7c7400a0564 100644 --- a/index.php +++ b/index.php @@ -39,7 +39,7 @@ try { //show the user a detailed error page OC_Template::printExceptionErrorPage($ex, 503); -} catch (\OC\HintException $ex) { +} catch (\OCP\HintException $ex) { try { OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), 503); } catch (Exception $ex2) { diff --git a/lib/base.php b/lib/base.php index 473a3419cb1..45d06da0303 100644 --- a/lib/base.php +++ b/lib/base.php @@ -388,7 +388,7 @@ class OC { if (!empty($incompatibleShippedApps)) { $l = \OC::$server->getL10N('core'); $hint = $l->t('The files of the app %1$s were not replaced correctly. Make sure it is a version compatible with the server.', [implode(', ', $incompatibleShippedApps)]); - throw new \OC\HintException('The files of the app ' . implode(', ', $incompatibleShippedApps) . ' were not replaced correctly. Make sure it is a version compatible with the server.', $hint); + throw new \OCP\HintException('The files of the app ' . implode(', ', $incompatibleShippedApps) . ' were not replaced correctly. Make sure it is a version compatible with the server.', $hint); } $tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 55d02c2feeb..82c40c800a4 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -371,6 +371,7 @@ return array( 'OCP\\Group\\Events\\UserAddedEvent' => $baseDir . '/lib/public/Group/Events/UserAddedEvent.php', 'OCP\\Group\\Events\\UserRemovedEvent' => $baseDir . '/lib/public/Group/Events/UserRemovedEvent.php', 'OCP\\Group\\ISubAdmin' => $baseDir . '/lib/public/Group/ISubAdmin.php', + 'OCP\\HintException' => $baseDir . '/lib/public/HintException.php', 'OCP\\Http\\Client\\IClient' => $baseDir . '/lib/public/Http/Client/IClient.php', 'OCP\\Http\\Client\\IClientService' => $baseDir . '/lib/public/Http/Client/IClientService.php', 'OCP\\Http\\Client\\IResponse' => $baseDir . '/lib/public/Http/Client/IResponse.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 6f2bb064fc0..423fd814d6b 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -400,6 +400,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OCP\\Group\\Events\\UserAddedEvent' => __DIR__ . '/../../..' . '/lib/public/Group/Events/UserAddedEvent.php', 'OCP\\Group\\Events\\UserRemovedEvent' => __DIR__ . '/../../..' . '/lib/public/Group/Events/UserRemovedEvent.php', 'OCP\\Group\\ISubAdmin' => __DIR__ . '/../../..' . '/lib/public/Group/ISubAdmin.php', + 'OCP\\HintException' => __DIR__ . '/../../..' . '/lib/public/HintException.php', 'OCP\\Http\\Client\\IClient' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IClient.php', 'OCP\\Http\\Client\\IClientService' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IClientService.php', 'OCP\\Http\\Client\\IResponse' => __DIR__ . '/../../..' . '/lib/public/Http/Client/IResponse.php', diff --git a/lib/l10n/ar.js b/lib/l10n/ar.js index 8384225ec34..5b7143c68c0 100644 --- a/lib/l10n/ar.js +++ b/lib/l10n/ar.js @@ -22,10 +22,10 @@ OC.L10N.register( "today" : "اليوم", "tomorrow" : "غدًا", "yesterday" : "يوم أمس", - "_%n day ago_::_%n days ago_" : ["قبل يوم","قبل يومين","قبل %n يوماً","قبل %n يوماً","قبل %n يوماً"], + "_%n day ago_::_%n days ago_" : ["قبل ساعات","قبل يوم","قبل يومين","قبل %n يوماً","قبل %n يوماً","قبل %n يوماً"], "next month" : "الشهر القادم", "last month" : "الشهر الماضي", - "_%n month ago_::_%n months ago_" : ["قبل شهر","قبل شهرين","قبل %n شهراً","قبل %n شهراً","قبل %n شهراً"], + "_%n month ago_::_%n months ago_" : ["قبل عدة أيام","قبل شهر","قبل شهرين","قبل %n شهراً","قبل %n شهراً","قبل %n شهراً"], "next year" : "العام القادم", "last year" : "السنةالماضية", "in a few seconds" : "خلال بضع ثواني", diff --git a/lib/l10n/ar.json b/lib/l10n/ar.json index e9658f882fd..a570779ad24 100644 --- a/lib/l10n/ar.json +++ b/lib/l10n/ar.json @@ -20,10 +20,10 @@ "today" : "اليوم", "tomorrow" : "غدًا", "yesterday" : "يوم أمس", - "_%n day ago_::_%n days ago_" : ["قبل يوم","قبل يومين","قبل %n يوماً","قبل %n يوماً","قبل %n يوماً"], + "_%n day ago_::_%n days ago_" : ["قبل ساعات","قبل يوم","قبل يومين","قبل %n يوماً","قبل %n يوماً","قبل %n يوماً"], "next month" : "الشهر القادم", "last month" : "الشهر الماضي", - "_%n month ago_::_%n months ago_" : ["قبل شهر","قبل شهرين","قبل %n شهراً","قبل %n شهراً","قبل %n شهراً"], + "_%n month ago_::_%n months ago_" : ["قبل عدة أيام","قبل شهر","قبل شهرين","قبل %n شهراً","قبل %n شهراً","قبل %n شهراً"], "next year" : "العام القادم", "last year" : "السنةالماضية", "in a few seconds" : "خلال بضع ثواني", diff --git a/lib/l10n/lv.js b/lib/l10n/lv.js index 5604d7c4b0d..8ef680ae9cd 100644 --- a/lib/l10n/lv.js +++ b/lib/l10n/lv.js @@ -22,13 +22,13 @@ OC.L10N.register( "Avatar image is not square" : "Avatar attēls nav kvadrāts", "today" : "šodien", "yesterday" : "vakar", - "_%n day ago_::_%n days ago_" : ["%n dienas atpakaļ","%n dienām"], + "_%n day ago_::_%n days ago_" : ["%n dienas atpakaļ","%n dienas atpakaļ","%n dienām"], "last month" : "pagājušajā mēnesī", - "_%n month ago_::_%n months ago_" : ["%n mēneši atpakaļ","%n mēnešiem"], + "_%n month ago_::_%n months ago_" : ["%n mēneši atpakaļ","%n mēneši atpakaļ","%n mēnešiem"], "last year" : "gājušajā gadā", - "_%n year ago_::_%n years ago_" : ["%n gadiem","%n gadiem"], - "_%n hour ago_::_%n hours ago_" : ["%n stundas atpakaļ","%n stundām"], - "_%n minute ago_::_%n minutes ago_" : ["%n minūtes atpakaļ","%n minūtēm"], + "_%n year ago_::_%n years ago_" : ["%n gadiem","%n gadiem","%n gadiem"], + "_%n hour ago_::_%n hours ago_" : ["%n stundas atpakaļ","%n stundas atpakaļ","%n stundām"], + "_%n minute ago_::_%n minutes ago_" : ["%n minūtes atpakaļ","%n minūtes atpakaļ","%n minūtēm"], "seconds ago" : "sekundēm", "File name is too long" : "Datnes nosaukums ir pārāk garš", "Empty filename is not allowed" : "Tukšs datnes nosaukums nav atļauts", diff --git a/lib/l10n/lv.json b/lib/l10n/lv.json index 15a825557d0..e4733f268dd 100644 --- a/lib/l10n/lv.json +++ b/lib/l10n/lv.json @@ -20,13 +20,13 @@ "Avatar image is not square" : "Avatar attēls nav kvadrāts", "today" : "šodien", "yesterday" : "vakar", - "_%n day ago_::_%n days ago_" : ["%n dienas atpakaļ","%n dienām"], + "_%n day ago_::_%n days ago_" : ["%n dienas atpakaļ","%n dienas atpakaļ","%n dienām"], "last month" : "pagājušajā mēnesī", - "_%n month ago_::_%n months ago_" : ["%n mēneši atpakaļ","%n mēnešiem"], + "_%n month ago_::_%n months ago_" : ["%n mēneši atpakaļ","%n mēneši atpakaļ","%n mēnešiem"], "last year" : "gājušajā gadā", - "_%n year ago_::_%n years ago_" : ["%n gadiem","%n gadiem"], - "_%n hour ago_::_%n hours ago_" : ["%n stundas atpakaļ","%n stundām"], - "_%n minute ago_::_%n minutes ago_" : ["%n minūtes atpakaļ","%n minūtēm"], + "_%n year ago_::_%n years ago_" : ["%n gadiem","%n gadiem","%n gadiem"], + "_%n hour ago_::_%n hours ago_" : ["%n stundas atpakaļ","%n stundas atpakaļ","%n stundām"], + "_%n minute ago_::_%n minutes ago_" : ["%n minūtes atpakaļ","%n minūtes atpakaļ","%n minūtēm"], "seconds ago" : "sekundēm", "File name is too long" : "Datnes nosaukums ir pārāk garš", "Empty filename is not allowed" : "Tukšs datnes nosaukums nav atļauts", diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php index 37cc0b71e3f..6c2f905afa5 100644 --- a/lib/private/AppFramework/App.php +++ b/lib/private/AppFramework/App.php @@ -34,11 +34,11 @@ namespace OC\AppFramework; use OC\AppFramework\DependencyInjection\DIContainer; use OC\AppFramework\Http\Dispatcher; use OC\AppFramework\Http\Request; -use OC\HintException; use OCP\AppFramework\Http; use OCP\AppFramework\Http\ICallbackResponse; use OCP\AppFramework\Http\IOutput; use OCP\AppFramework\QueryException; +use OCP\HintException; use OCP\IRequest; /** @@ -105,6 +105,7 @@ class App { /** * Shortcut for calling a controller method and printing the result + * * @param string $controllerName the name of the controller under which it is * stored in the DI container * @param string $methodName the method that you want to call diff --git a/lib/private/Config.php b/lib/private/Config.php index e3ace96c359..2a83d2300dc 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -38,6 +38,8 @@ */ namespace OC; +use OCP\HintException; + /** * This class is responsible for reading and writing config.php, the very basic * configuration file of Nextcloud. diff --git a/lib/private/DatabaseSetupException.php b/lib/private/DatabaseSetupException.php index b1b4956db41..44583416dbc 100644 --- a/lib/private/DatabaseSetupException.php +++ b/lib/private/DatabaseSetupException.php @@ -22,5 +22,7 @@ */ namespace OC; +use OCP\HintException; + class DatabaseSetupException extends HintException { } diff --git a/lib/private/HintException.php b/lib/private/HintException.php index e3173ba79fd..735832266cf 100644 --- a/lib/private/HintException.php +++ b/lib/private/HintException.php @@ -1,28 +1,28 @@ <?php + +declare(strict_types=1); /** - * @copyright Copyright (c) 2016, ownCloud, Inc. + * @copyright Copyright (c) 2021 Gary Kim <gary@garykim.dev> * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * @author Bart Visscher <bartv@thisnet.nl> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Michael Gapczynski <GapczynskiM@gmail.com> - * @author Thomas Müller <thomas.mueller@tmit.eu> + * @author Gary Kim <gary@garykim.dev> * - * @license AGPL-3.0 + * @license GNU AGPL version 3 or any later version * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace OC; /** @@ -31,48 +31,7 @@ namespace OC; * An Exception class with the intention to be presented to the end user * * @package OC + * @depreacted 23.0.0 Use \OCP\HintException */ -class HintException extends \Exception { - private $hint; - - /** - * HintException constructor. - * - * @param string $message The error message. It will be not revealed to the - * the user (unless the hint is empty) and thus - * should be not translated. - * @param string $hint A useful message that is presented to the end - * user. It should be translated, but must not - * contain sensitive data. - * @param int $code - * @param \Exception|null $previous - */ - public function __construct($message, $hint = '', $code = 0, \Exception $previous = null) { - $this->hint = $hint; - parent::__construct($message, $code, $previous); - } - - /** - * Returns a string representation of this Exception that includes the error - * code, the message and the hint. - * - * @return string - */ - public function __toString() { - return __CLASS__ . ": [{$this->code}]: {$this->message} ({$this->hint})\n"; - } - - /** - * Returns the hint with the intention to be presented to the end user. If - * an empty hint was specified upon instatiation, the message is returned - * instead. - * - * @return string - */ - public function getHint() { - if (empty($this->hint)) { - return $this->message; - } - return $this->hint; - } +class HintException extends \OCP\HintException { } diff --git a/lib/private/Installer.php b/lib/private/Installer.php index d1e903424ed..19e70aad147 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -48,6 +48,7 @@ use OC\DB\Connection; use OC\DB\MigrationService; use OC_App; use OC_Helper; +use OCP\HintException; use OCP\Http\Client\IClientService; use OCP\IConfig; use OCP\ILogger; diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index aba5586297a..bab22ab4aac 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -29,10 +29,10 @@ namespace OC\Log; use OC\Core\Controller\SetupController; -use OC\HintException; use OC\Security\IdentityProof\Key; use OC\Setup; use OC\SystemConfig; +use OCP\HintException; class ExceptionSerializer { public const methodsWithSensitiveParameters = [ diff --git a/lib/private/Log/Systemdlog.php b/lib/private/Log/Systemdlog.php index 17778891efe..a01826c0b05 100644 --- a/lib/private/Log/Systemdlog.php +++ b/lib/private/Log/Systemdlog.php @@ -25,8 +25,8 @@ */ namespace OC\Log; -use OC\HintException; use OC\SystemConfig; +use OCP\HintException; use OCP\ILogger; use OCP\Log\IWriter; diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php index 9810f068148..28a84308edc 100644 --- a/lib/private/Memcache/Factory.php +++ b/lib/private/Memcache/Factory.php @@ -86,12 +86,12 @@ class Factory implements ICacheFactory { $missingCacheMessage = 'Memcache {class} not available for {use} cache'; $missingCacheHint = 'Is the matching PHP module installed and enabled?'; if (!class_exists($localCacheClass) || !$localCacheClass::isAvailable()) { - throw new \OC\HintException(strtr($missingCacheMessage, [ + throw new \OCP\HintException(strtr($missingCacheMessage, [ '{class}' => $localCacheClass, '{use}' => 'local' ]), $missingCacheHint); } if (!class_exists($distributedCacheClass) || !$distributedCacheClass::isAvailable()) { - throw new \OC\HintException(strtr($missingCacheMessage, [ + throw new \OCP\HintException(strtr($missingCacheMessage, [ '{class}' => $distributedCacheClass, '{use}' => 'distributed' ]), $missingCacheHint); } diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php index cd1af031d8a..b3414a7d290 100644 --- a/lib/private/Memcache/Memcached.php +++ b/lib/private/Memcache/Memcached.php @@ -31,7 +31,7 @@ */ namespace OC\Memcache; -use OC\HintException; +use OCP\HintException; use OCP\IMemcache; class Memcached extends Cache implements IMemcache { diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 8e7e6ae6aea..d39fa069286 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -224,7 +224,7 @@ class Setup { try { $util = new \OC_Util(); $htAccessWorking = $util->isHtaccessWorking(\OC::$server->getConfig()); - } catch (\OC\HintException $e) { + } catch (\OCP\HintException $e) { $errors[] = [ 'error' => $e->getMessage(), 'exception' => $e, diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index b5e1b944bc5..7047c32e339 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -43,7 +43,6 @@ namespace OC\Share20; use OC\Cache\CappedMemoryCache; use OC\Files\Mount\MoveableMount; -use OC\HintException; use OC\Share20\Exception\ProviderException; use OCA\Files_Sharing\ISharedStorage; use OCP\EventDispatcher\IEventDispatcher; @@ -52,6 +51,7 @@ use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountManager; use OCP\Files\Node; +use OCP\HintException; use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 5fa41e48c0c..cffdac310cb 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -45,6 +45,7 @@ use OC\DB\MigrationService; use OC\Hooks\BasicEmitter; use OC\IntegrityCheck\Checker; use OC_App; +use OCP\HintException; use OCP\IConfig; use OCP\ILogger; use OCP\Util; diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 07a599cf017..12c615d500b 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -33,10 +33,10 @@ */ namespace OC\User; -use OC\HintException; use OC\Hooks\PublicEmitter; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; +use OCP\HintException; use OCP\ICache; use OCP\ICacheFactory; use OCP\IConfig; diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php index d9e4c99e498..b223b0fa6d6 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -81,7 +81,7 @@ class OC_Hook { * @param string $signalName name of signal * @param mixed $params default: array() array with additional data * @return bool true if slots exists or false if not - * @throws \OC\HintException + * @throws \OCP\HintException * @throws \OC\ServerNotAvailableException Emits a signal. To get data from the slot use references! * * TODO: write example @@ -107,7 +107,7 @@ class OC_Hook { } catch (Exception $e) { self::$thrownExceptions[] = $e; \OC::$server->getLogger()->logException($e); - if ($e instanceof \OC\HintException) { + if ($e instanceof \OCP\HintException) { throw $e; } if ($e instanceof \OC\ServerNotAvailableException) { diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 87964f98374..333b621e359 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -63,6 +63,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + use bantu\IniGetWrapper\IniGetWrapper; use OC\AppFramework\Http\Request; use OC\Files\Storage\LocalRootStorage; @@ -1214,7 +1215,7 @@ class OC_Util { $fp = @fopen($testFile, 'w'); if (!$fp) { - throw new OC\HintException('Can\'t create test file to check for working .htaccess file.', + throw new \OCP\HintException('Can\'t create test file to check for working .htaccess file.', 'Make sure it is possible for the webserver to write to ' . $testFile); } fwrite($fp, $testContent); @@ -1225,10 +1226,11 @@ class OC_Util { /** * Check if the .htaccess file is working + * * @param \OCP\IConfig $config * @return bool * @throws Exception - * @throws \OC\HintException If the test file can't get written. + * @throws \OCP\HintException If the test file can't get written. */ public function isHtaccessWorking(\OCP\IConfig $config) { if (\OC::$CLI || !$config->getSystemValue('check_for_working_htaccess', true)) { @@ -1422,7 +1424,7 @@ class OC_Util { * * @param \OC\SystemConfig $config * @return bool whether the core or any app needs an upgrade - * @throws \OC\HintException When the upgrade from the given version is not allowed + * @throws \OCP\HintException When the upgrade from the given version is not allowed */ public static function needUpgrade(\OC\SystemConfig $config) { if ($config->getValue('installed', false)) { @@ -1442,11 +1444,11 @@ class OC_Util { return true; } else { // downgrade attempt, throw exception - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); + throw new \OCP\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } } elseif ($versionDiff < 0) { // downgrade attempt, throw exception - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); + throw new \OCP\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } // also check for upgrades for apps (independently from the user) diff --git a/lib/public/Encryption/Exceptions/GenericEncryptionException.php b/lib/public/Encryption/Exceptions/GenericEncryptionException.php index 9f349a28a76..aef4114bb1b 100644 --- a/lib/public/Encryption/Exceptions/GenericEncryptionException.php +++ b/lib/public/Encryption/Exceptions/GenericEncryptionException.php @@ -26,7 +26,7 @@ */ namespace OCP\Encryption\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class GenericEncryptionException diff --git a/lib/public/Federation/Exceptions/ActionNotSupportedException.php b/lib/public/Federation/Exceptions/ActionNotSupportedException.php index 3ec729e415a..7b2ca3d9597 100644 --- a/lib/public/Federation/Exceptions/ActionNotSupportedException.php +++ b/lib/public/Federation/Exceptions/ActionNotSupportedException.php @@ -22,7 +22,7 @@ */ namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class ActionNotSupportedException diff --git a/lib/public/Federation/Exceptions/AuthenticationFailedException.php b/lib/public/Federation/Exceptions/AuthenticationFailedException.php index 61ea080f5d4..dfcd9636035 100644 --- a/lib/public/Federation/Exceptions/AuthenticationFailedException.php +++ b/lib/public/Federation/Exceptions/AuthenticationFailedException.php @@ -22,7 +22,7 @@ */ namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class AuthenticationFailedException diff --git a/lib/public/Federation/Exceptions/BadRequestException.php b/lib/public/Federation/Exceptions/BadRequestException.php index bea6fba2b18..8054c0e89f0 100644 --- a/lib/public/Federation/Exceptions/BadRequestException.php +++ b/lib/public/Federation/Exceptions/BadRequestException.php @@ -23,7 +23,7 @@ */ namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class BadRequestException diff --git a/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php b/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php index 48aa883a028..b6d4b7e9bce 100644 --- a/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php +++ b/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php @@ -24,7 +24,7 @@ */ namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class ProviderAlreadyExistsException diff --git a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php index c647b2d9c9e..efcc8788386 100644 --- a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php +++ b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php @@ -22,8 +22,8 @@ */ namespace OCP\Federation\Exceptions; -use OC\HintException; use OCP\AppFramework\Http; +use OCP\HintException; /** * Class ProviderCouldNotAddShareException diff --git a/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php b/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php index b56a6ef8d4c..69c69f17d99 100644 --- a/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php +++ b/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php @@ -22,7 +22,7 @@ */ namespace OCP\Federation\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class ProviderDoesNotExistsException diff --git a/lib/public/Files/StorageNotAvailableException.php b/lib/public/Files/StorageNotAvailableException.php index e166df90d77..f600ef80808 100644 --- a/lib/public/Files/StorageNotAvailableException.php +++ b/lib/public/Files/StorageNotAvailableException.php @@ -32,7 +32,7 @@ namespace OCP\Files; -use OC\HintException; +use OCP\HintException; /** * Storage is temporarily not available diff --git a/lib/public/HintException.php b/lib/public/HintException.php new file mode 100644 index 00000000000..b5ee7642b03 --- /dev/null +++ b/lib/public/HintException.php @@ -0,0 +1,82 @@ +<?php +/** + * @copyright Copyright (c) 2016, ownCloud, Inc. + * + * @author Arthur Schiwon <blizzz@arthur-schiwon.de> + * @author Bart Visscher <bartv@thisnet.nl> + * @author Lukas Reschke <lukas@statuscode.ch> + * @author Michael Gapczynski <GapczynskiM@gmail.com> + * @author Thomas Müller <thomas.mueller@tmit.eu> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCP; + +/** + * Class HintException + * + * An Exception class with the intention to be presented to the end user + * + * @package OCP + * @since 23.0.0 + */ +class HintException extends \Exception { + private $hint; + + /** + * HintException constructor. + * + * @since 23.0.0 + * @param string $message The error message. It will be not revealed to the + * the user (unless the hint is empty) and thus + * should be not translated. + * @param string $hint A useful message that is presented to the end + * user. It should be translated, but must not + * contain sensitive data. + * @param int $code + * @param \Exception|null $previous + */ + public function __construct($message, $hint = '', $code = 0, \Exception $previous = null) { + $this->hint = $hint; + parent::__construct($message, $code, $previous); + } + + /** + * Returns a string representation of this Exception that includes the error + * code, the message and the hint. + * + * @since 23.0.0 + * @return string + */ + public function __toString(): string { + return __CLASS__ . ": [{$this->code}]: {$this->message} ({$this->hint})\n"; + } + + /** + * Returns the hint with the intention to be presented to the end user. If + * an empty hint was specified upon instatiation, the message is returned + * instead. + * + * @since 23.0.0 + * @return string + */ + public function getHint(): string { + if (empty($this->hint)) { + return $this->message; + } + return $this->hint; + } +} diff --git a/lib/public/Share/Exceptions/GenericShareException.php b/lib/public/Share/Exceptions/GenericShareException.php index 46a46ac0ab7..85c440e2387 100644 --- a/lib/public/Share/Exceptions/GenericShareException.php +++ b/lib/public/Share/Exceptions/GenericShareException.php @@ -24,7 +24,7 @@ */ namespace OCP\Share\Exceptions; -use OC\HintException; +use OCP\HintException; /** * Class GenericEncryptionException diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php index dfd65aed47f..190afd3be47 100644 --- a/tests/Core/Controller/ChangePasswordControllerTest.php +++ b/tests/Core/Controller/ChangePasswordControllerTest.php @@ -22,11 +22,11 @@ namespace Tests\Core\Controller; -use OC\HintException; use OC\User\Session; use OCA\Settings\Controller\ChangePasswordController; use OCP\App\IAppManager; use OCP\AppFramework\Http\JSONResponse; +use OCP\HintException; use OCP\IGroupManager; use OCP\IL10N; use OCP\IRequest; diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php index 19edf4aa3dd..858bdc5d3ef 100644 --- a/tests/lib/Memcache/FactoryTest.php +++ b/tests/lib/Memcache/FactoryTest.php @@ -129,7 +129,7 @@ class FactoryTest extends \Test\TestCase { * @dataProvider cacheUnavailableProvider */ public function testCacheNotAvailableException($localCache, $distributedCache) { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $logger = $this->getMockBuilder(ILogger::class)->getMock(); new \OC\Memcache\Factory('abc', $logger, $localCache, $distributedCache); diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 117adc95186..de8dc9fcc86 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -22,7 +22,6 @@ namespace Test\Share20; use OC\Files\Mount\MoveableMount; -use OC\HintException; use OC\Share20\DefaultShareProvider; use OC\Share20\Exception; use OC\Share20\Manager; @@ -36,6 +35,7 @@ use OCP\Files\Mount\IMountManager; use OCP\Files\Mount\IMountPoint; use OCP\Files\Node; use OCP\Files\Storage; +use OCP\HintException; use OCP\IConfig; use OCP\IGroup; use OCP\IGroupManager; diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index 6eb4466c69d..49b691cf9bc 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -22,10 +22,10 @@ namespace Test\User; -use OC\HintException; use OC\User\User; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventDispatcher; +use OCP\HintException; use OCP\Security\Events\ValidatePasswordPolicyEvent; use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -82,9 +82,9 @@ class DatabaseTest extends Backend { $this->assertSame($user, $this->backend->checkPassword($user, 'newpass')); } - + public function testVerifyPasswordEventFail() { - $this->expectException(\OC\HintException::class); + $this->expectException(\OCP\HintException::class); $this->expectExceptionMessage('password change failed'); $user = $this->getUser(); |