Skip to content

Commit d720fd6

Browse files
committed
localize testimony counts titles and alt texts
1 parent b6e19b9 commit d720fd6

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

components/HotBillCard/Positions.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from "react"
2-
import { Container, CardImg } from "react-bootstrap"
32
import Image from "react-bootstrap/Image"
43
import styled from "styled-components"
54
import { useTranslation } from "next-i18next"
@@ -14,29 +13,29 @@ export const Positions = (props: {
1413
return (
1514
<PositionsStyle>
1615
<PositionStyle>
17-
<p className="stanceTitle">Endorse</p>
16+
<p className="stanceTitle">{t("counts.endorsements.title")}</p>
1817
<div>
19-
<Image className="svg" alt={t("counts.endorsements")} />
18+
<Image className="svg" alt={t("counts.endorsements.alt")} />
2019
<p>{props.endorseCount}</p>
2120
</div>
2221
</PositionStyle>
2322
<PositionStyle>
24-
<p className="stanceTitle">Neutral</p>
23+
<p className="stanceTitle">{t("counts.neutral.title")}</p>
2524
<div>
2625
<Image
2726
className="svg"
28-
alt={t("counts.neutral")}
27+
alt={t("counts.neutral.alt")}
2928
src="/thumbs-neutral.svg"
3029
/>
3130
<p>{props.neutralCount}</p>
3231
</div>
3332
</PositionStyle>
3433
<PositionStyle>
35-
<p className="stanceTitle">Oppose</p>
34+
<p className="stanceTitle">{t("counts.oppose.title")}</p>
3635
<div>
3736
<Image
3837
className="svg"
39-
alt={t("counts.oppose")}
38+
alt={t("counts.oppose.alt")}
4039
src="/thumbs-oppose.svg"
4140
/>
4241
<p>{props.opposeCount}</p>

components/bill/TestimonyCounts.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ export const TestimonyCounts = ({
6666
<CountTotal className={`ms-2`}>{total} Total Testimonies</CountTotal>
6767
<CountDirection className={`me-1 ms-4 my-1`}>
6868
<Col className={`px-2`}>
69-
<CountCategory>Endorse</CountCategory>
69+
<CountCategory>{t("counts.endorsements.title")}</CountCategory>
7070
<Row className={`justify-content-start`}>
7171
<CountIcon
7272
src="/thumbs-endorse.svg"
73-
alt={t("counts.endorsements")}
73+
alt={t("counts.endorsements.alt")}
7474
height="23"
7575
/>
7676
<CountTally className={`align-self-center pe-0 ps-2`}>
@@ -79,11 +79,11 @@ export const TestimonyCounts = ({
7979
</Row>
8080
</Col>
8181
<Col className={`px-2`}>
82-
<CountCategory>Neutral</CountCategory>
82+
<CountCategory>{t("counts.neutral.title")}</CountCategory>
8383
<Row className={`justify-content-start`}>
8484
<CountIcon
8585
src="/thumbs-neutral.svg"
86-
alt={t("counts.neutral")}
86+
alt={t("counts.neutral.alt")}
8787
height="23"
8888
/>
8989
<CountTally className={`align-self-center pe-0 ps-2`}>
@@ -92,11 +92,11 @@ export const TestimonyCounts = ({
9292
</Row>
9393
</Col>
9494
<Col className={`px-2`}>
95-
<CountCategory>Oppose</CountCategory>
95+
<CountCategory>{t("counts.oppose.title")}</CountCategory>
9696
<Row className={`justify-content-start`}>
9797
<CountIcon
9898
src="/thumbs-oppose.svg"
99-
alt={t("counts.oppose")}
99+
alt={t("counts.oppose.alt")}
100100
height="23"
101101
/>
102102
<CountTally className={`align-self-center pe-0 ps-2`}>

public/locales/en/testimony.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
22
"counts": {
3-
"endorsements": "The total number of testimonies that endorse the bill.",
4-
"neutral":"The total number of testimonies that are neutral towards the bill.",
5-
"oppose":"The total number of testimonies that oppose the bill."
3+
"endorsements": {
4+
"title": "Endorse",
5+
"alt": "The total number of testimonies that endorse the bill."
66
},
7+
"neutral": {
8+
"title": "Neutral",
9+
"alt": "The total number of testimonies that are neutral towards the bill."
10+
},
11+
"oppose": {
12+
"title": "Oppose",
13+
"alt": "The total number of testimonies that oppose the bill."
14+
}
15+
},
716
"link": {
817
"tweetContent": "I provided testimony on Bill {{billNumber}}. See {{link}} for details.",
918
"twitter": "Tweet Your Published Testimony"
@@ -61,7 +70,7 @@
6170
"reporting": "Reporting",
6271
"report": "Report",
6372
"rescind": "You may request that your testimony be deleted by completing this form. Since MAPLE is an archive, deletion requests will only be granted if the testimony was submitted on the wrong bill, if it contained sensitive personal information, or if the user is below 18 years old.",
64-
"personalInformation": "Personal Information",
73+
"personalInformation": "Personal Information",
6574
"wrongBill": "Submitted to wrong bill",
6675
"offensive": "Offensive",
6776
"violent": "Violent",
@@ -156,4 +165,4 @@
156165
"draft": "Draft",
157166
"emailCta": "Email Your Published Testimony"
158167
}
159-
}
168+
}

0 commit comments

Comments
 (0)