Skip to content

Commit

Permalink
Merge pull request #238 from silinternational/feature/ssp2-nag-twig
Browse files Browse the repository at this point in the history
convert profile review templates to Twig
  • Loading branch information
briskt authored Jun 28, 2024
2 parents e964970 + 9116f33 commit d7c08a7
Show file tree
Hide file tree
Showing 28 changed files with 568 additions and 393 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ The login page looks for `/simplesamlphp/public/logo.png` which is **NOT** provi
Update `/simplesamlphp/config/config.php`:
```
'analytics.trackingId' => 'G-some-unique-id-for-your-site'
'analytics.trackingId' => 'UA-some-unique-id-for-your-site'
```
This project provides a convenience by loading this config with whatever is in the environment variable `ANALYTICS_ID`._
Expand Down
20 changes: 10 additions & 10 deletions behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ default:
profilereview_features:
paths: [ '%paths.base%//features//profilereview.feature' ]
contexts: [ 'ProfileReviewContext' ]
sildisco_features:
contexts: ['SilDiscoContext']
paths:
- '%paths.base%//features//Sp1Idp1Sp2Idp2Sp3.feature'
- '%paths.base%//features//Sp1Idp2Sp2Sp3Idp1.feature'
- '%paths.base%//features//Sp2Idp2Sp1Idp1Sp3.feature'
- '%paths.base%//features//Sp2Idp2Sp1Idp2Sp3.feature'
- '%paths.base%//features//Sp3Idp1Sp1Idp1Sp2Idp2.feature'
- '%paths.base%//features//WwwMetadataCept.feature'
- '%paths.base%//features//ZSp1Idp1BetaSp1Idp3.feature'
# sildisco_features:
# contexts: ['SilDiscoContext']
# paths:
# - '%paths.base%//features//Sp1Idp1Sp2Idp2Sp3.feature'
# - '%paths.base%//features//Sp1Idp2Sp2Sp3Idp1.feature'
# - '%paths.base%//features//Sp2Idp2Sp1Idp1Sp3.feature'
# - '%paths.base%//features//Sp2Idp2Sp1Idp2Sp3.feature'
# - '%paths.base%//features//Sp3Idp1Sp1Idp1Sp2Idp2.feature'
# - '%paths.base%//features//WwwMetadataCept.feature'
# - '%paths.base%//features//ZSp1Idp1BetaSp1Idp3.feature'
status_features:
paths: [ '%paths.base%//features//status.feature' ]
contexts: [ 'StatusContext' ]
2 changes: 1 addition & 1 deletion features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private function takeScreenshot() {
mkdir(self::SCREENSHOTS_PATH);
}
if (is_dir(self::SCREENSHOTS_PATH)) {
$path = self::SCREENSHOTS_PATH . date('d-m-y') . '-' . uniqid() . '.png';
$path = self::SCREENSHOTS_PATH . date('Y-m-d_H:i:s_') . uniqid() . '.png';
file_put_contents($path, $screenshot);
print "\n\nScreenshot: " . $path;
}
Expand Down
2 changes: 1 addition & 1 deletion features/bootstrap/StatusContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function iRequestTheInitialLoginPageOfThisModule()
'cookies' => true,
'http_errors' => false,
]);
$response = $client->get('http://ssp-idp1.local/module.php/core/authenticate.php?as=silauth');
$response = $client->get('http://ssp-idp1.local/module.php/admin/test/silauth');
$this->responseCode = $response->getStatusCode();
}

Expand Down
75 changes: 0 additions & 75 deletions modules/material/dictionaries/nag.definition.json

This file was deleted.

74 changes: 73 additions & 1 deletion modules/material/locales/en/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ msgid "{mfa:webauthn_instructions}"
msgstr "You may now insert your security key and press its button."

msgid "{mfa:webauthn_unsupported}"
msgstr "Unsupported in your current browser. Please consider a more secure browser like <a href='https://www.google.com/chrome/browser' target='_blank'>Google Chrome</a>."
msgstr "Unsupported in your current browser. Please consider a more secure browser like <a href='https://www.google.com/chrome/browser' target='_blank' rel=noopener'>Google Chrome</a>."

