Skip to content

Commit 301458e

Browse files
committed
Revert "fix miscellaneous translations + build warnings (codeforboston#1934)"
This reverts commit 4cbe155.
1 parent a461eb7 commit 301458e

35 files changed

+167
-298
lines changed

components/HearingsScheduled/HearingsScheduled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Container, Carousel, Spinner } from "react-bootstrap"
33
import styled from "styled-components"
44
import { Col, Row } from "../bootstrap"
55
import { useCalendarEvents } from "./calendarEvents"
6-
import { useTranslation } from "next-i18next"
6+
import { useTranslation } from "react-i18next"
77

88
export type EventData = {
99
index: number

components/Legislative/Legislative.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Container } from "react-bootstrap"
22
import { TestimonyCardList } from "components/LearnTestimonyComponents/TestimonyCardComponents"
3-
import { useTranslation } from "next-i18next"
3+
import { useTranslation } from "react-i18next"
44

55
const LegislativeContent = [
66
{

components/Policies/PolicyPage.tsx

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,63 @@
11
import { PolicyContent } from "./PolicyContent"
22
import { Button, Stack, Container, Image, Row, Col } from "react-bootstrap"
3+
import { ButtonHTMLAttributes, useEffect, useState } from "react"
34
import style from "./PolicyPage.module.css"
45
import Router from "next/router"
56
import classNames from "classnames"
6-
import { useTranslation } from "next-i18next"
77

8-
const policies = ["privacy-policy", "copyright", "code-of-conduct"] as const
8+
const policies = ["copyright", "privacy-policy", "code-of-conduct"] as const
99
export type Policy = (typeof policies)[number]
1010

1111
export default function PolicyPage({
1212
policy = "privacy-policy"
1313
}: {
1414
policy?: Policy
1515
}) {
16-
const { t } = useTranslation("policies")
16+
const handleOnClick = (p: Policy) => {
17+
Router.push(`/policies/${p}`)
18+
}
19+
1720
return (
1821
<Container fluid className={style.policyContent}>
19-
<h1>{t("title")}</h1>
22+
<h1>Policies</h1>
2023
<Stack direction="horizontal">
21-
{policies.map(p => (
22-
<Button
23-
className={`${style[policy === p ? "currentTab" : "tab"]}`}
24-
id={p}
25-
key={p}
26-
onClick={() => Router.push(`/policies/${p}`)}
27-
>
28-
{t(`tabs.${p}`)}
29-
</Button>
30-
))}
24+
<Button
25+
className={`${
26+
style[policy === "privacy-policy" ? "currentTab" : "tab"]
27+
}`}
28+
id="privacy-policy"
29+
onClick={e => handleOnClick("privacy-policy")}
30+
>
31+
Privacy <br /> Policy
32+
</Button>
33+
<Button
34+
className={`${style[policy === "copyright" ? "currentTab" : "tab"]}`}
35+
id="copyright"
36+
onClick={e => handleOnClick("copyright")}
37+
>
38+
Terms of Service <br />
39+
</Button>
40+
41+
<Button
42+
className={`${
43+
style[policy === "code-of-conduct" ? "currentTab" : "tab"]
44+
}`}
45+
id="code-of-conduct"
46+
onClick={e => handleOnClick("code-of-conduct")}
47+
>
48+
Code of <br /> Conduct
49+
</Button>
3150
</Stack>
3251

3352
<PolicyContent policy={policy} />
3453

3554
<div className={style.sharedValues}>
36-
<p className={style.subHeading}>{t("values.heading")}</p>
55+
<p className={style.subHeading}>Our Shared Values</p>
3756
<hr className={style.bottomBorder}></hr>
38-
<p className={style.text1}>{t("values.description1")}</p>
39-
<p className={style.text2}>{t("values.description2")}</p>
57+
<p className={style.text1}>
58+
How we interact with each other determines what we can accomplish
59+
</p>
60+
<p className={style.text2}>On this website, we ask you to act with:</p>
4061
</div>
4162

4263
<Container fluid>
@@ -50,19 +71,19 @@ export default function PolicyPage({
5071
>
5172
<Col xs={12} className={style.blueBox}>
5273
<Image src="/handShake.jpg" alt="" className={style.symbol}></Image>
53-
<p className={style.values}>{t("values.humility")}</p>
74+
<p className={style.values}>Humility</p>
5475
</Col>
5576
<Col xs={12} className={style.blueBox}>
5677
<Image
5778
src="/compassion.png"
5879
alt=""
5980
className={style.symbol}
6081
></Image>
61-
<p className={style.values}>{t("values.compassion")}</p>
82+
<p className={style.values}>Compassion</p>
6283
</Col>
6384
<Col xs={12} className={style.blueBox}>
6485
<Image src="/lightBulb.png" alt="" className={style.symbol}></Image>
65-
<p className={style.values}>{t("values.curiosity")}</p>
86+
<p className={style.values}>Curiosity</p>
6687
</Col>
6788
</Row>
6889
</Container>

components/PriorityBillsCard/PriorityBillsCard.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,7 @@ const Position = (stance: string) => {
8282
</div>
8383
)
8484
}
85+
86+
const EditBtnStyle = styled.p`
87+
color: #8999d6;
88+
`

components/TestimonyCard/ReportModal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ export function ReportModal({
9595
/>
9696
</FloatingLabel>
9797
<div className="text-muted">
98-
{t("character_count", {
99-
count: additionalInformation.length,
100-
limit: ADDITIONAL_INFO_MAX_LENGTH_CHARS
101-
})}
98+
{additionalInformation.length}/{ADDITIONAL_INFO_MAX_LENGTH_CHARS}{" "}
99+
characters
102100
</div>
103101
</Modal.Body>
104102
<Modal.Footer>

components/bill/Status.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Button, Modal } from "../bootstrap"
55
import { StyledBillTitle, StyledModalTitle } from "./HistoryModal"
66
import { HistoryTable } from "./HistoryTable"
77
import { BillProps } from "./types"
8-
import { useTranslation } from "next-i18next"
98

109
const StyledButton = styled(Button)`
1110
border-radius: 3rem 0 0 3rem;
@@ -18,7 +17,6 @@ const StyledButton = styled(Button)`
1817
export const CourtContext = createContext(1)
1918

2019
export const Status = ({ bill }: BillProps) => {
21-
const { t } = useTranslation("common")
2220
const [showBillHistory, setShowBillHistory] = useState(false)
2321

2422
const handleShowBillHistory = () => setShowBillHistory(true)
@@ -38,7 +36,7 @@ export const Status = ({ bill }: BillProps) => {
3836
</StyledButton>
3937
<Modal show={showBillHistory} onHide={handleCloseBillHistory} size="lg">
4038
<Modal.Header closeButton onClick={handleCloseBillHistory}>
41-
<StyledModalTitle>{t("bill.status_and_history")}</StyledModalTitle>
39+
<StyledModalTitle>Status & History</StyledModalTitle>
4240
</Modal.Header>
4341
<StyledBillTitle>
4442
{bill.id + " - " + bill.content.Title}

components/bill/TestimonyCounts.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ export const TestimonyCounts = ({
6363

6464
return (
6565
<Stack className={`align-self-center mx-auto`}>
66-
<CountTotal className={`ms-2`}>
67-
{t("counts.total", { count: total })}
68-
</CountTotal>
66+
<CountTotal className={`ms-2`}>{total} Total Testimonies</CountTotal>
6967
<CountDirection className={`me-1 ms-4 my-1`}>
7068
<Col className={`px-2`}>
7169
<CountCategory>{t("counts.endorsements.title")}</CountCategory>

components/buttons.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ export const CopyButton = ({
310310
tooltipDurationMs?: number
311311
format?: string
312312
}) => {
313-
const { t } = useTranslation("common")
314313
const [show, setShow] = useState(false)
315314
const target = useRef(null)
316315
const closeTimeout = useRef<any>()
@@ -335,7 +334,7 @@ export const CopyButton = ({
335334
</Button>
336335
</CopyToClipboard>
337336
<Overlay target={target} show={show} placement="top">
338-
{props => <Tooltip {...props}>{t("copiedToClipboard")}</Tooltip>}
337+
{props => <Tooltip {...props}>Copied to Clipboard!</Tooltip>}
339338
</Overlay>
340339
</>
341340
)

components/dashboard/ResourcesCard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ export function ResourcesCard({}: Props) {
99
<Container>
1010
<Wrapper>
1111
<LanguagesContainer>
12-
<span>{t("languages")}</span>
12+
<span>Languages</span>
1313

1414
<Languages>
15-
<span>{t("spanish")} </span> | <span> {t("english")}</span>
15+
<span>Spanish </span> | <span> English</span>
1616
</Languages>
1717
</LanguagesContainer>
1818

1919
<PrivacyContainer>
2020
<span>
21-
<Links href="#">{t("privacyPolicy")}</Links>
21+
<Links href="#">Privacy Policy</Links>
2222
</span>
2323
<span>
24-
<Links href="#">{t("termsAndConditions")} </Links>
24+
<Links href="#">Terms and Conditions </Links>
2525
</span>
2626
</PrivacyContainer>
2727
<SocialContainer>

components/db/testimony/useEditTestimony.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function useSaveDraft(
263263
})
264264
}
265265
},
266-
[billId, dispatch, draftLoading, draftRef, uid, court, draft, publication]
266+
[billId, dispatch, draftLoading, draftRef, uid, court]
267267
),
268268
{ onError: error => dispatch({ type: "error", error }) }
269269
)

0 commit comments

Comments
 (0)