Skip to content

Commit

Permalink
fix dictionary term and make updates section consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
will0684 committed Jun 25, 2024
1 parent 463951f commit 040d388
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 71 deletions.
8 changes: 4 additions & 4 deletions pages/projects/benefits-navigator/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export default function BenefitNavigatorArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[9].scTermEn
: dictionary[9].scTermFr}
? dictionary[13].scTermEn
: dictionary[13].scTermFr}
</p>
<p className="col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-0">
{pageData.scDateModifiedOverwrite}
Expand All @@ -61,8 +61,8 @@ export default function BenefitNavigatorArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[4].scTermEn
: dictionary[4].scTermFr}
? dictionary[8].scTermEn
: dictionary[8].scTermFr}
</p>
<p className="row-start-2 col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-auto">
{pageData.scDateModifiedOverwrite}
Expand Down
25 changes: 14 additions & 11 deletions pages/projects/benefits-navigator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default function BenefitsNavigatorOverview(props) {
href={props.locale === "en" ? update.scPageNameEn : update.scPageNameFr}
description={`${
props.locale === "en"
? props.dictionary.items[9].scTermEn
: props.dictionary.items[9].scTermFr
? props.dictionary.items[13].scTermEn
: props.dictionary.items[13].scTermFr
} ${update.scDateModifiedOverwrite}`}
/>
</li>
Expand Down Expand Up @@ -622,15 +622,18 @@ export default function BenefitsNavigatorOverview(props) {
</section>
</div>

{/* Todo: add locale files and use i18next for translations */}
<h2>
{props.locale === "en"
? "Project updates"
: "Mises à jour du projet"}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0">
{displayProjectUpdates}
</ul>
{updatesData.length === 0 ? null : (
<section id="projectUpdates">
<h2>
{props.locale === "en"
? "Project updates"
: "Mises à jour du projet"}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
</section>
)}
</div>
</Layout>
</>
Expand Down
8 changes: 4 additions & 4 deletions pages/projects/dashboard/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export default function MscaDashboardArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[9].scTermEn
: dictionary[9].scTermFr}
? dictionary[13].scTermEn
: dictionary[13].scTermFr}
</p>
<p className="col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-0">
{pageData.scDateModifiedOverwrite}
Expand All @@ -61,8 +61,8 @@ export default function MscaDashboardArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[4].scTermEn
: dictionary[4].scTermFr}
? dictionary[8].scTermEn
: dictionary[8].scTermFr}
</p>
<p className="row-start-2 col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-auto">
{pageData.scDateModifiedOverwrite}
Expand Down
26 changes: 14 additions & 12 deletions pages/projects/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export default function MscaDashboard(props) {
href={props.locale === "en" ? update.scPageNameEn : update.scPageNameFr}
description={`${
props.locale === "en"
? props.dictionary.items[9].scTermEn
: props.dictionary.items[9].scTermFr
? props.dictionary.items[13].scTermEn
: props.dictionary.items[13].scTermFr
} ${update.scDateModifiedOverwrite}`}
/>
</li>
Expand Down Expand Up @@ -340,16 +340,18 @@ export default function MscaDashboard(props) {
excludeH1={true}
/>
</section>
<section className="layout-container">
<h2>
{props.locale === "en"
? "Project updates"
: "Mises à jour du projet"}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0">
{displayProjectUpdates}
</ul>
</section>
{updatesData.length === 0 ? null : (
<section id="projectUpdates" className="layout-container">
<h2>
{props.locale === "en"
? "Project updates"
: "Mises à jour du projet"}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
</section>
)}
</Layout>
</>
);
Expand Down
8 changes: 4 additions & 4 deletions pages/projects/digital-standards-playbook/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export default function DigitalStandardsArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[9].scTermEn
: dictionary[9].scTermFr}
? dictionary[13].scTermEn
: dictionary[13].scTermFr}
</p>
<p className="col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-0">
{pageData.scDateModifiedOverwrite}
Expand All @@ -63,8 +63,8 @@ export default function DigitalStandardsArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[4].scTermEn
: dictionary[4].scTermFr}
? dictionary[8].scTermEn
: dictionary[8].scTermFr}
</p>
<p className="row-start-2 col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-auto">
{pageData.scDateModifiedOverwrite}
Expand Down
26 changes: 14 additions & 12 deletions pages/projects/digital-standards-playbook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export default function DigitalStandardsPlaybookPage(props) {
href={props.locale === "en" ? update.scPageNameEn : update.scPageNameFr}
description={`${
props.locale === "en"
? props.dictionary.items[9].scTermEn
: props.dictionary.items[9].scTermFr
? props.dictionary.items[13].scTermEn
: props.dictionary.items[13].scTermFr
} ${update.scDateModifiedOverwrite}`}
/>
</li>
Expand Down Expand Up @@ -441,16 +441,18 @@ export default function DigitalStandardsPlaybookPage(props) {
</p>
</div>
</section>
<section id="project-updates">
<h2>
{props.locale === "en"
? props.dictionary.items[11].scTermEn
: props.dictionary.items[11].scTermFr}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
</section>
{updatesData.length === 0 ? null : (
<section id="projectUpdates">
<h2>
{props.locale === "en"
? "Project updates"
: "Mises à jour du projet"}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
</section>
)}
</div>
</Layout>
</>
Expand Down
8 changes: 4 additions & 4 deletions pages/projects/making-easier-get-benefits/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export default function IntegratedChannelStrategyArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[9].scTermEn
: dictionary[9].scTermFr}
? dictionary[13].scTermEn
: dictionary[13].scTermFr}
</p>
<p className="col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-0">
{pageData.scDateModifiedOverwrite}
Expand All @@ -63,8 +63,8 @@ export default function IntegratedChannelStrategyArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[4].scTermEn
: dictionary[4].scTermFr}
? dictionary[8].scTermEn
: dictionary[8].scTermFr}
</p>
<p className="row-start-2 col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-auto">
{pageData.scDateModifiedOverwrite}
Expand Down
21 changes: 15 additions & 6 deletions pages/projects/making-easier-get-benefits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default function IntegratedChannelStrategyPage(props) {
href={props.locale === "en" ? update.scPageNameEn : update.scPageNameFr}
description={`${
props.locale === "en"
? props.dictionary.items[9].scTermEn
: props.dictionary.items[9].scTermFr
? props.dictionary.items[13].scTermEn
: props.dictionary.items[13].scTermFr
} ${update.scDateModifiedOverwrite}`}
/>
</li>
Expand Down Expand Up @@ -331,7 +331,7 @@ export default function IntegratedChannelStrategyPage(props) {
</div>
</div>
</section>
<div className="grid grid-cols-12">
<div id="pageMainContent" className="grid grid-cols-12">
<div className="col-span-12 lg:col-span-7 mt-[48px]">
<TextRender
data={
Expand All @@ -343,9 +343,18 @@ export default function IntegratedChannelStrategyPage(props) {
/>
</div>
</div>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
{updatesData.length === 0 ? null : (
<section id="projectUpdates">
<h2>
{props.locale === "en"
? "Project updates"
: "Mises à jour du projet"}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
</section>
)}
</div>
</Layout>
</>
Expand Down
8 changes: 4 additions & 4 deletions pages/projects/oas-benefits-estimator/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export default function OASBenefitsEstimatorArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[9].scTermEn
: dictionary[9].scTermFr}
? dictionary[13].scTermEn
: dictionary[13].scTermFr}
</p>
<p className="col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-0">
{pageData.scDateModifiedOverwrite}
Expand All @@ -63,8 +63,8 @@ export default function OASBenefitsEstimatorArticles(props) {
} font-bold`}
>
{props.locale === "en"
? dictionary[4].scTermEn
: dictionary[4].scTermFr}
? dictionary[8].scTermEn
: dictionary[8].scTermFr}
</p>
<p className="row-start-2 col-span-6 col-start-7 sm:col-start-5 lg:col-span-2 md:col-start-5 mt-auto">
{pageData.scDateModifiedOverwrite}
Expand Down
24 changes: 14 additions & 10 deletions pages/projects/oas-benefits-estimator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export default function OasBenefitsEstimator(props) {
href={props.locale === "en" ? update.scPageNameEn : update.scPageNameFr}
description={`${
props.locale === "en"
? props.dictionary.items[9].scTermEn
: props.dictionary.items[9].scTermFr
? props.dictionary.items[13].scTermEn
: props.dictionary.items[13].scTermFr
} ${update.scDateModifiedOverwrite}`}
/>
</li>
Expand Down Expand Up @@ -395,14 +395,18 @@ export default function OasBenefitsEstimator(props) {
ariaExpanded={props.ariaExpanded}
/>
</div>
<h2>
{props.locale === "en"
? props.dictionary.items[11].scTermEn
: props.dictionary.items[11].scTermFr}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
{updatesData.length === 0 ? null : (
<section id="projectUpdates">
<h2>
{props.locale === "en"
? "Project updates"
: "Mises à jour du projet"}
</h2>
<ul className="grid lg:grid-cols-12 gap-x-4 lg:gap-y-12 list-none ml-0 mb-12">
{displayProjectUpdates}
</ul>
</section>
)}
</div>
</Layout>
</>
Expand Down

0 comments on commit 040d388

Please sign in to comment.