From 558a296fb9a77d153fae309f145c31f8e8d372d5 Mon Sep 17 00:00:00 2001
From: briskt <3172830+briskt@users.noreply.github.com>
Date: Thu, 20 Jun 2024 16:33:34 +0800
Subject: [PATCH 1/9] convert nag template to Twig
---
.../material/dictionaries/nag.definition.json | 75 -------------------
.../locales/en/LC_MESSAGES/material.po | 36 +++++++++
.../locales/es/LC_MESSAGES/material.po | 36 +++++++++
.../locales/fr/LC_MESSAGES/material.po | 36 +++++++++
.../locales/ko/LC_MESSAGES/material.po | 36 +++++++++
.../material/profilereview/nag-for-method.php | 52 -------------
.../profilereview/nag-for-method.twig | 52 +++++++++++++
.../material/profilereview/nag-for-mfa.php | 63 ----------------
.../material/profilereview/nag-for-mfa.twig | 58 ++++++++++++++
.../locales/en/LC_MESSAGES/.gitkeep | 0
.../locales/es/LC_MESSAGES/.gitkeep | 0
.../locales/fr/LC_MESSAGES/.gitkeep | 0
.../locales/ko/LC_MESSAGES/.gitkeep | 0
modules/profilereview/public/nag.php | 2 +-
.../src/Auth/Process/ProfileReview.php | 4 +-
15 files changed, 257 insertions(+), 193 deletions(-)
delete mode 100644 modules/material/dictionaries/nag.definition.json
delete mode 100644 modules/material/themes/material/profilereview/nag-for-method.php
create mode 100644 modules/material/themes/material/profilereview/nag-for-method.twig
delete mode 100644 modules/material/themes/material/profilereview/nag-for-mfa.php
create mode 100644 modules/material/themes/material/profilereview/nag-for-mfa.twig
create mode 100644 modules/profilereview/locales/en/LC_MESSAGES/.gitkeep
create mode 100644 modules/profilereview/locales/es/LC_MESSAGES/.gitkeep
create mode 100644 modules/profilereview/locales/fr/LC_MESSAGES/.gitkeep
create mode 100644 modules/profilereview/locales/ko/LC_MESSAGES/.gitkeep
diff --git a/modules/material/dictionaries/nag.definition.json b/modules/material/dictionaries/nag.definition.json
deleted file mode 100644
index 9c450e90..00000000
--- a/modules/material/dictionaries/nag.definition.json
+++ /dev/null
@@ -1,75 +0,0 @@
-
-{
- "mfa_title": {
- "en": "2-Step Verification",
- "es": "Verificación en 2 pasos",
- "fr": "Vérification en deux étapes",
- "ko": "2 단계 인증"
- },
- "mfa_header": {
- "en": "2-Step Verification",
- "es": "Verificación en 2 pasos",
- "fr": "Vérification en deux étapes",
- "ko": "2 단계 인증"
- },
- "method_title": {
- "en": "Password recovery methods",
- "es": "Métodos de recuperación de contraseña",
- "fr": "Méthodes de récupération de mot de passe",
- "ko": "비밀번호 복구 방법"
- },
- "method_header": {
- "en": "Password recovery methods",
- "es": "Métodos de recuperación de contraseña",
- "fr": "Méthodes de récupération de mot de passe",
- "ko": "비밀번호 복구 방법"
- },
- "shield_icon": {
- "en": "Shield icon",
- "es": "Icono de escudo",
- "fr": "Icône de bouclier",
- "ko": "방패 아이콘"
- },
- "header": {
- "en": "Protect yourself",
- "es": "Protéjase",
- "fr": "Protégez-vous",
- "ko": "자기 보호"
- },
- "mfa_info": {
- "en": "Did you know you could easily increase the security of your identity account by enabling 2-Step Verification?",
- "es": "¿Sabía que podría aumentar fácilmente la seguridad de su cuenta de identidad al habilitar la verificación en dos pasos?",
- "fr": "Savez-vous que vous pouvez facilement augmenter la sécurité de votre compte d'identité en activant la vérification en deux étapes?",
- "ko": "2 단계 인증을 사용하여 신원 계정의 보안을 쉽게 높일 수 있다는 사실을 알고 계셨습니까?"
- },
- "method_info": {
- "en": "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?",
- "es": "¿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?",
- "fr": "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ù?",
- "ko": "가끔 암호를 잊어 버리십니까? 혹시라도 비밀번호 복구를 위해 보조 이메일 주소를 추가하는 것이 매우 쉽다는 것을 알고 계셨습니까?"
- },
- "button_later": {
- "en": "Remind me later",
- "es": "Recuérdame más tarde",
- "fr": "Rappelez-moi plus tard",
- "ko": "추후 알림"
- },
- "button_learn_more": {
- "en": "Learn more",
- "es": "Aprende más",
- "fr": "Apprendre encore plus",
- "ko": "더 알아보기"
- },
- "button_enable": {
- "en": "Enable now",
- "es": "Habilite ahora",
- "fr": "Activer maintenant",
- "ko": "지금 사용"
- },
- "button_add": {
- "en": "Add one now",
- "es": "Agrega uno ahora",
- "fr": "Ajouter un maintenant",
- "ko": "지금 하나 추가"
- }
-}
diff --git a/modules/material/locales/en/LC_MESSAGES/material.po b/modules/material/locales/en/LC_MESSAGES/material.po
index 56c7384f..eceba73b 100644
--- a/modules/material/locales/en/LC_MESSAGES/material.po
+++ b/modules/material/locales/en/LC_MESSAGES/material.po
@@ -221,6 +221,42 @@ 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 "{selectidp-links:title}"
msgstr "Choose an identity account"
diff --git a/modules/material/locales/es/LC_MESSAGES/material.po b/modules/material/locales/es/LC_MESSAGES/material.po
index 493bdc8c..e3cec5b9 100644
--- a/modules/material/locales/es/LC_MESSAGES/material.po
+++ b/modules/material/locales/es/LC_MESSAGES/material.po
@@ -221,6 +221,42 @@ 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 "{selectidp-links:title}"
msgstr "Elige una cuenta de identidad"
diff --git a/modules/material/locales/fr/LC_MESSAGES/material.po b/modules/material/locales/fr/LC_MESSAGES/material.po
index 3534d3f0..7dd52353 100644
--- a/modules/material/locales/fr/LC_MESSAGES/material.po
+++ b/modules/material/locales/fr/LC_MESSAGES/material.po
@@ -221,6 +221,42 @@ 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 "{selectidp-links:title}"
msgstr "Choisissez un compte d'identité"
diff --git a/modules/material/locales/ko/LC_MESSAGES/material.po b/modules/material/locales/ko/LC_MESSAGES/material.po
index 5f357566..414ce962 100644
--- a/modules/material/locales/ko/LC_MESSAGES/material.po
+++ b/modules/material/locales/ko/LC_MESSAGES/material.po
@@ -221,6 +221,42 @@ msgstr "이 브라우저를 30일간 기억"
msgid "{mfa:unsupported}"
msgstr "이 브라우저에서는 지원되지 않습니다."
+msgid "{nag:mfa_title}"
+msgstr "2 단계 인증"
+
+msgid "{nag:mfa_header}"
+msgstr "2 단계 인증"
+
+msgid "{nag:method_title}"
+msgstr "비밀번호 복구 방법"
+
+msgid "{nag:method_header}"
+msgstr "비밀번호 복구 방법"
+
+msgid "{nag:shield_icon}"
+msgstr "방패 아이콘"
+
+msgid "{nag:header}"
+msgstr "자기 보호"
+
+msgid "{nag:mfa_info}"
+msgstr "2 단계 인증을 사용하여 신원 계정의 보안을 쉽게 높일 수 있다는 사실을 알고 계셨습니까?"
+
+msgid "{nag:method_info}"
+msgstr "가끔 암호를 잊어 버리십니까? 혹시라도 비밀번호 복구를 위해 보조 이메일 주소를 추가하는 것이 매우 쉽다는 것을 알고 계셨습니까?"
+
+msgid "{nag:button_later}"
+msgstr "추후 알림"
+
+msgid "{nag:button_learn_more}"
+msgstr "더 알아보기"
+
+msgid "{nag:button_enable}"
+msgstr "지금 사용"
+
+msgid "{nag:button_add}"
+msgstr "지금 하나 추가"
+
msgid "{selectidp-links:title}"
msgstr "ID 계정 선택"
diff --git a/modules/material/themes/material/profilereview/nag-for-method.php b/modules/material/themes/material/profilereview/nag-for-method.php
deleted file mode 100644
index 7e6d50d1..00000000
--- a/modules/material/themes/material/profilereview/nag-for-method.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-