msgid "{mfa:webauthn_error_unknown}"
msgstr "Something went wrong with that request, unable to verify at this time."
Expand Down Expand Up @@ -221,6 +221,78 @@ msgstr "Remember this browser for 30 days"
msgid "{mfa:unsupported}"
msgstr "Not supported in this browser"

msgid "{nag:mfa_title}"
msgstr "2-Step Verification"

msgid "{nag:mfa_header}"
msgstr "2-Step Verification"

msgid "{nag:method_title}"
msgstr "Password recovery methods"

msgid "{nag:method_header}"
msgstr "Password recovery methods"

msgid "{nag:shield_icon}"
msgstr "Shield icon"

msgid "{nag:header}"
msgstr "Protect yourself"

msgid "{nag:mfa_info}"
msgstr "Did you know you could easily increase the security of your identity account by enabling 2-Step Verification?"

msgid "{nag:method_info}"
msgstr "Do you forget your password sometimes? Did you know it is very easy to add an alternate email address for password recovery just in case?"

msgid "{nag:button_later}"
msgstr "Remind me later"

msgid "{nag:button_learn_more}"
msgstr "Learn more"

msgid "{nag:button_enable}"
msgstr "Enable now"

msgid "{nag:button_add}"
msgstr "Add one now"

msgid "{review:title}"
msgstr "Profile review"

msgid "{review:header}"
msgstr "Profile review"

msgid "{review:info}"
msgstr "Are these still correct?"

msgid "{review:mfa_header}"
msgstr "2-Step Verification"

msgid "{review:methods_header}"
msgstr "Password Recovery Methods"

msgid "{review:remaining}"
msgstr "(%count% remaining)"

msgid "{review:used}"
msgstr "last used: %when%"

msgid "{review:used_never}"
msgstr "last used: Never"

msgid "{review:verified}"
msgstr "Verified"

msgid "{review:unverified}"
msgstr "Unverified"

msgid "{review:button_update}"
msgstr "Some of these need updating"

msgid "{review:button_continue}"
msgstr "These are still correct"

msgid "{selectidp-links:title}"
msgstr "Choose an identity account"

Expand Down
74 changes: 73 additions & 1 deletion modules/material/locales/es/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ msgid "{mfa:webauthn_instructions}"
msgstr "Ahora puede insertar su clave de seguridad y presionar su botón."

msgid "{mfa:webauthn_unsupported}"
msgstr "No compatible en su navegador actual. Considere un navegador más seguro como <a href='https://www.google.com/chrome/browser' target='_blank'>Google Chrome</a>."
msgstr "No compatible en su navegador actual. Considere un navegador más seguro como <a href='https://www.google.com/chrome/browser' target='_blank' rel='noopener'>Google Chrome</a>."

msgid "{mfa:webauthn_error_unknown}"
msgstr "Algo salió mal con esa solicitud, no se pudo verificar en este momento."
Expand Down Expand Up @@ -221,6 +221,78 @@ msgstr "Recuerde esta navegador por 30 días"
msgid "{mfa:unsupported}"
msgstr "No compatible con este navegador"

msgid "{nag:mfa_title}"
msgstr "Verificación en 2 pasos"

msgid "{nag:mfa_header}"
msgstr "Verificación en 2 pasos"

msgid "{nag:method_title}"
msgstr "Métodos de recuperación de contraseña"

msgid "{nag:method_header}"
msgstr "Métodos de recuperación de contraseña"

msgid "{nag:shield_icon}"
msgstr "Icono de escudo"

msgid "{nag:header}"
msgstr "Protéjase"

msgid "{nag:mfa_info}"
msgstr "¿Sabía que podría aumentar fácilmente la seguridad de su cuenta de identidad al habilitar la verificación en dos pasos?"

msgid "{nag:method_info}"
msgstr "¿Olvidas tu contraseña a veces? ¿Sabía que es muy fácil agregar una dirección de correo electrónico alternativa para recuperar la contraseña por si acaso?"

msgid "{nag:button_later}"
msgstr "Recuérdame más tarde"

msgid "{nag:button_learn_more}"
msgstr "Aprende más"

msgid "{nag:button_enable}"
msgstr "Habilite ahora"

msgid "{nag:button_add}"
msgstr "Agrega uno ahora"

msgid "{review:title}"
msgstr "Revisión del perfil"

