Skip to content

add definition lists for income terms #238

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

Merged
merged 1 commit into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions frontend/app/.server/locales/estimator-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
"single": "To estimate your benefits, we will need the following information from your {{year}} tax return:"
},
"info": {
"CDB": "<strong>CDB:</strong> Canada Disability Benefit",
"CDB": "<dt>CDB:</dt><dd>Canada Disability Benefit</dd>",
"claimed-income": "Income claimed by you (line 11700 and line 12500 of your tax return). If field is left blank, we will assume it is zero.",
"claimed-repayment": "Repayment claimed by you (line 21300 and line 23200 of your tax return). If field is left blank, we will assume it is zero.",
"net-income": "Line 23600 on your tax return. If your net income is negative, enter '0'",
"partner-claimed-income": "Income claimed by your spouse/partner (line 11700 and line 12500 of their tax return). If field is left blank, we will assume it is zero.",
"partner-claimed-repayment": "Repayment claimed by your spouse/partner (line 21300 and line 23200 of their tax return). If field is left blank, we will assume it is zero.",
"partner-net-income": "Line 23600 on your spouse/partners tax return. If your the net income is negative, enter '0'",
"RDSP": "<strong>RDSP:</strong> Registered Disability Savings Plan",
"UCCB": "<strong>UCCB:</strong> Universal Child Care Benefit",
"RDSP": "<dt>RDSP:</dt><dd>Registered Disability Savings Plan</dd>",
"UCCB": "<dt>UCCB:</dt><dd>Universal Child Care Benefit</dd>",
"working-income": {
"items": [
"Employment income (line 10100)",
Expand Down Expand Up @@ -116,7 +116,6 @@
"results": {
"contact": " For a more accurate assessment of your estimated benefits amount, please <cdbContactLink>contact us</cdbContactLink>.",
"description": "This estimator provides estimated benefit amounts for payments made between {{paymentPeriodStart}} and {{paymentPeriodEnd}}. Future benefit amounts may be higher. The results are not financial advice and are subject to change.",
"description": "This estimator provides estimated benefit amounts for payments made between July 2025 and June 2026. Future benefit amounts may be higher. The results are not financial advice and are subject to change.",
"header": "About the results"
}
},
Expand Down
6 changes: 3 additions & 3 deletions frontend/app/.server/locales/estimator-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
"single": "Pour estimer vos prestations, nous aurons besoin des renseignements suivants de votre déclaration de revenus de {{year}}. "
},
"info": {
"CDB": "<strong>PCPH\u00A0:</strong> Prestation canadienne des personnes handicapées",
"CDB": "<dt>PCPH\u00A0:</dt><dd>Prestation canadienne des personnes handicapées</dd>",
"claimed-income": "Revenu que vous avez demandé (ligne 11700 et ligne 12500 de votre déclaration de revenus). Si le champ est laisse vide, nous supposerons qu'il est égal à zéro.",
"claimed-repayment": "Remboursement que vous avez demandé (ligne 21300 et ligne 23200 de votre déclaration de revenus). Si le champ est laisse vide, nous supposerons qu'il est égal à zéro.",
"net-income": "Ligne 23600 de votre déclaration. Si votre revenu net est négatif, entrez '0'",
"partner-claimed-income": "Revenu que votre conjoint a demandé (ligne 11700 et ligne 12500 de leur déclaration de revenus). Si le champ est laisse vide, nous supposerons qu'il est égal à zéro.",
"partner-claimed-repayment": "Remboursement que votre conjoint a demandé (ligne 21300 et ligne 23200 de leur déclaration de revenus). Si le champ est laisse vide, nous supposerons qu'il est égal à zéro.",
"partner-net-income": "Ligne 23600 de la déclaration de votre conjoint.",
"RDSP": "<strong>REEI\u00A0:</strong> Revenus d'un régime enregistré d'épargne-invalidité",
"UCCB": "<strong>PUGE\u00A0:</strong> Prestation universelle pour la garde d'enfants",
"RDSP": "<dt>REEI\u00A0:</dt><dd>Revenus d'un régime enregistré d'épargne-invalidité</dd>",
"UCCB": "<dt>PUGE\u00A0:</dt><dd>Prestation universelle pour la garde d'enfants</dd>",
"working-income": {
"items": [
"Revenus d'emploi (linge 10100)",
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/i18n-config.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function initI18next(namespace: Namespace): Promise<i18n> {
backend: { loadPath: `/api/translations?ns={{ns}}&lng={{lng}}&v=${BUILD_REVISION}` },
interpolation: { escapeValue: false },
react: {
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p', 'b', 'em'],
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p', 'b', 'em', 'dl', 'dt', 'dd'],
},
});

Expand Down
2 changes: 1 addition & 1 deletion frontend/app/i18n-config.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export async function initI18next(language?: Language): Promise<i18n> {
throw new AppError(`Missing translation key: ${key}`, ErrorCodes.MISSING_TRANSLATION_KEY);
},
react: {
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p', 'b', 'em'],
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p', 'b', 'em', 'dl', 'dt', 'dd'],
},
});

Expand Down
57 changes: 21 additions & 36 deletions frontend/app/routes/estimator/step-income.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,8 @@ export default function StepIncome({ actionData, loaderData, matches, params }:
<div className="my-4 space-y-4">
<Collapsible summary={<>{t('estimator:income.fields.claimed-income.info-label')}</>}>
<div className="space-y-4">
<p>
<Trans i18nKey={'estimator:income.info.UCCB'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.RDSP'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.CDB'} />
</p>
<DefinitionList />

<p>
<Trans i18nKey={'estimator:income.info.claimed-income'} />
</p>
Expand All @@ -336,15 +329,7 @@ export default function StepIncome({ actionData, loaderData, matches, params }:
<div className="my-4 space-y-4">
<Collapsible summary={<>{t('estimator:income.fields.claimed-repayment.info-label')}</>}>
<div className="space-y-4">
<p>
<Trans i18nKey={'estimator:income.info.UCCB'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.RDSP'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.CDB'} />
</p>
<DefinitionList />
<p>
<Trans i18nKey={'estimator:income.info.claimed-repayment'} />
</p>
Expand All @@ -368,15 +353,7 @@ export default function StepIncome({ actionData, loaderData, matches, params }:
<div className="my-4 space-y-4">
<Collapsible summary={<>{t('estimator:income.fields.partner.claimed-income.info-label')}</>}>
<div className="space-y-4">
<p>
<Trans i18nKey={'estimator:income.info.UCCB'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.RDSP'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.CDB'} />
</p>
<DefinitionList />
<p>
<Trans i18nKey={'estimator:income.info.partner-claimed-income'} />
</p>
Expand All @@ -401,15 +378,7 @@ export default function StepIncome({ actionData, loaderData, matches, params }:
<div className="my-4 space-y-4">
<Collapsible summary={<>{t('estimator:income.fields.partner.claimed-repayment.info-label')}</>}>
<div className="space-y-4">
<p>
<Trans i18nKey={'estimator:income.info.UCCB'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.RDSP'} />
</p>
<p>
<Trans i18nKey={'estimator:income.info.CDB'} />
</p>
<DefinitionList />
<p>
<Trans i18nKey={'estimator:income.info.partner-claimed-repayment'} />
</p>
Expand Down Expand Up @@ -452,4 +421,20 @@ export default function StepIncome({ actionData, loaderData, matches, params }:
</FetcherErrorSummary>
</div>
);

function DefinitionList() {
return (
<dl className="mt-2 space-y-2 [&>div>dd]:ml-2 [&>div>dd]:inline [&>div>dt]:inline [&>div>dt]:font-bold">
<div>
<Trans i18nKey={'estimator:income.info.UCCB'} />
</div>
<div>
<Trans i18nKey={'estimator:income.info.RDSP'} />
</div>
<div>
<Trans i18nKey={'estimator:income.info.CDB'} />
</div>
</dl>
);
}
}