Skip to content

Commit

Permalink
fix(modaltos): fix translation presentation
Browse files Browse the repository at this point in the history
The Modal Terms of Service was presenting the ` ` when using
the pt_pt or pt locales.

fccn/nau-technical#367
  • Loading branch information
igobranco committed Dec 16, 2024
1 parent 596221e commit 5d7e603
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
11 changes: 11 additions & 0 deletions src/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,14 @@ $footer-links-navigation-color: $footer-text;
}
}
}

.modal-terms-of-service {
.pgn__form-label{
.standalone-link {
&:before {
// Add a white space before MODAL TOS checkbox links
content: "\00a0";
}
}
}
}
7 changes: 4 additions & 3 deletions src/components/modal-tos/ModalToS.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const ModalToS = () => {
onClose={close}
hasCloseButton={false}
size="lg"
className="modal-terms-of-service"
>
{title[lang] && (
<ModalDialog.Header>
Expand All @@ -114,7 +115,7 @@ const ModalToS = () => {
<FormattedMessage
id="modalToS.dataAuthorization.checkbox.label"
description="The label for the data authorization checkbox inside the TOS modal."
defaultMessage="I have read and understood the&nbsp;<a>Privacy Policy</a>"
defaultMessage="I have read and understood the <a>Privacy Policy</a>"
values={{
a: chunks => createTOSLink(chunks, PRIVACY_POLICY_URL),
}}
Expand All @@ -127,7 +128,7 @@ const ModalToS = () => {
<FormattedMessage
id="modalToS.termsOfService.checkbox.label"
description="The label for the terms of service checkbox inside the TOS modal."
defaultMessage="I have read, understood and accept the&nbsp;<a>Terms and Conditions</a>"
defaultMessage="I have read, understood and accept the <a>Terms and Conditions</a>"
values={{
a: chunks => createTOSLink(chunks, TERMS_OF_SERVICE_URL),
}}
Expand All @@ -140,7 +141,7 @@ const ModalToS = () => {
<FormattedMessage
id="modalToS.honorCode.checkbox.label"
description="The label for the honor code checkbox inside the TOS modal."
defaultMessage="I have read and understood the&nbsp;<a>Honor Code</a>"
defaultMessage="I have read and understood the <a>Honor Code</a>"
values={{
a: chunks => createTOSLink(chunks, TOS_AND_HONOR_CODE),
}}
Expand Down
8 changes: 4 additions & 4 deletions src/i18n/messages/pt_PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"footer.languageForm.select.label": "Escolha a língua",
"footer.languageForm.submit.label": "Aplicar",
"footer.copyright.message": "Todos os direitos reservados.",
"modalToS.dataAuthorization.checkbox.label": "Li e compreendi a&nbsp;<a>Política de Privacidade</a>",
"modalToS.termsOfService.checkbox.label": "Li, compreendi e aceito os&nbsp;<a>Termos e Condições</a>",
"modalToS.honorCode.checkbox.label": "Li e compreendi o&nbsp;<a>Código de Honra</a>",
"modalToS.dataAuthorization.checkbox.label": "Li e compreendi a <a>Política de Privacidade</a>",
"modalToS.termsOfService.checkbox.label": "Li, compreendi e aceito os <a>Termos e Condições</a>",
"modalToS.honorCode.checkbox.label": "Li e compreendi o <a>Código de Honra</a>",
"modalToS.acceptance.button": "Aceito os novos termos de serviço"
}
}

0 comments on commit 5d7e603

Please sign in to comment.