msgid "{review:header}"
msgstr "Revisión del perfil"

msgid "{review:info}"
msgstr "¿Siguen siendo correctos?"

msgid "{review:mfa_header}"
msgstr "Verificación en 2 pasos"

msgid "{review:methods_header}"
msgstr "Métodos de recuperación de contraseña"

msgid "{review:remaining}"
msgstr "(%count% restante)"

msgid "{review:used}"
msgstr "último uso: %when%"

msgid "{review:used_never}"
msgstr "último uso: nunca"

msgid "{review:verified}"
msgstr "Verificado"

msgid "{review:unverified}"
msgstr "Inconfirmado"

msgid "{review:button_update}"
msgstr "Algunos de estos necesitan actualización"

msgid "{review:button_continue}"
msgstr "Estos siguen siendo correctos"

msgid "{selectidp-links:title}"
msgstr "Elige una cuenta de identidad"

Expand Down
74 changes: 73 additions & 1 deletion modules/material/locales/fr/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ msgid "{mfa:webauthn_instructions}"
msgstr "Vous pouvez maintenant insérer votre clé de sécurité et appuyer sur le bouton."

msgid "{mfa:webauthn_unsupported}"
msgstr "Non compatible avec votre navigateur actuel. Veuillez considérer un navigateur plus sûr comme <a href='https://www.google.com/chrome/browser' target='_blank'>Google Chrome</a>."
msgstr "Non compatible avec votre navigateur actuel. Veuillez considérer un navigateur plus sûr comme <a href='https://www.google.com/chrome/browser' target='_blank' rel='noopener'>Google Chrome</a>."

msgid "{mfa:webauthn_error_unknown}"
msgstr "Quelque chose s'est mal passé avec cette demande, impossible de vérifier pour le moment."
Expand Down Expand Up @@ -221,6 +221,78 @@ msgstr "Se rappeler de ce navigatuer pour 30 jours"
msgid "{mfa:unsupported}"
msgstr "Non pris en charge dans ce navigateur"

msgid "{nag:mfa_title}"
msgstr "Vérification en deux étapes"

msgid "{nag:mfa_header}"
msgstr "Vérification en deux étapes"

msgid "{nag:method_title}"
msgstr "Méthodes de récupération de mot de passe"

msgid "{nag:method_header}"
msgstr "Méthodes de récupération de mot de passe"

msgid "{nag:shield_icon}"
msgstr "Icône de bouclier"

msgid "{nag:header}"
msgstr "Protégez-vous"

msgid "{nag:mfa_info}"
msgstr "Savez-vous que vous pouvez facilement augmenter la sécurité de votre compte d'identité en activant la vérification en deux étapes?"

msgid "{nag:method_info}"
msgstr "Avez-vous oublié votre mot de passe parfois? Saviez-vous qu'il est très facile d'ajouter une adresse électronique de remplacement pour la récupération du mot de passe au cas où?"

msgid "{nag:button_later}"
msgstr "Rappelez-moi plus tard"

msgid "{nag:button_learn_more}"
msgstr "Apprendre encore plus"

msgid "{nag:button_enable}"
msgstr "Activer maintenant"

msgid "{nag:button_add}"
msgstr "Ajouter un maintenant"

msgid "{review:title}"
msgstr "Examen du profil"

msgid "{review:header}"
msgstr "Examen du profil"

msgid "{review:info}"
msgstr "Sont-ils toujours corrects?"

msgid "{review:mfa_header}"
msgstr "Vérification en 2 étapes"

msgid "{review:methods_header}"
msgstr "Méthodes de récupération de mot de passe"

msgid "{review:remaining}"
msgstr "(%count% restant)"

msgid "{review:used}"
msgstr "dernière utilisation: %when%"

msgid "{review:used_never}"
msgstr "Dernière utilisation: Jamais"

msgid "{review:verified}"
msgstr "Vérifié"

msgid "{review:unverified}"
msgstr "Non vérifié"

msgid "{review:button_update}"
msgstr "Certains ont besoin d'être mis à jour"

msgid "{review:button_continue}"
msgstr "Ceux-ci sont toujours corrects"

msgid "{selectidp-links:title}"
msgstr "Choisissez un compte d'identité"

Expand Down
Loading

0 comments on commit d7c08a7

Please sign in to comment.