Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH] Améliorer la structure des écrans d'instruction (PIX-12902). #9264

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

AndreiaPena
Copy link
Member

@AndreiaPena AndreiaPena commented Jun 13, 2024

🦄 Problème

Nous souhaitions au début de l'implémentation faire un affichage dynamique et pour se faire, nous avions introduit l'essentiel des balises span (servant à rendre certaines infos en gras) dans les clés de traduction.

Cette décision a été remise en cause et finalement nous sommes parti pour créer plusieurs composants.
Les clés traductions peuvent ainsi se délester des balises html (ce qu'on doit un maximum éviter de faire, les clés ne devraient servir qu'à la traduction, pas à nos besoin structurels)

🤖 Proposition

Extraire les balises html des clés de traduction pour les écrans d'instruction (page 1 à 4 )

💯 Pour tester

Checker la non régression des écrans

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@AndreiaPena AndreiaPena force-pushed the pix-12902-extract-html-from-translation-keys-in-instructions-page branch 3 times, most recently from e4762be to c74157b Compare June 13, 2024 15:54
@matthieu-octo
Copy link
Contributor

Test fonctionnel OK ✅

@AndreiaPena AndreiaPena force-pushed the pix-12902-extract-html-from-translation-keys-in-instructions-page branch from c74157b to 4af0a54 Compare June 17, 2024 08:23
@P-Jeremy P-Jeremy force-pushed the pix-12902-extract-html-from-translation-keys-in-instructions-page branch from 4af0a54 to 3c406b9 Compare June 17, 2024 09:20
@AndreiaPena AndreiaPena force-pushed the pix-12902-extract-html-from-translation-keys-in-instructions-page branch 4 times, most recently from 93426e0 to 635d324 Compare June 17, 2024 14:59
mon-pix/translations/en.json Outdated Show resolved Hide resolved
Comment on lines 25 to 33
<strong>
{{t "pages.certification-instructions.steps.1.paragraphs.3.strong-text1"}}
</strong>
{{t "pages.certification-instructions.steps.1.paragraphs.3.text1"}}

<strong>
{{t "pages.certification-instructions.steps.1.paragraphs.3.strong-text2"}}
</strong>
{{t "pages.certification-instructions.steps.1.paragraphs.3.text2"}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plutôt que d'enchaîner les clés text1, strong-text1 etc, je me demande si on ne pourrait pas plutôt tout mettre dans un array, pour faire un join dans le js ou le hbs.

Et donc au lieu de :

"3": {
  "strong-text1": "Il est important d'aller jusqu'au bout du test,",
  "strong-text2": "pénalité",
  "text1": "et donc de bien gérer votre temps. Une",
  "text2": "tenant compte du nombre de questions restantes sera appliquée."
}

On aurait :

"3": {
    [
        "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."
    ]
}

Mais je suis en train de chercher partout dans la doc Ember, je ne trouve pas de solution correcte pour implémenter ça dans le js/hbs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

est-ce que Phrase sait gérer ca?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aucune idée 😅

@AndreiaPena AndreiaPena force-pushed the pix-12902-extract-html-from-translation-keys-in-instructions-page branch 2 times, most recently from 4254af9 to da4819e Compare June 19, 2024 09:54
@AndreiaPena AndreiaPena force-pushed the pix-12902-extract-html-from-translation-keys-in-instructions-page branch from da4819e to 7a474a5 Compare June 19, 2024 10:00
@AndreiaPena AndreiaPena changed the title [TECH] Extraire les balises html des clés de traduction pour les écrans d'instruction (PIX-12902). [TECH] Améliorer la structure et des écrans d'instruction (PIX-12902). Jun 19, 2024
@AndreiaPena AndreiaPena changed the title [TECH] Améliorer la structure et des écrans d'instruction (PIX-12902). [TECH] Améliorer la structure des écrans d'instruction (PIX-12902). Jun 19, 2024
@AndreiaPena AndreiaPena force-pushed the pix-12902-extract-html-from-translation-keys-in-instructions-page branch from 7a474a5 to 09d36a1 Compare June 19, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants