mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup plugin languages
This commit is contained in:
parent
8b760ef0d1
commit
d1f43f49b7
10 changed files with 14 additions and 65 deletions
|
|
@ -12,10 +12,6 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
CATEGORY = 'Login',
|
||||
DESCRIPTION = 'This plugin allows you to have TOTP 2FA';
|
||||
|
||||
const
|
||||
AccountTwoFactorAuthRequired = 120,
|
||||
AccountTwoFactorAuthError = 121;
|
||||
|
||||
public function Init() : void
|
||||
{
|
||||
$this->UseLangs(true);
|
||||
|
|
@ -44,11 +40,10 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
if ($aData && isset($aData['IsSet'], $aData['Enable']) && !empty($aData['Secret']) && $aData['IsSet'] && $aData['Enable']) {
|
||||
$sCode = \trim($this->jsonParam('totp_code', ''));
|
||||
if (empty($sCode)) {
|
||||
$this->Logger()->Write("TFA: Required Code for {$oAccount->ParentEmailHelper()} account.");
|
||||
throw new ClientException(static::AccountTwoFactorAuthRequired);
|
||||
$this->Logger()->Write("TFA: Code required for {$oAccount->ParentEmailHelper()}");
|
||||
throw new ClientException(\RainLoop\Notifications::AuthError);
|
||||
}
|
||||
|
||||
$this->Logger()->Write("TFA: Verify Code for {$oAccount->ParentEmailHelper()} account.");
|
||||
$bUseBackupCode = false;
|
||||
if (6 < \strlen($sCode) && !empty($aData['BackupCodes'])) {
|
||||
$aBackupCodes = \explode(' ', \trim(\preg_replace('/[^\d]+/', ' ', $aData['BackupCodes'])));
|
||||
|
|
@ -60,8 +55,10 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
|
||||
if (!$bUseBackupCode && !$this->TwoFactorAuthProvider($oAccount)->VerifyCode($aData['Secret'], $sCode)) {
|
||||
$this->Manager()->Actions()->LoggerAuthHelper($oAccount);
|
||||
throw new ClientException(static::AccountTwoFactorAuthError);
|
||||
$this->Logger()->Write("TFA: Code failed for {$oAccount->ParentEmailHelper()}");
|
||||
throw new ClientException(\RainLoop\Notifications::AuthError);
|
||||
}
|
||||
$this->Logger()->Write("TFA: Code verified for {$oAccount->ParentEmailHelper()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
rl && addEventListener('rl-view-model', e => {
|
||||
if (e.detail && 'Login' === e.detail.viewModelTemplateID) {
|
||||
const container = e.detail.viewModelDom.querySelector('#plugin-Login-BottomControlGroup'),
|
||||
placeholder = 'LOGIN/LABEL_VERIFICATION_CODE';
|
||||
placeholder = 'LOGIN/LABEL_TWO_FACTOR_CODE';
|
||||
if (container) {
|
||||
container.prepend(Element.fromHTML('<div class="controls">'
|
||||
+ '<div class="input-append">'
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Sie können diese Einstellung nicht ohne v
|
|||
[POPUPS_TWO_FACTOR_TEST]
|
||||
TITLE_TEST_CODE = "Zwei-Faktor-Authentifizierung"
|
||||
LABEL_CODE = "Code"
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "Zwei-Faktor-Authentifizierung konfigurieren"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "Zwei-Faktor-Authentifizierung erforderlich"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "Fehler bei Zwei-Faktor-Authentifizierung"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "Verifizierungscode"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "Für zwei Wochen nicht nach dem Code fragen"
|
||||
LABEL_TWO_FACTOR_CODE = "Verifizierungscode"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Not configured"
|
|||
TWO_FACTOR_SECRET_DESC = "Import this info into your Google Authenticator client (or other TOTP client) using the provided QR code below or by entering the code manually.\n"
|
||||
TWO_FACTOR_BACKUP_CODES_DESC = "If you can't receive codes via Google Authenticator (or other TOTP client), you can use backup codes to sign in. After you’ve used a backup code to sign in, it will become inactive.\n"
|
||||
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "You can't change this setting before test."
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "Configure 2-Step verification"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "Two factor verification required"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "Two factor verification error"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "Verification Code"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "Don't ask for the code for 2 weeks"
|
||||
LABEL_TWO_FACTOR_CODE = "Verification Code"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "No configurado"
|
|||
TWO_FACTOR_SECRET_DESC = "Importar esta información en su cliente Google Authenticator (u otro cliente TOTP) utilizando el código QR se indica debajo o introduciendo el código manualmente."
|
||||
TWO_FACTOR_BACKUP_CODES_DESC = "Si usted no puede recibir los códigos a través de Google Authenticator, puede utilizar códigos de copia de seguridad para firmar pulg Después de que usted ha utilizado un código de copia de seguridad para iniciar sesión, se convertirá en inactiva."
|
||||
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "You can't change this setting before test."
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "Configurar verificación de 2-Pasos"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "Factor de verificación en dos pasos requerido"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "Error de verificación en dos pasos"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "Código de verificación"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "No solicitar el código de verificación durante 2 semanas"
|
||||
LABEL_TWO_FACTOR_CODE = "Código de verificación"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Vous ne pouvez pas modifier ce paramètre
|
|||
[POPUPS_TWO_FACTOR_TEST]
|
||||
TITLE_TEST_CODE = "Test d'authentification en deux étapes"
|
||||
LABEL_CODE = "Code"
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "Configurer l'authentification en deux étapes"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "Double authentification requise"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "Erreur lors de la double authentification"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "Code de vérification"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "Ne plus demander le code pendant 2 semaines"
|
||||
LABEL_TWO_FACTOR_CODE = "Code de vérification"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Tesztelés nélkül nem lehet megváltozta
|
|||
[POPUPS_TWO_FACTOR_TEST]
|
||||
TITLE_TEST_CODE = "2-lépéses hitelesítés teszt"
|
||||
LABEL_CODE = "Kód"
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "2 lépcsős hitelesítés beállítása"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "Kétlépcsős azonosítás kötelező"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "Kétlépcsős azonosítás hiba"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "Megerősítő kód"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "Két hétig ne kérje a kódot"
|
||||
LABEL_TWO_FACTOR_CODE = "Megerősítő kód"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "U kunt 2-stap verificatie niet activeren v
|
|||
[POPUPS_TWO_FACTOR_TEST]
|
||||
TITLE_TEST_CODE = "2-Stap verificatie test"
|
||||
LABEL_CODE = "Code"
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "Configureer 2-stap verificatie"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "2-Stap verificatie vereist"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "2-Stap verificatie fout"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "Verificatie Code"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "Vraag 2 weken niet naar code"
|
||||
LABEL_TWO_FACTOR_CODE = "Verificatie Code"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Du kan inte ändra denna inställning inna
|
|||
[POPUPS_TWO_FACTOR_TEST]
|
||||
TITLE_TEST_CODE = "Tvåstegsverifieringstest"
|
||||
LABEL_CODE = "Kod"
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "Konfigurera tvåstegsverifiering"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "Tvåstegsverifiering krävs"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "Tvåstegsverifieringsfel"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "Verifikationskod"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "Fråga inte efter koden på 2 veckor"
|
||||
LABEL_TWO_FACTOR_CODE = "Verifikationskod"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,5 @@ TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "完成测试前你无法更改此设置。
|
|||
[POPUPS_TWO_FACTOR_TEST]
|
||||
TITLE_TEST_CODE = "两步验证测试"
|
||||
LABEL_CODE = "代码"
|
||||
[SETTINGS_SECURITY]
|
||||
LABEL_CONFIGURE_TWO_FACTOR = "配置两步验证"
|
||||
[NOTIFICATIONS]
|
||||
ACCOUNT_TWO_FACTOR_AUTH_REQUIRED = "需要进行两步验证"
|
||||
ACCOUNT_TWO_FACTOR_AUTH_ERROR = "两步验证错误"
|
||||
[LOGIN]
|
||||
LABEL_VERIFICATION_CODE = "验证码"
|
||||
LABEL_DONT_ASK_VERIFICATION_CODE = "在两周内不再询问验证码"
|
||||
LABEL_TWO_FACTOR_CODE = "验证码"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue