diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-26 13:19:15 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-28 23:41:36 -0300 |
commit | 9a366dbe2e84bad7d6c40f284794aa6f34c2b0f5 (patch) | |
tree | e91741f25ad76c888946253d0e51ab57495dffe1 | |
parent | 08a33cc4751eebc4fc1384187677efac3ac6b1d0 (diff) | |
download | nextcloud-server-9a366dbe2e84bad7d6c40f284794aa6f34c2b0f5.tar.gz nextcloud-server-9a366dbe2e84bad7d6c40f284794aa6f34c2b0f5.zip |
add missing translation and other small fixes
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 1 | ||||
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 2 | ||||
-rw-r--r-- | settings/BackgroundJobs/VerifyUserData.php | 36 | ||||
-rw-r--r-- | settings/js/federationsettingsview.js | 4 | ||||
-rw-r--r-- | settings/js/personal.js | 3 | ||||
-rw-r--r-- | settings/templates/personal.php | 24 |
6 files changed, 34 insertions, 36 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index ace413a51a8..7d345efb3eb 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -655,6 +655,7 @@ class ShareesAPIController extends OCSController { protected function getLookup($search) { $isEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no'); $lookupServerUrl = $this->config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com'); + $lookupServerUrl = rtrim($lookupServerUrl, '/'); $result = []; if($isEnabled === 'yes') { diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 18c7f90ef54..bd23f6289c0 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -284,7 +284,7 @@ class AccountManager { [ 'value' => $user->getDisplayName(), 'scope' => self::VISIBILITY_CONTACTS_ONLY, - 'verified' => '0', + 'verified' => self::NOT_VERIFIED, ], self::PROPERTY_ADDRESS => [ diff --git a/settings/BackgroundJobs/VerifyUserData.php b/settings/BackgroundJobs/VerifyUserData.php index 2ec0ce2ea13..f044c9f31fb 100644 --- a/settings/BackgroundJobs/VerifyUserData.php +++ b/settings/BackgroundJobs/VerifyUserData.php @@ -62,27 +62,25 @@ class VerifyUserData extends Job { /** * VerifyUserData constructor. * - * @param AccountManager|null $accountManager - * @param IUserManager|null $userManager - * @param IClientService|null $clientService - * @param IConfig|null $config + * @param AccountManager $accountManager + * @param IUserManager $userManager + * @param IClientService $clientService + * @param ILogger $logger + * @param IConfig $config */ - public function __construct(AccountManager $accountManager = null, - IUserManager $userManager = null, - IClientService $clientService = null, - ILogger $logger = null, - IConfig $config = null + public function __construct(AccountManager $accountManager, + IUserManager $userManager, + IClientService $clientService, + ILogger $logger, + IConfig $config ) { - $this->accountManager = $accountManager !== null ? $accountManager : \OC::$server->query(AccountManager::class); - $this->userManager = $userManager !== null ? $userManager : \OC::$server->getUserManager(); - $this->httpClientService = $clientService !== null ? $clientService : \OC::$server->getHTTPClientService(); - $this->logger = $logger !== null ? $logger : \OC::$server->getLogger(); - - if ($config !== null) { - $this->lookupServerUrl = $config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com'); - } else { - $this->lookupServerUrl = \OC::$server->getConfig()->getSystemValue('lookup_server', 'https://lookup.nextcloud.com'); - } + $this->accountManager = $accountManager; + $this->userManager = $userManager; + $this->httpClientService = $clientService; + $this->logger = $logger; + + $lookupServerUrl = $config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com'); + $this->lookupServerUrl = rtrim($lookupServerUrl, '/'); } /** diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index 4a502544e8d..2b41f49b322 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -142,12 +142,12 @@ if (field === 'twitter' || field === 'webpage') { var verifyStatus = this.$('#' + field + 'form > .verify > #verify-' + field); - verifyStatus.attr('title', 'Verify'); + verifyStatus.attr('title', t('core', 'Verify')); verifyStatus.attr('src', OC.imagePath('core', 'actions/verify.svg')); verifyStatus.addClass('verify-action'); } else if (field === 'email') { var verifyStatus = this.$('#' + field + 'form > .verify > #verify-' + field); - verifyStatus.attr('title', 'Verifying...'); + verifyStatus.attr('title', t('core', 'Verifying …')); verifyStatus.attr('src', OC.imagePath('core', 'actions/verifying.svg')); } }, diff --git a/settings/js/personal.js b/settings/js/personal.js index b67211b274a..094fc36ceaf 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -211,13 +211,12 @@ $(document).ready(function () { $(".verify-action").click(function () { var account = $(this); var accountId = $(this).attr('id'); - $.ajax( OC.generateUrl('/settings/users/{account}/verify', {account: accountId}), {method: 'GET'} ).done(function(data) { showVerifyDialog(data.msg, data.code); - account.attr('title', 'Verifying...'); + account.attr('title', t('core', 'Verifying …')); account.attr('src', OC.imagePath('core', 'actions/verifying.svg')); account.removeClass('verify-action'); }); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 919fd13efe6..1d77bd805b9 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -12,9 +12,9 @@ <!-- dialog used to verify personal information such as the users website, email address, etc --> <div class="verification-dialog-content"> - <p class="explainVerification">How to verify your account details</p> - <p class="verificationCode">Verification code</p> - <p>It can take up to 24 hours before the account is displayed as verified.</p> + <p class="explainVerification"></p> + <p class="verificationCode"></p> + <p><?php p(\OC::$server->getL10N('settings')->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> </div> </div> @@ -114,13 +114,13 @@ <img id="verify-email" class="verify-action" <?php switch($_['emailVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="Verifying …"'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="' . \OC::$server->getL10N()->t('Verifying …') . '"'); break; case \OC\Accounts\AccountManager::VERIFIED: - print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '" title="Verified"'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"' . \OC::$server->getL10N()->t('Verified') . '"'); break; default: - print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="Verify"'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="' . \OC::$server->getL10N()->t('Verify') . '"'); } ?>> </div> @@ -180,13 +180,13 @@ <img id="verify-website" <?php switch($_['websiteVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="Verifying …"'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="' . \OC::$server->getL10N()->t('Verifying …') . '"'); break; case \OC\Accounts\AccountManager::VERIFIED: - print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '" title="Verified"'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"' . \OC::$server->getL10N()->t('Verified') . '"'); break; default: - print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="Verify" class="verify-action"'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="' . \OC::$server->getL10N()->t('Verify') . '" class="verify-action"'); } ?>> </div> @@ -207,13 +207,13 @@ <img id="verify-twitter" <?php switch($_['twitterVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="Verifying …"'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="' . \OC::$server->getL10N()->t('Verifying …') . '"'); break; case \OC\Accounts\AccountManager::VERIFIED: - print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '" title="Verified"'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"' . \OC::$server->getL10N()->t('Verified') . '"'); break; default: - print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="Verify" class="verify-action"'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="' . \OC::$server->getL10N()->t('Verify') . '" class="verify-action"'); } ?>> </div> |