move translatable strings out of the template

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2017-04-27 11:44:57 +02:00 committed by Morris Jobke
parent 68ba8572b2
commit 9480b29413
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with 30 additions and 9 deletions

View File

@ -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);

View File

@ -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">