diff --git a/dictionaries/privacyidea.definition.json b/dictionaries/privacyidea.definition.json index 2f2b5f6cf87b53dbf7856a9162e2dac495a1c6fd..7ec13d06184b24be1a4e5fddbc2c782dd15b14ba 100644 --- a/dictionaries/privacyidea.definition.json +++ b/dictionaries/privacyidea.definition.json @@ -45,7 +45,7 @@ "en": "Unable to proceed with Web Authn because the context is insecure!" }, "alert_webauthn_unavailable": { - "en": "Could not load WebAuthn library. Please try again or use other token." + "en": "Could not load WebAuthn, your device probably does not support it. Please try again or use another method." }, "alert_webAuthnSignRequest_error": { "en": "Error while signing WebAuthnSignRequest:" @@ -54,7 +54,7 @@ "en": "Unable to proceed with U2F because the context is insecure!" }, "alert_u2f_unavailable": { - "en": "Could not load U2F library. Please try again or use other token." + "en": "Could not load U2F, your device probably does not support it. Please try again or use another method." }, "alert_U2FSignRequest_error": { "en": "Error while signing U2FSignRequest:" @@ -62,8 +62,8 @@ "tryAgain": { "en": "Try Again" }, - "incorrect_otp": { - "en": "You have entered incorrect OTP. Please try again or use another token." + "error_message": { + "en": "Verification was not successful. Please try again." }, "error": { "en": "Error " diff --git a/dictionaries/privacyidea.translation.json b/dictionaries/privacyidea.translation.json index 38b5a08946a31aa53d8e0bc9c32206bec85173a8..b74df6542a22031bf00514cb8b4b60aad3b55e93 100644 --- a/dictionaries/privacyidea.translation.json +++ b/dictionaries/privacyidea.translation.json @@ -67,7 +67,7 @@ "cs": "NenĂ moĹľnĂ© pouĹľĂt autentizaci WebAuthn, protoĹľe neodpovĂdá bezpeÄŤnostnĂ kontext." }, "alert_webauthn_unavailable": { - "cs": "NaÄŤtenĂ WebAuthn knihovny se nezdaĹ™ilo. Zkuste to znovu nebo pouĹľijte jinĂ˝ token." + "cs": "NaÄŤtenĂ WebAuthn se nezdaĹ™ilo, nejspĂš ho Vaše zaĹ™ĂzenĂ nepodporuje. Zkuste to znovu nebo pouĹľijte jinou metodu." }, "alert_webAuthnSignRequest_error": { "cs": "Chyba pĹ™i podepisovánĂ WebAuthnSignRequest:" @@ -76,7 +76,7 @@ "cs": "NenĂ moĹľnĂ© pouĹľĂt autentizaci U2F, protoĹľe neodpovĂdá bezpeÄŤnostnĂ kontext." }, "alert_u2f_unavailable": { - "cs": "NaÄŤtenĂ U2F knihovny se nezdaĹ™ilo. Zkuste to znovu nebo pouĹľijte jinĂ˝ token." + "cs": "NaÄŤtenĂ U2F se nezdaĹ™ilo, nejspĂš ho Vaše zaĹ™ĂzenĂ nepodporuje. Zkuste to znovu nebo pouĹľijte jinou metodu." }, "alert_U2FSignRequest_error": { "cs": "Chyba pĹ™i podepisovánĂ U2FSignRequest:" @@ -86,8 +86,8 @@ "de": "Nochmal versuchen", "nl": "Probeer opnieuw" }, - "incorrect_otp": { - "cs": "Zadali jste nesprávnĂ© jednorázovĂ© heslo. Zkuste to znovu nebo pouĹľijte jinĂ˝ token." + "error_message": { + "cs": "OvěřenĂ nebylo ĂşspěšnĂ©. Zkuste to znovu nebo pouĹľijte jinou metodu." }, "error": { "cs": "Chyba " diff --git a/www/FormBuilder.php b/www/FormBuilder.php index 11bd286840624f0d5382ea42e6ee14b1b12cdeb1..150702fe6446fe935226eb4e4c4ccfe0e6490768 100644 --- a/www/FormBuilder.php +++ b/www/FormBuilder.php @@ -39,14 +39,9 @@ $tpl->data['errorCode'] = null; $tpl->data['errorMessage'] = null; if (!empty($state['privacyidea:privacyidea']['errorCode']) || !empty($state['privacyidea:privacyidea']['errorMessage'])) { - if (!empty($state['privacyidea:privacyidea']['errorCode'])) { - $tpl->data['errorCode'] = $state['privacyidea:privacyidea']['errorCode']; - $state['privacyidea:privacyidea']['errorCode'] = ''; - $tpl->data['errorMessage'] = $state['privacyidea:privacyidea']['errorMessage']; - } else { - $tpl->data['errorCode'] = ''; - $tpl->data['errorMessage'] = $tpl->t('{privacyidea:privacyidea:incorrect_otp}'); - } + $tpl->data['errorCode'] = ($state['privacyidea:privacyidea']['errorCode'] ?? null) ?: ''; + $state['privacyidea:privacyidea']['errorCode'] = '' + $tpl->data['errorMessage'] = $tpl->t('{privacyidea:privacyidea:error_message}'); $state['privacyidea:privacyidea']['errorMessage'] = ''; $stateId = State::saveState($state, 'privacyidea:privacyidea'); }