Skip to content

Commit 4dc1069

Browse files
authored
Merge pull request #1867 from jicruz96/additional-resources-translation
extract text to translation ready files -- Learn Legislative Process Page
2 parents 1c71858 + b0b581c commit 4dc1069

6 files changed

Lines changed: 56 additions & 113 deletions

File tree

components/AdditionalResources.tsx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { Container } from "react-bootstrap"
2+
import { useTranslation, Trans } from "next-i18next"
3+
import * as links from "components/links"
4+
5+
const AdditionalResources = () => {
6+
const content = [
7+
{
8+
i18nKey: "find_legislator",
9+
href: "https://malegislature.gov/Search/FindMyLegislator"
10+
},
11+
{
12+
i18nKey: "legislative_doc",
13+
href: "https://www.mass.gov/doc/the-legislative-process-0/download"
14+
},
15+
{
16+
i18nKey: "legal_services",
17+
href: "https://www.masslegalservices.org/content/legislative-process-massachusetts-0"
18+
}
19+
]
20+
const { t } = useTranslation("learnComponents")
21+
22+
return (
23+
<Container fluid="md" className="mt-3">
24+
<h1 className="fs-1 fw-bold text-center text-black">
25+
{t("legislative.additional_resources")}
26+
</h1>
27+
<p className="fs-4 mx-5 my-3">{t("legislative.resources_intro")}</p>
28+
29+
{content.map(({ i18nKey, href }) => (
30+
<div
31+
key={i18nKey}
32+
className="m-4 py-2 px-4 text-bg-light rounded-4 d-flex align-items-center align-items-sm-start"
33+
>
34+
<div className="d-flex flex-0 justify-content-xs-center p-4">
35+
<p className="fs-4">
36+
<Trans
37+
t={t}
38+
i18nKey={`legislative.${i18nKey}`}
39+
components={[<links.External href={href} key={i18nKey} />]}
40+
/>
41+
</p>
42+
</div>
43+
</div>
44+
))}
45+
</Container>
46+
)
47+
}
48+
49+
export default AdditionalResources

components/AdditionalResources/AdditionalResources.tsx

Lines changed: 0 additions & 79 deletions
This file was deleted.

components/AdditionalResources/AdditionalResourcesCard.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

components/AdditionalResources/AdditionalResourcesCardContent.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

pages/learn/legislative-process.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import AdditionalResources from "components/AdditionalResources/AdditionalResources"
1+
import AdditionalResources from "components/AdditionalResources"
22
import { Container } from "../../components/bootstrap"
33
import { createPage } from "../../components/page"
44
import Legislative from "components/Legislative/Legislative"

public/locales/en/learnComponents.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@
123123
"title": "Executive Branch",
124124
"paragraph": "Lastly, the Governor is responsible for signing the enacted and reconciled bill into law. The governor can also veto the bill, return it to the Legislature for changes, or take a number of other less-common actions."
125125
}
126-
]
126+
],
127+
"additional_resources": "Additional Resources",
128+
"resources_intro": "We hope these pages will help you submit effective testimony. You may want to consult these other resources to build a more detailed understanding of the legislative process and how you can contribute.",
129+
"find_legislator": "The MA Legislature has an <0>online tool</0> you can use to identify your legislators based on your home address.",
130+
"legislative_doc": "The MA Legislature publishes a <0>document on the legislative process</0>.",
131+
"legal_services": "Mass Legal Services published a 2007 guide to The <0>Legislative Process in Massachusetts</0>."
127132
}
128133
}

0 commit comments

Comments
 (0)