From 8d4de1eebc6ffe77aa450e801f6aa177c2718b94 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 21 Sep 2022 17:44:32 +0200 Subject: [PATCH] Rename users to account or person Replace translated texts in comments, files_sharing, core and lib. Signed-off-by: Vincent Petry --- apps/comments/lib/Notification/Notifier.php | 2 +- .../tests/Unit/Notification/NotifierTest.php | 4 ++-- apps/federation/appinfo/info.xml | 4 ++-- apps/federation/templates/settings-admin.php | 2 +- apps/files_sharing/appinfo/info.xml | 2 +- .../lib/Controller/ShareAPIController.php | 4 ++-- .../src/components/SharingEntryInternal.vue | 4 ++-- .../files_sharing/src/views/SharingInherited.vue | 2 +- .../tests/Controller/ShareAPIControllerTest.php | 4 ++-- core/Command/Maintenance/Install.php | 6 +++--- core/Command/User/Add.php | 6 +++--- core/Command/User/AddAppPassword.php | 2 +- core/Command/User/LastSeen.php | 2 +- core/Command/User/Report.php | 2 +- core/Command/User/ResetPassword.php | 2 +- core/Command/User/Setting.php | 2 +- core/Controller/LostController.php | 2 +- core/Controller/OCSController.php | 2 +- core/Controller/ProfileApiController.php | 6 +++--- core/Notification/CoreNotifier.php | 4 ++-- core/js/setupchecks.js | 4 ++-- core/src/components/login/LoginForm.vue | 4 ++-- .../components/login/PasswordLessLoginForm.vue | 6 +++--- core/strings.php | 2 +- core/templates/installation.php | 8 ++++---- core/templates/loginflow/authpicker.php | 4 ++-- core/templates/loginflowv2/authpicker.php | 4 ++-- core/templates/update.use-cli.php | 2 +- .../Middleware/Security/SecurityMiddleware.php | 6 +++--- .../UserDeletedFilesCleanupListener.php | 2 +- lib/private/Avatar/AvatarManager.php | 2 +- lib/private/Files/Node/Root.php | 2 +- lib/private/Server.php | 2 +- lib/private/Setup.php | 4 ++-- lib/private/Setup/AbstractDatabase.php | 4 ++-- lib/private/Setup/MySQL.php | 2 +- lib/private/Setup/OCI.php | 6 +++--- lib/private/Setup/PostgreSQL.php | 2 +- lib/private/Support/Subscription/Registry.php | 2 +- lib/private/User/Manager.php | 16 ++++++++-------- lib/private/User/Session.php | 2 +- lib/private/legacy/OC_User.php | 2 +- lib/private/legacy/OC_Util.php | 4 ++-- 43 files changed, 78 insertions(+), 78 deletions(-) diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php index 4ddb7295bfec8..18f54bd55abcb 100644 --- a/apps/comments/lib/Notification/Notifier.php +++ b/apps/comments/lib/Notification/Notifier.php @@ -136,7 +136,7 @@ public function prepare(INotification $notification, string $languageCode): INot ]; if ($isDeletedActor) { - $subject = $l->t('You were mentioned on "{file}", in a comment by a user that has since been deleted'); + $subject = $l->t('You were mentioned on "{file}", in a comment by an account that has since been deleted'); } else { $subject = $l->t('{user} mentioned you in a comment on "{file}"'); $subjectParameters['user'] = [ diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php index ecd22ffd9e360..647c33380c129 100644 --- a/apps/comments/tests/Unit/Notification/NotifierTest.php +++ b/apps/comments/tests/Unit/Notification/NotifierTest.php @@ -217,7 +217,7 @@ public function testPrepareSuccess() { public function testPrepareSuccessDeletedUser() { $fileName = 'Gre\'thor.odp'; - $message = 'You were mentioned on "Gre\'thor.odp", in a comment by a user that has since been deleted'; + $message = 'You were mentioned on "Gre\'thor.odp", in a comment by an account that has since been deleted'; /** @var Node|MockObject $node */ $node = $this->createMock(Node::class); @@ -263,7 +263,7 @@ public function testPrepareSuccessDeletedUser() { $this->notification ->expects($this->once()) ->method('setRichSubject') - ->with('You were mentioned on "{file}", in a comment by a user that has since been deleted', $this->anything()) + ->with('You were mentioned on "{file}", in a comment by an account that has since been deleted', $this->anything()) ->willReturnSelf(); $this->notification ->expects($this->once()) diff --git a/apps/federation/appinfo/info.xml b/apps/federation/appinfo/info.xml index 263ffad2092ae..bd8947bfe26d9 100644 --- a/apps/federation/appinfo/info.xml +++ b/apps/federation/appinfo/info.xml @@ -3,8 +3,8 @@ xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> federation Federation - Federation allows you to connect with other trusted servers to exchange the user directory. - Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing. + Federation allows you to connect with other trusted servers to exchange the account directory. + Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. 1.15.0 agpl Bjoern Schiessle diff --git a/apps/federation/templates/settings-admin.php b/apps/federation/templates/settings-admin.php index 3fa7a02a02efd..8af6f19d89899 100644 --- a/apps/federation/templates/settings-admin.php +++ b/apps/federation/templates/settings-admin.php @@ -8,7 +8,7 @@ ?>

t('Trusted servers')); ?>

-

t('Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.')); ?>

+

t('Federation allows you to connect with other trusted servers to exchange the account directory. For example this will be used to auto-complete external accounts for federated sharing. It is not necessary to add a server as trusted server in order to create a federated share.')); ?>

    diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index 66c49d6eeb686..1efb64f2da4b7 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -5,7 +5,7 @@ File sharing File sharing - This application enables users to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable users can then share files and folders with other users and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other users outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices. + This application enables people to share files within Nextcloud. If enabled, the admin can choose which groups can share files. The applicable people can then share files and folders with other people and groups within Nextcloud. In addition, if the admin enables the share link feature, an external link can be used to share files with other people outside of Nextcloud. Admins can also enforce passwords, expirations dates, and enable server to server sharing via share links, as well as sharing from mobile devices. Turning the feature off removes shared files and folders on the server for all share recipients, and also on the sync clients and mobile apps. More information is available in the Nextcloud Documentation. diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 003d9336af500..fbb9d53b2ed07 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -530,7 +530,7 @@ public function createShare( if ($shareType === IShare::TYPE_USER) { // Valid user is required to share if ($shareWith === null || !$this->userManager->userExists($shareWith)) { - throw new OCSNotFoundException($this->l->t('Please specify a valid user')); + throw new OCSNotFoundException($this->l->t('Please specify a valid person to share with')); } $share->setSharedWith($shareWith); $share->setPermissions($permissions); @@ -617,7 +617,7 @@ public function createShare( } if ($shareWith === null) { - throw new OCSNotFoundException($this->l->t('Please specify a valid federated user ID')); + throw new OCSNotFoundException($this->l->t('Please specify a valid federated account ID')); } $share->setSharedWith($shareWith); diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue index 468275aac2ca6..d21fd4b5ace85 100644 --- a/apps/files_sharing/src/components/SharingEntryInternal.vue +++ b/apps/files_sharing/src/components/SharingEntryInternal.vue @@ -74,9 +74,9 @@ export default { internalLinkSubtitle() { if (this.fileInfo.type === 'dir') { - return t('files_sharing', 'Only works for users with access to this folder') + return t('files_sharing', 'Only works for people with access to this folder') } - return t('files_sharing', 'Only works for users with access to this file') + return t('files_sharing', 'Only works for people with access to this file') }, }, diff --git a/apps/files_sharing/src/views/SharingInherited.vue b/apps/files_sharing/src/views/SharingInherited.vue index 0f7d9d8b55b70..0f475b2a6ccfb 100644 --- a/apps/files_sharing/src/views/SharingInherited.vue +++ b/apps/files_sharing/src/views/SharingInherited.vue @@ -94,7 +94,7 @@ export default { }, subTitle() { return (this.showInheritedShares && this.shares.length === 0) - ? t('files_sharing', 'No other users with access found') + ? t('files_sharing', 'No other accounts with access found') : '' }, toggleTooltip() { diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index 4ac4cd6956e03..f068dfd95a154 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -1662,7 +1662,7 @@ public function testCreateShareInvalidPermissions() { public function testCreateShareUserNoShareWith() { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); - $this->expectExceptionMessage('Please specify a valid user'); + $this->expectExceptionMessage('Please specify a person to share with'); $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); @@ -1698,7 +1698,7 @@ public function testCreateShareUserNoShareWith() { public function testCreateShareUserNoValidShareWith() { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); - $this->expectExceptionMessage('Please specify a valid user'); + $this->expectExceptionMessage('Please specify a valid person to share with'); $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index c445f2c2f46b7..bfd5636f876c3 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -64,10 +64,10 @@ protected function configure() { ->addOption('database-name', null, InputOption::VALUE_REQUIRED, 'Name of the database') ->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database', 'localhost') ->addOption('database-port', null, InputOption::VALUE_REQUIRED, 'Port the database is listening on') - ->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'User name to connect to the database') + ->addOption('database-user', null, InputOption::VALUE_REQUIRED, 'Account name to connect to the database') ->addOption('database-pass', null, InputOption::VALUE_OPTIONAL, 'Password of the database user', null) ->addOption('database-table-space', null, InputOption::VALUE_OPTIONAL, 'Table space of the database (oci only)', null) - ->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'User name of the admin account', 'admin') + ->addOption('admin-user', null, InputOption::VALUE_REQUIRED, 'Account name of the admin account', 'admin') ->addOption('admin-pass', null, InputOption::VALUE_REQUIRED, 'Password of the admin account') ->addOption('admin-email', null, InputOption::VALUE_OPTIONAL, 'E-Mail of the admin account') ->addOption('data-dir', null, InputOption::VALUE_REQUIRED, 'Path to data directory', \OC::$SERVERROOT."/data"); @@ -148,7 +148,7 @@ protected function validateInput(InputInterface $input, OutputInterface $output, if ($db !== 'sqlite') { if (is_null($dbUser)) { - throw new InvalidArgumentException("Database user not provided."); + throw new InvalidArgumentException("Database account not provided."); } if (is_null($dbName)) { throw new InvalidArgumentException("Database name not provided."); diff --git a/core/Command/User/Add.php b/core/Command/User/Add.php index 24d11fbee6eef..c42e3adeec0f7 100644 --- a/core/Command/User/Add.php +++ b/core/Command/User/Add.php @@ -55,7 +55,7 @@ protected function configure() { ->addArgument( 'uid', InputArgument::REQUIRED, - 'User ID used to login (must only contain a-z, A-Z, 0-9, -, _ and @)' + 'Account ID used to login (must only contain a-z, A-Z, 0-9, -, _ and @)' ) ->addOption( 'password-from-env', @@ -67,7 +67,7 @@ protected function configure() { 'display-name', null, InputOption::VALUE_OPTIONAL, - 'User name used in the web UI (can contain any characters)' + 'Account name used in the web UI (can contain any characters)' ) ->addOption( 'group', @@ -153,7 +153,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } if ($group instanceof IGroup) { $group->addUser($user); - $output->writeln('User "' . $user->getUID() . '" added to group "' . $group->getGID() . '"'); + $output->writeln('Account "' . $user->getUID() . '" added to group "' . $group->getGID() . '"'); } } return 0; diff --git a/core/Command/User/AddAppPassword.php b/core/Command/User/AddAppPassword.php index ec39cdc974eaa..1b31b30b37b32 100644 --- a/core/Command/User/AddAppPassword.php +++ b/core/Command/User/AddAppPassword.php @@ -64,7 +64,7 @@ protected function configure() { ->addArgument( 'user', InputArgument::REQUIRED, - 'Username to add app password for' + 'Account name to add app password for' ) ->addOption( 'password-from-env', diff --git a/core/Command/User/LastSeen.php b/core/Command/User/LastSeen.php index 5ea6c64d24998..a5346caf363b6 100644 --- a/core/Command/User/LastSeen.php +++ b/core/Command/User/LastSeen.php @@ -61,7 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $lastLogin = $user->getLastLogin(); if ($lastLogin === 0) { - $output->writeln('User ' . $user->getUID() . + $output->writeln('Account ' . $user->getUID() . ' has never logged in, yet.'); } else { $date = new \DateTime(); diff --git a/core/Command/User/Report.php b/core/Command/User/Report.php index e080a61725850..a5471c090bdd5 100644 --- a/core/Command/User/Report.php +++ b/core/Command/User/Report.php @@ -66,7 +66,7 @@ protected function configure(): void { protected function execute(InputInterface $input, OutputInterface $output): int { $table = new Table($output); - $table->setHeaders(['User Report', '']); + $table->setHeaders(['Account Report', '']); $userCountArray = $this->countUsers(); $total = 0; if (!empty($userCountArray)) { diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php index 294cea38b7104..13342dc29b4ca 100644 --- a/core/Command/User/ResetPassword.php +++ b/core/Command/User/ResetPassword.php @@ -57,7 +57,7 @@ protected function configure() { ->addArgument( 'user', InputArgument::REQUIRED, - 'Username to reset password' + 'Account name to reset password' ) ->addOption( 'password-from-env', diff --git a/core/Command/User/Setting.php b/core/Command/User/Setting.php index 6e7c15375d148..b4b132e4fbcaf 100644 --- a/core/Command/User/Setting.php +++ b/core/Command/User/Setting.php @@ -53,7 +53,7 @@ protected function configure() { ->addArgument( 'uid', InputArgument::REQUIRED, - 'User ID used to login' + 'Account ID used to login' ) ->addArgument( 'app', diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index e5dc5218cb155..995b2e8e8a351 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -314,7 +314,7 @@ protected function findUserByIdOrMail(string $input): IUser { $user = $this->userManager->get($input); if ($user instanceof IUser) { if (!$user->isEnabled()) { - throw new ResetPasswordException('User ' . $user->getUID() . ' is disabled'); + throw new ResetPasswordException('Account ' . $user->getUID() . ' is disabled'); } return $user; diff --git a/core/Controller/OCSController.php b/core/Controller/OCSController.php index b40776fcfb824..d81eee06ec632 100644 --- a/core/Controller/OCSController.php +++ b/core/Controller/OCSController.php @@ -129,6 +129,6 @@ public function getIdentityProof(string $cloudId): DataResponse { return new DataResponse($data); } - return new DataResponse(['User not found'], 404); + return new DataResponse(['Account not found'], 404); } } diff --git a/core/Controller/ProfileApiController.php b/core/Controller/ProfileApiController.php index a25ebaf846d62..6783045d7265e 100644 --- a/core/Controller/ProfileApiController.php +++ b/core/Controller/ProfileApiController.php @@ -67,11 +67,11 @@ public function setVisibility(string $targetUserId, string $paramId, string $vis $targetUser = $this->userManager->get($targetUserId); if (!$this->userManager->userExists($targetUserId)) { - throw new OCSNotFoundException('User does not exist'); + throw new OCSNotFoundException('Account does not exist'); } if ($requestingUser !== $targetUser) { - throw new OCSForbiddenException('Users can only edit their own visibility settings'); + throw new OCSForbiddenException('People can only edit their own visibility settings'); } // Ensure that a profile config is created in the database @@ -79,7 +79,7 @@ public function setVisibility(string $targetUserId, string $paramId, string $vis $config = $this->configMapper->get($targetUserId); if (!in_array($paramId, array_keys($config->getVisibilityMap()), true)) { - throw new OCSBadRequestException('User does not have a profile parameter with ID: ' . $paramId); + throw new OCSBadRequestException('Account does not have a profile parameter with ID: ' . $paramId); } $config->setVisibility($paramId, $visibility); diff --git a/core/Notification/CoreNotifier.php b/core/Notification/CoreNotifier.php index 6d2a07337a60d..a272ae067c7f1 100644 --- a/core/Notification/CoreNotifier.php +++ b/core/Notification/CoreNotifier.php @@ -78,8 +78,8 @@ public function prepare(INotification $notification, string $languageCode): INot } if ($notification->getSubject() === 'user_limit_reached') { - $notification->setParsedSubject($l->t('The user limit of this instance is reached.')); - $notification->setParsedMessage($l->t('Enter your subscription key to increase the user limit. For more information about Nextcloud Enterprise see our website.')); + $notification->setParsedSubject($l->t('The account limit of this instance is reached.')); + $notification->setParsedMessage($l->t('Enter your subscription key to increase the account limit. For more information about Nextcloud Enterprise see our website.')); $notification->setLink('https://nextcloud.com/enterprise/'); $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/contacts.svg'))); return $notification; diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 81ed193a38b3e..291397b6126eb 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -225,7 +225,7 @@ } if (data.suggestedOverwriteCliURL !== '') { messages.push({ - msg: t('core', 'Please make sure to set the "overwrite.cli.url" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: "{suggestedOverwriteCliURL}". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)', {suggestedOverwriteCliURL: data.suggestedOverwriteCliURL}), + msg: t('core', 'Please make sure to set the "overwrite.cli.url" option in your config.php file to the URL that people mainly use to access this Nextcloud. Suggestion: "{suggestedOverwriteCliURL}". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that people mainly use to access this Nextcloud. Best is to double check this in any case.)', {suggestedOverwriteCliURL: data.suggestedOverwriteCliURL}), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -476,7 +476,7 @@ '' ); messages.push({ - msg: t('core', 'Some app directories are owned by a different user than the web server one. ' + + msg: t('core', 'Some app directories are owned by a different account than the web server one. ' + 'This may be the case if apps have been installed manually. ' + 'Check the permissions of the following app directories:') + '
      ' + appDirsWithDifferentOwner + '
    ', diff --git a/core/src/components/login/LoginForm.vue b/core/src/components/login/LoginForm.vue index 2ab4035ae653e..cb815e16431c1 100644 --- a/core/src/components/login/LoginForm.vue +++ b/core/src/components/login/LoginForm.vue @@ -171,10 +171,10 @@ export default { }, errorLabel() { if (this.invalidPassword) { - return t('core', 'Wrong username or password.') + return t('core', 'Wrong account name or password.') } if (this.userDisabled) { - return t('core', 'User disabled') + return t('core', 'This account is disabled') } if (this.throttleDelay && this.throttleDelay > 5000) { return t('core', 'We have detected multiple invalid login attempts from your IP. Therefore your next login is throttled up to 30 seconds.') diff --git a/core/src/components/login/PasswordLessLoginForm.vue b/core/src/components/login/PasswordLessLoginForm.vue index 3c0013936f0b5..58e43b5616223 100644 --- a/core/src/components/login/PasswordLessLoginForm.vue +++ b/core/src/components/login/PasswordLessLoginForm.vue @@ -6,15 +6,15 @@ @submit.prevent="submit">

    - +

    diff --git a/core/strings.php b/core/strings.php index fa23fb1ac654c..d296dde38bc5d 100644 --- a/core/strings.php +++ b/core/strings.php @@ -27,7 +27,7 @@ //some strings that are used in /lib but won't be translatable unless they are in /core too $l = \OC::$server->getL10N('core'); $l->t("Personal"); -$l->t("Users"); +$l->t("Accounts"); $l->t("Apps"); $l->t("Admin"); $l->t("Help"); diff --git a/core/templates/installation.php b/core/templates/installation.php index 45d9cfc925288..097df75313ab0 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -36,10 +36,10 @@ t('Create an admin account')); ?>

    - +

    - +

    diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php index 68c53818a9236..820efe53b9e21 100644 --- a/core/templates/loginflow/authpicker.php +++ b/core/templates/loginflow/authpicker.php @@ -53,8 +53,8 @@