move translatable strings out of the template
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
68ba8572b2
commit
9480b29413
|
@ -189,6 +189,24 @@ $tmpl->assign('websiteVerification', $userData[\OC\Accounts\AccountManager::PROP
|
||||||
$tmpl->assign('twitterVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['verified']);
|
$tmpl->assign('twitterVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['verified']);
|
||||||
$tmpl->assign('emailVerification', $userData[\OC\Accounts\AccountManager::PROPERTY_EMAIL]['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('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser()));
|
||||||
$tmpl->assign('certs', $certificateManager->listCertificates());
|
$tmpl->assign('certs', $certificateManager->listCertificates());
|
||||||
$tmpl->assign('showCertificates', $enableCertImport);
|
$tmpl->assign('showCertificates', $enableCertImport);
|
||||||
|
|
|
@ -103,14 +103,15 @@
|
||||||
<img id="verify-email" <?php
|
<img id="verify-email" <?php
|
||||||
switch($_['emailVerification']) {
|
switch($_['emailVerification']) {
|
||||||
case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
|
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;
|
break;
|
||||||
case \OC\Accounts\AccountManager::VERIFIED:
|
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;
|
break;
|
||||||
default:
|
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>
|
</div>
|
||||||
<input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
|
<input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
|
||||||
|
@ -169,14 +170,15 @@
|
||||||
<img id="verify-website" <?php
|
<img id="verify-website" <?php
|
||||||
switch($_['websiteVerification']) {
|
switch($_['websiteVerification']) {
|
||||||
case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
|
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;
|
break;
|
||||||
case \OC\Accounts\AccountManager::VERIFIED:
|
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;
|
break;
|
||||||
default:
|
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 popovermenu bubble menu">
|
||||||
<div class="verification-dialog-content">
|
<div class="verification-dialog-content">
|
||||||
|
@ -203,14 +205,15 @@
|
||||||
<img id="verify-twitter" <?php
|
<img id="verify-twitter" <?php
|
||||||
switch($_['twitterVerification']) {
|
switch($_['twitterVerification']) {
|
||||||
case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS:
|
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;
|
break;
|
||||||
case \OC\Accounts\AccountManager::VERIFIED:
|
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;
|
break;
|
||||||
default:
|
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 popovermenu bubble menu">
|
||||||
<div class="verification-dialog-content">
|
<div class="verification-dialog-content">
|
||||||
|
|
Loading…
Reference in New Issue