From 86c4e3869e2363a54f58c89d003df2555537a6db Mon Sep 17 00:00:00 2001 From: Andreia Pena Date: Thu, 13 Jun 2024 15:23:55 +0200 Subject: [PATCH 1/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(mon-pix):=20extract?= =?UTF-8?q?=20html=20form=20translation=20keys=20for=20step=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certification-instructions/step-one.hbs | 18 ++++++++++++++++-- .../certification-instructions/step-one.js | 12 ------------ .../tests/integration/components/steps_test.js | 4 +++- mon-pix/translations/en.json | 14 +++++++++++++- mon-pix/translations/es.json | 15 +++++++++++++-- mon-pix/translations/fr.json | 13 ++++++++++++- mon-pix/translations/nl.json | 15 +++++++++++++-- 7 files changed, 70 insertions(+), 21 deletions(-) delete mode 100644 mon-pix/app/components/certification-instructions/step-one.js diff --git a/mon-pix/app/components/certification-instructions/step-one.hbs b/mon-pix/app/components/certification-instructions/step-one.hbs index 047ae4b9fcf..3a0dd344e93 100644 --- a/mon-pix/app/components/certification-instructions/step-one.hbs +++ b/mon-pix/app/components/certification-instructions/step-one.hbs @@ -1,3 +1,17 @@ -
-

{{this.text}}

+
+

+ {{t "pages.certification-instructions.steps.1.question"}} +

+ +

+ {{t "pages.certification-instructions.steps.1.paragraphs.1.text" htmlSafe=true}} +

+ +

+ {{t "pages.certification-instructions.steps.1.paragraphs.2.text" htmlSafe=true}} +

+ +

+ {{t "pages.certification-instructions.steps.1.paragraphs.3.text" htmlSafe=true}} +

\ No newline at end of file diff --git a/mon-pix/app/components/certification-instructions/step-one.js b/mon-pix/app/components/certification-instructions/step-one.js deleted file mode 100644 index abfb30704a2..00000000000 --- a/mon-pix/app/components/certification-instructions/step-one.js +++ /dev/null @@ -1,12 +0,0 @@ -import { service } from '@ember/service'; -import Component from '@glimmer/component'; - -export default class StepOne extends Component { - @service intl; - - get text() { - return this.intl.t(`pages.certification-instructions.steps.1.text`, { - htmlSafe: true, - }); - } -} diff --git a/mon-pix/tests/integration/components/steps_test.js b/mon-pix/tests/integration/components/steps_test.js index 312a47fc2cd..7adab89bb3c 100644 --- a/mon-pix/tests/integration/components/steps_test.js +++ b/mon-pix/tests/integration/components/steps_test.js @@ -17,7 +17,9 @@ module('Integration | Component | steps', function (hooks) { // then assert.dom(screen.getByRole('heading', { name: 'Bienvenue à la certification Pix', level: 2 })).exists(); - assert.dom(screen.getByText('Comment fonctionne le test de certification ?')).exists(); + assert + .dom(screen.getByRole('heading', { name: 'Comment fonctionne le test de certification ?', level: 3 })) + .exists(); assert.dom(screen.getByRole('button', { name: "Continuer vers l'écran suivant" })).exists(); }); diff --git a/mon-pix/translations/en.json b/mon-pix/translations/en.json index 0555fcedb07..3c7446c4674 100644 --- a/mon-pix/translations/en.json +++ b/mon-pix/translations/en.json @@ -445,7 +445,19 @@ "steps": { "1": { "title": "Bienvenue à la certification Pix", - "text": "''Comment fonctionne le test de certification ?'' '

' ''Il s'agit d'un test adaptatif.'' C’est-à-dire, que votre capacité à répondre correctement (ou non) aux questions détermine en temps réel la difficulté des questions suivantes. '

'Si vous ne savez pas répondre à une question, ''vous avez la possibilité de \"passer\" cette question.'' Les questions passées seront considérées comme échouées et ne vous seront pas proposées à nouveau. '

' ''Il est important d'aller jusqu'au bout du test'', et donc de bien gérer votre temps. Une ''pénalité'' tenant compte du nombre de questions restantes sera appliquée." + + "paragraphs": { + "1": { + "text": "''Il s'agit d'un test adaptatif''. C’est-à-dire, que votre capacité à répondre correctement (ou non) aux questions détermine en temps réel la difficulté des questions suivantes." + }, + "2": { + "text": "Si vous ne savez pas répondre à une question, ''vous avez la possibilité de \"passer\" cette question''. '
'Les questions passées seront considérées comme échouées et ne vous seront pas proposées à nouveau." + }, + "3": { + "text": "''Il est important d'aller jusqu'au bout du test'', et donc de bien gérer votre temps. Une ''pénalité'' tenant compte du nombre de questions restantes sera appliquée." + } + }, + "question": "Comment fonctionne le test de certification ?" }, "2": { "title": "Comment se passe le test de certification ?", diff --git a/mon-pix/translations/es.json b/mon-pix/translations/es.json index 8c9d2584ad1..657837e420a 100644 --- a/mon-pix/translations/es.json +++ b/mon-pix/translations/es.json @@ -513,8 +513,19 @@ }, "steps": { "1": { - "text": "''¿Cómo funciona la prueba de certificación?'' '

' ''Se trata de una prueba adaptativa.'' En otras palabras, tu capacidad para responder correctamente (o no) a las preguntas determina la dificultad de las preguntas siguientes en tiempo real. '

'Si no puedes responder a una pregunta,''tienes la opción de \"saltarte\" esa pregunta.'' Las preguntas saltadas se considerarán fallidas y no se volverán a ofrecer. '

' ''Es importante completar la prueba'
', y por tanto gestionar bien el tiempo. Se aplicará una ''penalización'' teniendo en cuenta el número de preguntas restantes.", - "title": "Bienvenido a la certificación Pix" + "title": "Bienvenido a la certificación Pix", + "question" : "¿Cómo funciona la prueba de certificación?", + "paragraphs": { + "1": { + "text": "''Se trata de una prueba adaptativa''. En otras palabras, tu capacidad para responder correctamente (o no) a las preguntas determina la dificultad de las preguntas siguientes en tiempo real." + }, + "2": { + "text": "Si vous ne savez pas répondre à une question, ''vous avez la possibilité de \"passer\" cette question''. '
'Les questions passées seront considérées comme échouées et ne vous seront pas proposées à nouveau." + }, + "3": { + "text": "''Es importante completar la prueba'', y por tanto gestionar bien el tiempo. Se aplicará una ''penalización'' teniendo en cuenta el número de preguntas restantes." + } + } }, "2": { "title": "Comment se passe le test de certification ?", diff --git a/mon-pix/translations/fr.json b/mon-pix/translations/fr.json index 74be04a2f9a..4a584c84839 100644 --- a/mon-pix/translations/fr.json +++ b/mon-pix/translations/fr.json @@ -445,7 +445,18 @@ "steps": { "1": { "title": "Bienvenue à la certification Pix", - "text": "''Comment fonctionne le test de certification ?'' '

' ''Il s'agit d'un test adaptatif.'' C’est-à-dire, que votre capacité à répondre correctement (ou non) aux questions détermine en temps réel la difficulté des questions suivantes. '

'Si vous ne savez pas répondre à une question, ''vous avez la possibilité de \"passer\" cette question.'' Les questions passées seront considérées comme échouées et ne vous seront pas proposées à nouveau. '

' ''Il est important d'aller jusqu'au bout du test'', et donc de bien gérer votre temps. Une ''pénalité'' tenant compte du nombre de questions restantes sera appliquée." + "paragraphs": { + "1": { + "text": "''Il s'agit d'un test adaptatif''. C’est-à-dire, que votre capacité à répondre correctement (ou non) aux questions détermine en temps réel la difficulté des questions suivantes." + }, + "2": { + "text": "Si vous ne savez pas répondre à une question, ''vous avez la possibilité de \"passer\" cette question''. '
'Les questions passées seront considérées comme échouées et ne vous seront pas proposées à nouveau." + }, + "3": { + "text": "''Il est important d'aller jusqu'au bout du test'', et donc de bien gérer votre temps. Une ''pénalité'' tenant compte du nombre de questions restantes sera appliquée." + } + }, + "question": "Comment fonctionne le test de certification ?" }, "2": { "title": "Comment se passe le test de certification ?", diff --git a/mon-pix/translations/nl.json b/mon-pix/translations/nl.json index 3a86dd1bf41..7536e643ec2 100644 --- a/mon-pix/translations/nl.json +++ b/mon-pix/translations/nl.json @@ -513,8 +513,19 @@ }, "steps": { "1": { - "text": "'Hoe werkt de certificeringstest?'' '

' ''Dit is een adaptieve test.'' Met andere woorden, uw vermogen om vragen correct te beantwoorden (of niet) bepaalt de moeilijkheidsgraad van de volgende vragen in real time.

'Als u een vraag niet kunt beantwoorden, ''kunt u die vraag 'overslaan'.''Overgeslagen vragen worden als mislukt beschouwd en worden niet opnieuw aangeboden.

'''Het is belangrijk dat u de toets afmaakt'' en dus goed met uw tijd omgaat. Er wordt een ''boete'' toegepast waarbij rekening wordt gehouden met het aantal resterende vragen.", - "title": "Welkom bij Pix-certificering" + "title": "Welkom bij Pix-certificering", + "question" : "Hoe werkt de certificeringstest?", + "paragraphs": { + "1": { + "text": "''Dit is een adaptieve test''. Met andere woorden, uw vermogen om vragen correct te beantwoorden (of niet) bepaalt de moeilijkheidsgraad van de volgende vragen in real time." + }, + "2": { + "text": "Si vous ne savez pas répondre à une question, ''vous avez la possibilité de \"passer\" cette question''. '
'Les questions passées seront considérées comme échouées et ne vous seront pas proposées à nouveau." + }, + "3": { + "text": "''Het is belangrijk dat u de toets afmaakt'' en dus goed met uw tijd omgaat. Er wordt een ''boete'' toegepast waarbij rekening wordt gehouden met het aantal resterende vragen." + } + } }, "2": { "title": "Comment se passe le test de certification ?", From 0f4c2b2095f48a65535278a67c7344a4e2e793ec Mon Sep 17 00:00:00 2001 From: Andreia Pena Date: Thu, 13 Jun 2024 16:10:45 +0200 Subject: [PATCH 2/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(mon-pix):=20extract?= =?UTF-8?q?=20html=20form=20translation=20keys=20for=20step=20two?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certification-instructions/step-two.hbs | 44 ++++++++++++++++--- .../certification-instructions/step-two.js | 23 ---------- .../integration/components/steps_test.js | 3 +- mon-pix/translations/en.json | 19 ++++++-- mon-pix/translations/es.json | 18 ++++++-- mon-pix/translations/fr.json | 18 ++++++-- mon-pix/translations/nl.json | 18 ++++++-- 7 files changed, 99 insertions(+), 44 deletions(-) delete mode 100644 mon-pix/app/components/certification-instructions/step-two.js diff --git a/mon-pix/app/components/certification-instructions/step-two.hbs b/mon-pix/app/components/certification-instructions/step-two.hbs index e8922773b6b..7bc5ef272de 100644 --- a/mon-pix/app/components/certification-instructions/step-two.hbs +++ b/mon-pix/app/components/certification-instructions/step-two.hbs @@ -1,8 +1,38 @@ -
- -

{{this.information.imageText}}

-
-
-

{{this.information.text}}

-

{{this.information.secondText}}

+
+
+ +

+ + {{t "pages.certification-instructions.steps.2.legend.strong-text"}} + + + {{t "pages.certification-instructions.steps.2.legend.text"}} +

+
+ +
+

+ {{t "pages.certification-instructions.steps.2.paragraphs.1.question"}} +

+ +

+ {{t "pages.certification-instructions.steps.2.paragraphs.1.text" htmlSafe=true}} +

+ +

+ {{t "pages.certification-instructions.steps.2.paragraphs.2.question"}} +

+

+ {{t "pages.certification-instructions.steps.2.paragraphs.2.text" htmlSafe=true}} + +
+ + {{t "pages.certification-instructions.steps.2.paragraphs.2.light-text"}} + +

+
\ No newline at end of file diff --git a/mon-pix/app/components/certification-instructions/step-two.js b/mon-pix/app/components/certification-instructions/step-two.js deleted file mode 100644 index a941bc9400c..00000000000 --- a/mon-pix/app/components/certification-instructions/step-two.js +++ /dev/null @@ -1,23 +0,0 @@ -import { service } from '@ember/service'; -import Component from '@glimmer/component'; - -export default class StepTwo extends Component { - @service intl; - - get information() { - const translationKey = `pages.certification-instructions.steps.2`; - - return { - text: this.intl.t(`${translationKey}.text`, { - htmlSafe: true, - }), - secondText: this.intl.t(`${translationKey}.second-text`, { - htmlSafe: true, - }), - image: '/images/illustrations/certification-instructions-steps/clock.svg', - imageText: this.intl.t(`${translationKey}.image-text`, { - htmlSafe: true, - }), - }; - } -} diff --git a/mon-pix/tests/integration/components/steps_test.js b/mon-pix/tests/integration/components/steps_test.js index 7adab89bb3c..df13053318e 100644 --- a/mon-pix/tests/integration/components/steps_test.js +++ b/mon-pix/tests/integration/components/steps_test.js @@ -44,12 +44,13 @@ module('Integration | Component | steps', function (hooks) { assert .dom(screen.getByRole('heading', { name: 'Comment se passe le test de certification ?', level: 2 })) .exists(); + assert.dom(screen.getByRole('heading', { name: 'Le nombre de questions ?', level: 3 })).exists(); + assert.dom(screen.getByRole('heading', { name: 'La durée du test ?', level: 3 })).exists(); const images = screen.getAllByRole('img'); assert.strictEqual( images[0].getAttribute('src'), '/images/illustrations/certification-instructions-steps/clock.svg', ); - assert.dom(screen.getByText('Le nombre de question ?')).exists(); }); }); diff --git a/mon-pix/translations/en.json b/mon-pix/translations/en.json index 3c7446c4674..e4a13cb99ba 100644 --- a/mon-pix/translations/en.json +++ b/mon-pix/translations/en.json @@ -445,7 +445,6 @@ "steps": { "1": { "title": "Bienvenue à la certification Pix", - "paragraphs": { "1": { "text": "''Il s'agit d'un test adaptatif''. C’est-à-dire, que votre capacité à répondre correctement (ou non) aux questions détermine en temps réel la difficulté des questions suivantes." @@ -461,9 +460,21 @@ }, "2": { "title": "Comment se passe le test de certification ?", - "image-text": "''32 QUESTIONS'' '
' 1 H 45 min", - "second-text": "''La durée du test ?'' '
' Vous avez au maximum ''1h45*''. '
' ''*sauf éventuel temps majoré.''", - "text": "''Le nombre de question ?'' '
' La certification contient ''32 questions''." + "legend": { + "strong-text": "32 QUESTIONS", + "text": "1 H 45 min" + }, + "paragraphs": { + "1": { + "question": "Le nombre de questions ?", + "text": "La certification contient ''32 questions''." + }, + "2": { + "light-text": "*sauf éventuel temps majoré.", + "question": "La durée du test ?", + "text": "Vous avez au maximum ''1h45*''." + } + } }, "3": { "title": "Deux modes de questions", diff --git a/mon-pix/translations/es.json b/mon-pix/translations/es.json index 657837e420a..4995248251f 100644 --- a/mon-pix/translations/es.json +++ b/mon-pix/translations/es.json @@ -529,9 +529,21 @@ }, "2": { "title": "Comment se passe le test de certification ?", - "image-text": "''32 QUESTIONS'' '
' 1 H 45 min", - "second-text": "''La durée du test ?'' '
' Vous avez au maximum ''1h45*''. '
' ''*sauf éventuel temps majoré.''", - "text": "''Le nombre de question ?'' '
' La certification contient ''32 questions''." + "legend": { + "strong-text": "32 QUESTIONS", + "text": "1 H 45 min" + }, + "paragraphs": { + "1": { + "question": "Le nombre de questions ?", + "text": "La certification contient ''32 questions''." + }, + "2": { + "light-text": "*sauf éventuel temps majoré.", + "question": "La durée du test ?", + "text": "Vous avez au maximum ''1h45*''." + } + } }, "3": { "title": "Deux modes de questions", diff --git a/mon-pix/translations/fr.json b/mon-pix/translations/fr.json index 4a584c84839..7c9ec9b2a89 100644 --- a/mon-pix/translations/fr.json +++ b/mon-pix/translations/fr.json @@ -460,9 +460,21 @@ }, "2": { "title": "Comment se passe le test de certification ?", - "image-text": "''32 QUESTIONS'' '
' 1 H 45 min", - "second-text": "''La durée du test ?'' '
' Vous avez au maximum ''1h45*''. '
' ''*sauf éventuel temps majoré.''", - "text": "''Le nombre de question ?'' '
' La certification contient ''32 questions''." + "legend": { + "strong-text": "32 QUESTIONS", + "text": "1 H 45 min" + }, + "paragraphs": { + "1": { + "question": "Le nombre de questions ?", + "text": "La certification contient ''32 questions''." + }, + "2": { + "light-text": "*sauf éventuel temps majoré.", + "question": "La durée du test ?", + "text": "Vous avez au maximum ''1h45*''." + } + } }, "3": { "title": "Deux modes de questions", diff --git a/mon-pix/translations/nl.json b/mon-pix/translations/nl.json index 7536e643ec2..6165ded4945 100644 --- a/mon-pix/translations/nl.json +++ b/mon-pix/translations/nl.json @@ -529,9 +529,21 @@ }, "2": { "title": "Comment se passe le test de certification ?", - "image-text": "''32 QUESTIONS'' '
' 1 H 45 min", - "second-text": "''La durée du test ?'' '
' Vous avez au maximum ''1h45*''. '
' ''*sauf éventuel temps majoré.''", - "text": "''Le nombre de question ?'' '
' La certification contient ''32 questions''." + "legend": { + "strong-text": "32 QUESTIONS", + "text": "1 H 45 min" + }, + "paragraphs": { + "1": { + "question": "Le nombre de questions ?", + "text": "La certification contient ''32 questions''." + }, + "2": { + "light-text": "*sauf éventuel temps majoré.", + "question": "La durée du test ?", + "text": "Vous avez au maximum ''1h45*''." + } + } }, "3": { "title": "Deux modes de questions", From ced0ff8447735f0f0f72a1989fbdd99b6a20fe95 Mon Sep 17 00:00:00 2001 From: Andreia Pena Date: Thu, 13 Jun 2024 16:26:31 +0200 Subject: [PATCH 3/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(mon-pix):=20extract?= =?UTF-8?q?=20html=20form=20translation=20keys=20for=20step=20three?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certification-instructions/step-three.hbs | 35 ++++++++++++++----- .../certification-instructions/step-three.js | 23 ------------ .../integration/components/steps_test.js | 20 +++++------ mon-pix/translations/en.json | 16 +++++++-- mon-pix/translations/es.json | 16 +++++++-- mon-pix/translations/fr.json | 16 +++++++-- mon-pix/translations/nl.json | 16 +++++++-- 7 files changed, 92 insertions(+), 50 deletions(-) delete mode 100644 mon-pix/app/components/certification-instructions/step-three.js diff --git a/mon-pix/app/components/certification-instructions/step-three.hbs b/mon-pix/app/components/certification-instructions/step-three.hbs index 92f1928e9b0..3ac4c906dc4 100644 --- a/mon-pix/app/components/certification-instructions/step-three.hbs +++ b/mon-pix/app/components/certification-instructions/step-three.hbs @@ -1,10 +1,29 @@ -
- {{#each this.information.images as |image|}} - - {{/each}} -
+
+
+ {{t + {{t +
+
+
+ {{t "pages.certification-instructions.steps.3.paragraphs.1.title"}} +
+
+ {{t "pages.certification-instructions.steps.3.paragraphs.1.text" htmlSafe=true}} +
-
-

{{this.information.text}}

-

{{this.information.secondText}}

+
+ {{t "pages.certification-instructions.steps.3.paragraphs.2.title"}} +
+
+ {{t "pages.certification-instructions.steps.3.paragraphs.2.text" htmlSafe=true}} +
+
\ No newline at end of file diff --git a/mon-pix/app/components/certification-instructions/step-three.js b/mon-pix/app/components/certification-instructions/step-three.js deleted file mode 100644 index 96339ea0d1b..00000000000 --- a/mon-pix/app/components/certification-instructions/step-three.js +++ /dev/null @@ -1,23 +0,0 @@ -import { service } from '@ember/service'; -import Component from '@glimmer/component'; - -export default class StepThree extends Component { - @service intl; - - get information() { - const translationKey = `pages.certification-instructions.steps.3`; - - return { - text: this.intl.t(`${translationKey}.text`, { - htmlSafe: true, - }), - secondText: this.intl.t(`${translationKey}.second-text`, { - htmlSafe: true, - }), - images: [ - '/images/illustrations/certification-instructions-steps/regular-challenge-round.svg', - '/images/illustrations/certification-instructions-steps/focus-challenge-round.svg', - ], - }; - } -} diff --git a/mon-pix/tests/integration/components/steps_test.js b/mon-pix/tests/integration/components/steps_test.js index df13053318e..1401f6cc5ce 100644 --- a/mon-pix/tests/integration/components/steps_test.js +++ b/mon-pix/tests/integration/components/steps_test.js @@ -64,17 +64,15 @@ module('Integration | Component | steps', function (hooks) { // then assert.dom(screen.getByRole('heading', { name: 'Deux modes de questions', level: 2 })).exists(); - const images = screen.getAllByRole('img'); - assert.strictEqual( - images[0].getAttribute('src'), - '/images/illustrations/certification-instructions-steps/regular-challenge-round.svg', - ); - assert.strictEqual( - images[1].getAttribute('src'), - '/images/illustrations/certification-instructions-steps/focus-challenge-round.svg', - ); - assert.dom(screen.getByText('Le mode libre :')).exists(); - assert.dom(screen.getByText('Le mode focus :')).exists(); + const terms = screen.getAllByRole('term'); + assert.strictEqual(terms[0].textContent.trim(), 'Le mode libre :'); + assert.strictEqual(terms[1].textContent.trim(), 'Le mode focus :'); + assert + .dom(screen.getByRole('img', { name: 'Mode libre' })) + .hasAttribute('src', '/images/illustrations/certification-instructions-steps/regular-challenge-round.svg'); + assert + .dom(screen.getByRole('img', { name: 'Mode focus' })) + .hasAttribute('src', '/images/illustrations/certification-instructions-steps/focus-challenge-round.svg'); }); }); diff --git a/mon-pix/translations/en.json b/mon-pix/translations/en.json index e4a13cb99ba..c97f439028b 100644 --- a/mon-pix/translations/en.json +++ b/mon-pix/translations/en.json @@ -478,8 +478,20 @@ }, "3": { "title": "Deux modes de questions", - "second-text": "''Le mode focus :'' '
' Pour les questions en ''mode focus'', signalées par une icône jaune: vous ne serez pas autorisé à quitter la page et à faire des recherches.", - "text": "''Le mode libre :'' '
' Pour les questions en ''mode libre'' signalées par une icône verte: vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + "images": { + "focus-challenge": "Mode focus", + "regular-challenge": "Mode libre" + }, + "paragraphs": { + "1": { + "title": "Le mode libre :", + "text": "Pour les questions en ''mode libre'', signalées par une icône verte : vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + }, + "2": { + "title": "Le mode focus :", + "text": "Pour les questions en ''mode focus'', signalées par une icône jaune : vous ne serez pas autorisé à quitter la page et à faire des recherches." + } + } }, "4": { "title": "Que faire en cas de problème ?", diff --git a/mon-pix/translations/es.json b/mon-pix/translations/es.json index 4995248251f..e4c476b64e4 100644 --- a/mon-pix/translations/es.json +++ b/mon-pix/translations/es.json @@ -547,8 +547,20 @@ }, "3": { "title": "Deux modes de questions", - "second-text": "''Le mode focus :'' '
' Pour les questions en ''mode focus'', signalées par une icône jaune: vous ne serez pas autorisé à quitter la page et à faire des recherches.", - "text": "''Le mode libre :'' '
' Pour les questions en ''mode libre'' signalées par une icône verte: vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + "images": { + "regular-challenge": "Mode libre", + "focus-challenge": "Mode focus" + }, + "paragraphs": { + "1": { + "title": "Le mode libre :", + "text": "Pour les questions en ''mode libre'', signalées par une icône verte : vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + }, + "2": { + "title": "Le mode focus :", + "text": "Pour les questions en ''mode focus'', signalées par une icône jaune : vous ne serez pas autorisé à quitter la page et à faire des recherches." + } + } }, "4": { "title": "Que faire en cas de problème ?", diff --git a/mon-pix/translations/fr.json b/mon-pix/translations/fr.json index 7c9ec9b2a89..a148542c508 100644 --- a/mon-pix/translations/fr.json +++ b/mon-pix/translations/fr.json @@ -478,8 +478,20 @@ }, "3": { "title": "Deux modes de questions", - "second-text": "''Le mode focus :'' '
' Pour les questions en ''mode focus'', signalées par une icône jaune: vous ne serez pas autorisé à quitter la page et à faire des recherches.", - "text": "''Le mode libre :'' '
' Pour les questions en ''mode libre'' signalées par une icône verte: vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + "images": { + "focus-challenge": "Mode focus", + "regular-challenge": "Mode libre" + }, + "paragraphs": { + "1": { + "title": "Le mode libre :", + "text": "Pour les questions en ''mode libre'', signalées par une icône verte : vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + }, + "2": { + "title": "Le mode focus :", + "text": "Pour les questions en ''mode focus'', signalées par une icône jaune : vous ne serez pas autorisé à quitter la page et à faire des recherches." + } + } }, "4": { "title": "Que faire en cas de problème ?", diff --git a/mon-pix/translations/nl.json b/mon-pix/translations/nl.json index 6165ded4945..6c9663cad39 100644 --- a/mon-pix/translations/nl.json +++ b/mon-pix/translations/nl.json @@ -547,8 +547,20 @@ }, "3": { "title": "Deux modes de questions", - "second-text": "''Le mode focus :'' '
' Pour les questions en ''mode focus'', signalées par une icône jaune: vous ne serez pas autorisé à quitter la page et à faire des recherches.", - "text": "''Le mode libre :'' '
' Pour les questions en ''mode libre'' signalées par une icône verte: vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + "images": { + "regular-challenge": "Mode libre", + "focus-challenge": "Mode focus" + }, + "paragraphs": { + "1": { + "title": "Le mode libre :", + "text": "Pour les questions en ''mode libre'', signalées par une icône verte : vous aurez le droit d’effectuer des recherches sur le web et d’utiliser l’environnement numérique à disposition." + }, + "2": { + "title": "Le mode focus :", + "text": "Pour les questions en ''mode focus'', signalées par une icône jaune : vous ne serez pas autorisé à quitter la page et à faire des recherches." + } + } }, "4": { "title": "Que faire en cas de problème ?", From 3e1fe64657c0a61d9c50670f6d850c2bd6800176 Mon Sep 17 00:00:00 2001 From: Andreia Pena Date: Thu, 13 Jun 2024 16:39:44 +0200 Subject: [PATCH 4/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(mon-pix):=20extract?= =?UTF-8?q?=20html=20form=20translation=20keys=20for=20step=20four?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certification-instructions/step-four.hbs | 6 +++--- .../certification-instructions/step-four.js | 12 ------------ mon-pix/translations/en.json | 4 +++- mon-pix/translations/es.json | 4 +++- mon-pix/translations/fr.json | 4 +++- mon-pix/translations/nl.json | 4 +++- 6 files changed, 15 insertions(+), 19 deletions(-) delete mode 100644 mon-pix/app/components/certification-instructions/step-four.js diff --git a/mon-pix/app/components/certification-instructions/step-four.hbs b/mon-pix/app/components/certification-instructions/step-four.hbs index 047ae4b9fcf..cbc59e57712 100644 --- a/mon-pix/app/components/certification-instructions/step-four.hbs +++ b/mon-pix/app/components/certification-instructions/step-four.hbs @@ -1,3 +1,3 @@ -
-

{{this.text}}

-
\ No newline at end of file +

+ {{t "pages.certification-instructions.steps.4.paragraph.text" htmlSafe=true}} +

\ No newline at end of file diff --git a/mon-pix/app/components/certification-instructions/step-four.js b/mon-pix/app/components/certification-instructions/step-four.js deleted file mode 100644 index 1d25f000a20..00000000000 --- a/mon-pix/app/components/certification-instructions/step-four.js +++ /dev/null @@ -1,12 +0,0 @@ -import { service } from '@ember/service'; -import Component from '@glimmer/component'; - -export default class StepFour extends Component { - @service intl; - - get text() { - return this.intl.t(`pages.certification-instructions.steps.4.text`, { - htmlSafe: true, - }); - } -} diff --git a/mon-pix/translations/en.json b/mon-pix/translations/en.json index c97f439028b..cb3b6d49685 100644 --- a/mon-pix/translations/en.json +++ b/mon-pix/translations/en.json @@ -495,7 +495,9 @@ }, "4": { "title": "Que faire en cas de problème ?", - "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '
' cliquez sur \"''Signaler un problème avec la question''\", puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + "paragraph": { + "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '

' cliquez sur ''\"Signaler un problème avec la question\"'', puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + } }, "5": { "title": "Règles à respecter", diff --git a/mon-pix/translations/es.json b/mon-pix/translations/es.json index e4c476b64e4..348619d4e46 100644 --- a/mon-pix/translations/es.json +++ b/mon-pix/translations/es.json @@ -564,7 +564,9 @@ }, "4": { "title": "Que faire en cas de problème ?", - "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '
' cliquez sur \"''Signaler un problème avec la question''\", puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + "paragraph": { + "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '

' cliquez sur ''\"Signaler un problème avec la question\"'', puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + } }, "5": { "title": "Règles à respecter", diff --git a/mon-pix/translations/fr.json b/mon-pix/translations/fr.json index a148542c508..e1899ca8109 100644 --- a/mon-pix/translations/fr.json +++ b/mon-pix/translations/fr.json @@ -495,7 +495,9 @@ }, "4": { "title": "Que faire en cas de problème ?", - "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '

' cliquez sur \"''Signaler un problème avec la question''\", puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + "paragraph": { + "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '

' cliquez sur ''\"Signaler un problème avec la question\"'', puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + } }, "5": { "title": "Règles à respecter", diff --git a/mon-pix/translations/nl.json b/mon-pix/translations/nl.json index 6c9663cad39..614544c6e2e 100644 --- a/mon-pix/translations/nl.json +++ b/mon-pix/translations/nl.json @@ -564,7 +564,9 @@ }, "4": { "title": "Que faire en cas de problème ?", - "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '

' cliquez sur \"''Signaler un problème avec la question''\", puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + "paragraph": { + "text": "''En cas de problème technique'' (par exemple, l'image refuse de s'afficher), suivez ces étapes : '

' cliquez sur ''\"Signaler un problème avec la question\"'', puis sur \"Oui, je suis sûr(e)\" et informez votre surveillant." + } }, "5": { "title": "Règles à respecter", From cafd9fd77c9c8687c1d515e04711f9f24917f3e1 Mon Sep 17 00:00:00 2001 From: Andreia Pena Date: Mon, 17 Jun 2024 14:58:47 +0200 Subject: [PATCH 5/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(mon-pix):=20use=20str?= =?UTF-8?q?ong=20html=20for=20important=20text=20in=20step=20five?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certification-instructions/step-five.hbs | 36 +++++-------------- .../integration/components/steps_test.js | 4 +-- mon-pix/translations/en.json | 32 ++++------------- mon-pix/translations/es.json | 34 +++++------------- mon-pix/translations/fr.json | 32 ++++------------- mon-pix/translations/nl.json | 34 +++++------------- 6 files changed, 41 insertions(+), 131 deletions(-) diff --git a/mon-pix/app/components/certification-instructions/step-five.hbs b/mon-pix/app/components/certification-instructions/step-five.hbs index 577576d7a84..673458aa541 100644 --- a/mon-pix/app/components/certification-instructions/step-five.hbs +++ b/mon-pix/app/components/certification-instructions/step-five.hbs @@ -1,41 +1,23 @@ -
- {{t "pages.certification-instructions.steps.5.text"}} -
    +
    + {{t "pages.certification-instructions.steps.5.text"}} +
    • - - {{t "pages.certification-instructions.steps.5.list.no-communication.strong-text"}} - - {{t "pages.certification-instructions.steps.5.list.no-communication.text"}} + {{t "pages.certification-instructions.steps.5.list.no-communication" htmlSafe=true}}
    • - - {{t "pages.certification-instructions.steps.5.list.no-connected-device.strong-text"}} - - {{t "pages.certification-instructions.steps.5.list.no-connected-device.text"}} + {{t "pages.certification-instructions.steps.5.list.no-connected-device" htmlSafe=true}}
    • - - {{t "pages.certification-instructions.steps.5.list.no-cheat-sheet.strong-text"}} - - {{t "pages.certification-instructions.steps.5.list.no-cheat-sheet.text"}} + {{t "pages.certification-instructions.steps.5.list.no-cheat-sheet" htmlSafe=true}}
    • - - {{t "pages.certification-instructions.steps.5.list.no-artificial-intelligence.strong-text"}} - - {{t "pages.certification-instructions.steps.5.list.no-artificial-intelligence.text"}} + {{t "pages.certification-instructions.steps.5.list.no-artificial-intelligence" htmlSafe=true}}
    • - - {{t "pages.certification-instructions.steps.5.list.no-forum.strong-text"}} - - {{t "pages.certification-instructions.steps.5.list.no-forum.text"}} + {{t "pages.certification-instructions.steps.5.list.no-forum" htmlSafe=true}}
    • - - {{t "pages.certification-instructions.steps.5.list.other.strong-text"}} - - {{t "pages.certification-instructions.steps.5.list.other.text"}} + {{t "pages.certification-instructions.steps.5.list.other" htmlSafe=true}}
    diff --git a/mon-pix/tests/integration/components/steps_test.js b/mon-pix/tests/integration/components/steps_test.js index 1401f6cc5ce..0c312f8c289 100644 --- a/mon-pix/tests/integration/components/steps_test.js +++ b/mon-pix/tests/integration/components/steps_test.js @@ -104,7 +104,7 @@ module('Integration | Component | steps', function (hooks) { assert .dom( screen.getByRole('checkbox', { - name: 'En cochant cette case, je reconnais avoir pris connaissances de ces règles et je m’engage à les respecter.', + name: 'En cochant cette case, je reconnais avoir pris connaissance de ces règles et je m’engage à les respecter.', }), ) .exists(); @@ -143,7 +143,7 @@ module('Integration | Component | steps', function (hooks) { // when await click( screen.getByRole('checkbox', { - name: 'En cochant cette case, je reconnais avoir pris connaissances de ces règles et je m’engage à les respecter.', + name: 'En cochant cette case, je reconnais avoir pris connaissance de ces règles et je m’engage à les respecter.', }), ); diff --git a/mon-pix/translations/en.json b/mon-pix/translations/en.json index cb3b6d49685..3981035721f 100644 --- a/mon-pix/translations/en.json +++ b/mon-pix/translations/en.json @@ -501,32 +501,14 @@ }, "5": { "title": "Règles à respecter", - "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissances de ces règles et je m’engage à les respecter.", + "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissance de ces règles et je m’engage à les respecter.", "list": { - "no-artificial-intelligence": { - "strong-text": "Avoir recours à un système d’intelligence artificielle", - "text": " ou un chatbot" - }, - "no-cheat-sheet": { - "strong-text": "Utiliser des antisèches", - "text": "(physiques ou électroniques), des ressources de spoil ou des notes personnelles" - }, - "no-communication": { - "strong-text": "Communiquer avec quelqu’un d’autre", - "text": ", dans la salle ou à l’extérieur, par voie physique ou électronique" - }, - "no-connected-device": { - "strong-text": "Utiliser un téléphone mobile ou tout appareil connecté", - "text": "(autre que l’ordinateur mobilisé dans le cadre de la certification)" - }, - "no-forum": { - "strong-text": "Consulter un forum d’entraide", - "text": " apportant directement la réponse à une épreuve" - }, - "other": { - "strong-text": "Mobiliser tout autre moyen délivrant directement la réponse", - "text": ", sans avoir effectué le travail requis par la consigne." - } + "no-artificial-intelligence": "''Avoir recours à un système d’intelligence artificielle'' ou un chatbot", + "no-cheat-sheet": "''Utiliser des antisèches'' (physiques ou électroniques), des ressources de spoil ou des notes personnelles", + "no-communication": "''Communiquer avec quelqu’un d’autre'', dans la salle ou à l’extérieur, par voie physique ou électronique", + "no-connected-device": "''Utiliser un téléphone mobile ou tout appareil connecté'' (autre que l’ordinateur mobilisé dans le cadre de la certification)", + "no-forum": "''Consulter un forum d’entraide'' apportant directement la réponse à une épreuve", + "other": "''Mobiliser tout autre moyen délivrant directement la réponse'', sans avoir effectué le travail requis par la consigne." }, "text": "En certification, il est interdit de :" } diff --git a/mon-pix/translations/es.json b/mon-pix/translations/es.json index 348619d4e46..76a65cc9fd5 100644 --- a/mon-pix/translations/es.json +++ b/mon-pix/translations/es.json @@ -570,34 +570,16 @@ }, "5": { "title": "Règles à respecter", - "text": "En certification, il est interdit de :", + "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissance de ces règles et je m’engage à les respecter.", "list": { - "no-communication": { - "strong-text": "Communiquer avec quelqu’un d’autre", - "text": ", dans la salle ou à l’extérieur, par voie physique ou électronique" - }, - "no-connected-device": { - "strong-text": "Utiliser un téléphone mobile ou tout appareil connecté", - "text": "(autre que l’ordinateur mobilisé dans le cadre de la certification)" - }, - "no-cheat-sheet": { - "strong-text": "Utiliser des antisèches", - "text": "(physiques ou électroniques), des ressources de spoil ou des notes personnelles" - }, - "no-artificial-intelligence": { - "strong-text": "Avoir recours à un système d’intelligence artificielle", - "text": " ou un chatbot" - }, - "no-forum": { - "strong-text": "Consulter un forum d’entraide", - "text": " apportant directement la réponse à une épreuve" - }, - "other": { - "strong-text": "Mobiliser tout autre moyen délivrant directement la réponse", - "text": ", sans avoir effectué le travail requis par la consigne." - } + "no-artificial-intelligence": "''Avoir recours à un système d’intelligence artificielle'' ou un chatbot", + "no-cheat-sheet": "''Utiliser des antisèches'' (physiques ou électroniques), des ressources de spoil ou des notes personnelles", + "no-communication": "''Communiquer avec quelqu’un d’autre'', dans la salle ou à l’extérieur, par voie physique ou électronique", + "no-connected-device": "''Utiliser un téléphone mobile ou tout appareil connecté'' (autre que l’ordinateur mobilisé dans le cadre de la certification)", + "no-forum": "''Consulter un forum d’entraide'' apportant directement la réponse à une épreuve", + "other": "''Mobiliser tout autre moyen délivrant directement la réponse'', sans avoir effectué le travail requis par la consigne." }, - "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissances de ces règles et je m’engage à les respecter." + "text": "En certification, il est interdit de :" } } }, diff --git a/mon-pix/translations/fr.json b/mon-pix/translations/fr.json index e1899ca8109..d95a4c17230 100644 --- a/mon-pix/translations/fr.json +++ b/mon-pix/translations/fr.json @@ -501,32 +501,14 @@ }, "5": { "title": "Règles à respecter", - "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissances de ces règles et je m’engage à les respecter.", + "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissance de ces règles et je m’engage à les respecter.", "list": { - "no-artificial-intelligence": { - "strong-text": "Avoir recours à un système d’intelligence artificielle", - "text": " ou un chatbot" - }, - "no-cheat-sheet": { - "strong-text": "Utiliser des antisèches", - "text": "(physiques ou électroniques), des ressources de spoil ou des notes personnelles" - }, - "no-communication": { - "strong-text": "Communiquer avec quelqu’un d’autre", - "text": ", dans la salle ou à l’extérieur, par voie physique ou électronique" - }, - "no-connected-device": { - "strong-text": "Utiliser un téléphone mobile ou tout appareil connecté", - "text": "(autre que l’ordinateur mobilisé dans le cadre de la certification)" - }, - "no-forum": { - "strong-text": "Consulter un forum d’entraide", - "text": " apportant directement la réponse à une épreuve" - }, - "other": { - "strong-text": "Mobiliser tout autre moyen délivrant directement la réponse", - "text": ", sans avoir effectué le travail requis par la consigne." - } + "no-artificial-intelligence": "''Avoir recours à un système d’intelligence artificielle'' ou un chatbot", + "no-cheat-sheet": "''Utiliser des antisèches'' (physiques ou électroniques), des ressources de spoil ou des notes personnelles", + "no-communication": "''Communiquer avec quelqu’un d’autre'', dans la salle ou à l’extérieur, par voie physique ou électronique", + "no-connected-device": "''Utiliser un téléphone mobile ou tout appareil connecté'' (autre que l’ordinateur mobilisé dans le cadre de la certification)", + "no-forum": "''Consulter un forum d’entraide'' apportant directement la réponse à une épreuve", + "other": "''Mobiliser tout autre moyen délivrant directement la réponse'', sans avoir effectué le travail requis par la consigne." }, "text": "En certification, il est interdit de :" } diff --git a/mon-pix/translations/nl.json b/mon-pix/translations/nl.json index 614544c6e2e..bd029dc791b 100644 --- a/mon-pix/translations/nl.json +++ b/mon-pix/translations/nl.json @@ -570,34 +570,16 @@ }, "5": { "title": "Règles à respecter", - "text": "En certification, il est interdit de :", + "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissance de ces règles et je m’engage à les respecter.", "list": { - "no-communication": { - "strong-text": "Communiquer avec quelqu’un d’autre", - "text": ", dans la salle ou à l’extérieur, par voie physique ou électronique" - }, - "no-connected-device": { - "strong-text": "Utiliser un téléphone mobile ou tout appareil connecté", - "text": "(autre que l’ordinateur mobilisé dans le cadre de la certification)" - }, - "no-cheat-sheet": { - "strong-text": "Utiliser des antisèches", - "text": "(physiques ou électroniques), des ressources de spoil ou des notes personnelles" - }, - "no-artificial-intelligence": { - "strong-text": "Avoir recours à un système d’intelligence artificielle", - "text": " ou un chatbot" - }, - "no-forum": { - "strong-text": "Consulter un forum d’entraide", - "text": " apportant directement la réponse à une épreuve" - }, - "other": { - "strong-text": "Mobiliser tout autre moyen délivrant directement la réponse", - "text": ", sans avoir effectué le travail requis par la consigne." - } + "no-artificial-intelligence": "''Avoir recours à un système d’intelligence artificielle'' ou un chatbot", + "no-cheat-sheet": "''Utiliser des antisèches'' (physiques ou électroniques), des ressources de spoil ou des notes personnelles", + "no-communication": "''Communiquer avec quelqu’un d’autre'', dans la salle ou à l’extérieur, par voie physique ou électronique", + "no-connected-device": "''Utiliser un téléphone mobile ou tout appareil connecté'' (autre que l’ordinateur mobilisé dans le cadre de la certification)", + "no-forum": "''Consulter un forum d’entraide'' apportant directement la réponse à une épreuve", + "other": "''Mobiliser tout autre moyen délivrant directement la réponse'', sans avoir effectué le travail requis par la consigne." }, - "checkbox-label": "En cochant cette case, je reconnais avoir pris connaissances de ces règles et je m’engage à les respecter." + "text": "En certification, il est interdit de :" } } }, From f5bda3461fe48e8edd691208df1379824b9a9a16 Mon Sep 17 00:00:00 2001 From: Andreia Pena Date: Wed, 19 Jun 2024 11:52:57 +0200 Subject: [PATCH 6/6] (mon-pix): BEM refacto --- .../certification-instructions/steps.hbs | 42 +++-- .../pages/_certification-instructions.scss | 169 +++++++++++------- .../certifications/information.hbs | 10 +- 3 files changed, 127 insertions(+), 94 deletions(-) diff --git a/mon-pix/app/components/certification-instructions/steps.hbs b/mon-pix/app/components/certification-instructions/steps.hbs index 53bc05e00d3..c9906e3f283 100644 --- a/mon-pix/app/components/certification-instructions/steps.hbs +++ b/mon-pix/app/components/certification-instructions/steps.hbs @@ -1,34 +1,32 @@ -

    {{this.title}}

    +

    {{this.title}}

    -
    - {{#if (eq this.pageId 1)}} - - {{/if}} - {{#if (eq this.pageId 2)}} - - {{/if}} - {{#if (eq this.pageId 3)}} - - {{/if}} - {{#if (eq this.pageId 4)}} - - {{/if}} - {{#if (eq this.pageId 5)}} - - {{/if}} -
    +{{#if (eq this.pageId 1)}} + +{{/if}} +{{#if (eq this.pageId 2)}} + +{{/if}} +{{#if (eq this.pageId 3)}} + +{{/if}} +{{#if (eq this.pageId 4)}} + +{{/if}} +{{#if (eq this.pageId 5)}} + +{{/if}} -