diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-27 11:44:57 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-28 23:41:37 -0300 |
commit | 9480b29413daba34432885642b575065ed5f5d6d (patch) | |
tree | b5387568a029bd1d9cac39fc2cbd3ea5de7b954b /settings | |
parent | 68ba8572b2d044f5af38a25a38f9217039a4ccb1 (diff) | |
download | nextcloud-server-9480b29413daba34432885642b575065ed5f5d6d.tar.gz nextcloud-server-9480b29413daba34432885642b575065ed5f5d6d.zip |
move translatable strings out of the template
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/personal.php | 18 | ||||
-rw-r--r-- | settings/templates/personal.php | 21 |
2 files changed, 30 insertions, 9 deletions
diff --git a/settings/personal.php b/settings/personal.php index d81cdd7c2f3..86ac4f753f4 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -189,6 +189,24 @@ $tmpl->assign('websiteVerification', $userData[\OC\Accounts\AccountManager::PROP $tmpl->assign('twitterVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['verified']); $tmpl->assign('emailVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_EMAIL]['verified']); +$needVerifyMessage = [\OC\Accounts\AccountManager::PROPERTY_EMAIL, \OC\Accounts\AccountManager::PROPERTY_WEBSITE, \OC\Accounts\AccountManager::PROPERTY_TWITTER]; + +foreach ($needVerifyMessage as $property) { + + switch ($userData[$property]['verified']) { + case \OC\Accounts\AccountManager::VERIFIED: + $message = $l->t('Verifying'); + break; + case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: + $message = $l->t('Verifying …'); + break; + default: + $message = $l->t('Verify'); + } + + $tmpl->assign($property . 'Message', $message); +} + $tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser())); $tmpl->assign('certs', $certificateManager->listCertificates()); $tmpl->assign('showCertificates', $enableCertImport); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 597f1c40ba2..8dc2872e743 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -103,14 +103,15 @@ <img id="verify-email" <?php switch($_['emailVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="' . \OC::$server->getL10N()->t('Verifying …') . '"'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '"'); break; case \OC\Accounts\AccountManager::VERIFIED: - print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"' . \OC::$server->getL10N()->t('Verified') . '"'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '""'); break; default: - print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="' . \OC::$server->getL10N()->t('Verify') . '"'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '"'); } + print_unescaped(' title="' . $_['websiteMessage'] . '""'); ?>> </div> <input type="email" name="email" id="email" value="<?php p($_['email']); ?>" @@ -169,14 +170,15 @@ <img id="verify-website" <?php switch($_['websiteVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="' . \OC::$server->getL10N()->t('Verifying …') . '"'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '"'); break; case \OC\Accounts\AccountManager::VERIFIED: - print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"' . \OC::$server->getL10N()->t('Verified') . '"'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"'); break; default: - print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="' . \OC::$server->getL10N()->t('Verify') . '" class="verify-action"'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" class="verify-action"'); } + print_unescaped(' title="' . $_['websiteMessage'] . '""'); ?>> <div class="verification-dialog popovermenu bubble menu"> <div class="verification-dialog-content"> @@ -203,14 +205,15 @@ <img id="verify-twitter" <?php switch($_['twitterVerification']) { case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '" title="' . \OC::$server->getL10N()->t('Verifying …') . '"'); + print_unescaped('src="' . image_path('core', 'actions/verifying.svg') . '"'); break; case \OC\Accounts\AccountManager::VERIFIED: - print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"' . \OC::$server->getL10N()->t('Verified') . '"'); + print_unescaped('src="' . image_path('core', 'actions/verified.svg') . '"'); break; default: - print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" title="' . \OC::$server->getL10N()->t('Verify') . '" class="verify-action"'); + print_unescaped('src="' . image_path('core', 'actions/verify.svg') . '" class="verify-action"'); } + print_unescaped(' title="' . $_['twitterMessage'] . '""'); ?>> <div class="verification-dialog popovermenu bubble menu"> <div class="verification-dialog-content"> |