Skip to content

extract translate-able text -- Partners page #1889

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
Aug 12, 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
118 changes: 0 additions & 118 deletions components/OurPartnersCardContent/OurPartnersCardContent.tsx

This file was deleted.

130 changes: 54 additions & 76 deletions components/OurTeam/Partners.tsx
Original file line number Diff line number Diff line change
@@ -1,85 +1,63 @@
import { useTranslation } from "next-i18next"
import styled from "styled-components"
import { useTranslation, Trans } from "next-i18next"
import AboutPagesCard from "../AboutPagesCard/AboutPagesCard"
import { Col, Container, Row } from "../bootstrap"
import {
CodeForBostonCardContent,
NuLawLabCardContent,
OpenCollectiveContent
} from "../OurPartnersCardContent/OurPartnersCardContent"
import { PageTitle, PageDescr } from "../shared/CommonComponents"
import Image from "react-bootstrap/Image"

export const OurPartners = () => {
const { t } = useTranslation("common")
const LocalizedContent = (props: {
i18nKey: string
linkClassName?: string
}) => (
<Trans
i18nKey={props.i18nKey}
ns="partners"
components={{
a: (
<a
href="value-overridden-by-partners-json"
target="_blank"
rel="noreferrer"
className={props.linkClassName}
/>
)
}}
/>
)

const PartnerContentCard = ({ src, org }: { src: string; org: string }) => {
const { t } = useTranslation("partners")
const orgTitle = t(`${org}.title`)
return (
<Container>
<Row>
<Col>
<PageTitle>{t("partners.header")}</PageTitle>
</Col>
</Row>
<Row>
<Col className="py-3">
<PageDescr>
{t("partners.desc1")}
<StyleLink
href="https://www.nulawlab.org"
target="_blank"
rel="noopener noreferrer"
>
{" "}
{t("partners.desc2")}
</StyleLink>{" "}
{t("partners.desc3")}
<StyleLink
href="https://www.bc.edu/bc-web/schools/law.html"
target="_blank"
rel="noopener noreferrer"
>
{" "}
{t("partners.desc4")}
</StyleLink>{" "}
{t("partners.desc5")}{" "}
<StyleLink
href="https://cyber.harvard.edu/"
target="_blank"
rel="noopener noreferrer"
>
{t("partners.desc6")}
</StyleLink>
.
</PageDescr>
</Col>
</Row>
<Row>
<Col>
<AboutPagesCard title="NuLawLab">
<NuLawLabCardContent />
</AboutPagesCard>
</Col>
</Row>
<Row>
<Col>
<AboutPagesCard title="Code for Boston">
<CodeForBostonCardContent />
</AboutPagesCard>
</Col>
</Row>
<Row>
<Col>
<AboutPagesCard title="Partners in Democracy">
<Row>
<OpenCollectiveContent />
</Row>
</AboutPagesCard>
</Col>
</Row>
</Container>
<Row>
<Col>
<AboutPagesCard title={orgTitle}>
<Row className="mb-3">
<Col className="text-center align-self-center" md={3}>
<Image fluid src={src} alt={t("logo", { org: orgTitle })} />
</Col>
<Col className="align-self-center" md={9}>
<p className="lh-sm tracking-wide fs-5 pt-4 pt-md-0">
<LocalizedContent i18nKey={`${org}.content`} />
</p>
</Col>
</Row>
</AboutPagesCard>
</Col>
</Row>
)
}

const StyleLink = styled.a`
text-decoration: none;
color: var(--bs-blue);
`
export const OurPartners = () => (
<Container>
<PageTitle>{useTranslation("partners").t("title")}</PageTitle>
<PageDescr className="py-3">
<LocalizedContent i18nKey="desc" linkClassName="text-decoration-none" />
</PageDescr>
<PartnerContentCard
src="/northeastern_school_of_law_logo.svg"
org="nulawlab"
/>
<PartnerContentCard src="/codeforbostonicon.png" org="codeforboston" />
<PartnerContentCard src="/pid.png" org="pid" />
</Container>
)
3 changes: 2 additions & 1 deletion pages/about/our-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export const getStaticProps = createGetStaticTranslationProps([
"auth",
"common",
"footer",
"our-team"
"our-team",
"partners"
])
10 changes: 0 additions & 10 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@
"noResults": "No Results",
"noNewsUpdates": "There are no news updates for your current followed topics",
"orgs": "Organizations",
"partners": {
"header": "Our Partners",
"desc1": "The project is developed in partnership between the",
"desc2": "NuLawLab",
"desc3": "and scholars at",
"desc4": "Boston College Law School",
"desc5": "and",
"desc6": "Harvard University's Berkman Klein Center for Internet & Society",
"pid": "MAPLE is an initiative of Partners in Democracy - Education, a 501(c)(3) non profit organization. Partners In Democracy is building nationwide partnerships and exploring how we can drive democracy renovation efforts forward in states around the country — starting by focusing our efforts here at home in Massachusetts."
},
"pending_upgrade_warning": {
"header": "Organization Request In Progress",
"content": "Your request to be upgraded to an organization is currently in progress. You will be notified by email when your request has been reviewed."
Expand Down
17 changes: 17 additions & 0 deletions public/locales/en/partners.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"title": "Our Partners",
"logo": "{{org}} logo",
"desc": "The project is developed in partnership between the <a href=\"https://www.nulawlab.org/\">NuLawLab</a> and scholars at <a href=\"https://www.bc.edu/bc-web/schools/law.html\">Boston College Law School</a> and <a href=\"https://cyber.harvard.edu/\">Harvard University's Berkman Klein Center for Internet & Society</a>.",
"nulawlab": {
"title": "NuLawLab",
"content": "The <a href=\"https://www.nulawlab.org/\">NuLawLab</a> is the interdisciplinary innovation laboratory at <a href=\"https://law.northeastern.edu/\">Northeastern University School of Law</a>.<br/><br/>The Lab is a leader in the <a href=\"https://dl.designresearchsociety.org/drs-conference-papers/drs2022/editorials/32/\">global legal design movement</a> and incubates projects that advance the democratization of law."
},
"codeforboston": {
"title": "Code for Boston",
"content": "Code for Boston addresses local social and civic challenges through creative uses of technology. Despite the name, they are not solely focused on coding!<br/><br/>They foster relationships between government, nonprofit, academic, for-profit companies, residents, civic technologists, analysts, designers, and many more. <a href=\"https://github.com/codeforboston/maple/graphs/contributors\">Code for Boston's volunteer contributors</a> have led the technical implementation and development of this website and platform as an open source project (<a href=\"https://github.com/codeforboston/maple\">see our repository on GitHub</a>)."
},
"pid": {
"title": "Partners in Democracy",
"content": "MAPLE is an initiative of Partners in Democracy - Education, a 501(c)(3) non profit organization. Partners In Democracy is building nationwide partnerships and exploring how we can drive democracy renovation efforts forward in states around the country — starting by focusing our efforts here at home in Massachusetts."
}
}