Skip to content

Commit 6e75996

Browse files
authored
activate hearing json usage (#1930)
1 parent b9e6f51 commit 6e75996

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

components/hearing/HearingDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const HearingDetails = ({
7575
return (
7676
<Container className="mt-3 mb-3">
7777
<h1>
78-
{t("hearing")} {hearingId}
78+
{t("hearing", { ns: "hearing" })} {hearingId}
7979
</h1>
8080

8181
<h5 className={`mb-3`}>{description}</h5>
@@ -134,7 +134,7 @@ export const HearingDetails = ({
134134
</VideoParent>
135135
) : (
136136
<LegalContainer className={`fs-6 fw-bold my-3 py-2 rounded`}>
137-
{t("no_video_on_file")}
137+
{t("no_video_on_file", { ns: "hearing" })}
138138
</LegalContainer>
139139
)}
140140

components/hearing/HearingSidebar.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ export const HearingSidebar = ({
109109
return (
110110
<>
111111
<SidebarHeader className={`fs-6 fw-bold px-3 pb-2`}>
112-
{t("hearing_details")}
112+
{t("hearing_details", { ns: "hearing" })}
113113
</SidebarHeader>
114114

115115
{dateCheck ? (
116116
<SidebarBody className={`border-bottom fs-6 fw-bold px-3 py-3`}>
117117
<SidebarSubbody className={`mb-1`}>
118-
{t("recording_date")}
118+
{t("recording_date", { ns: "hearing" })}
119119
</SidebarSubbody>
120120
<div className={`fw-normal`}>{formattedDate}</div>
121121
</SidebarBody>
@@ -127,14 +127,14 @@ export const HearingSidebar = ({
127127
<SidebarBody
128128
className={`border-bottom border-top fs-6 fw-bold px-3 py-3`}
129129
>
130-
{t("committee_members")}
130+
{t("committee_members", { ns: "hearing" })}
131131
<SidebarSubbody className={`mb-1 mt-2`}>
132-
{t("chairs")}
132+
{t("chairs", { ns: "hearing" })}
133133
<div>
134134
{houseChairperson && (
135135
<LabeledIcon
136136
idImage={`https://malegislature.gov/Legislators/Profile/170/${houseChairperson.MemberCode}.jpg`}
137-
mainText={`House Chair`}
137+
mainText={t("house_chair", { ns: "hearing" })}
138138
subText={
139139
<links.External
140140
href={`https://malegislature.gov/Legislators/Profile/${houseChairperson.MemberCode}`}
@@ -149,7 +149,7 @@ export const HearingSidebar = ({
149149
{senateChairperson && (
150150
<LabeledIcon
151151
idImage={`https://malegislature.gov/Legislators/Profile/170/${senateChairperson.MemberCode}.jpg`}
152-
mainText={`Senate Chair`}
152+
mainText={t("senate_chair", { ns: "hearing" })}
153153
subText={
154154
<links.External
155155
href={`https://malegislature.gov/Legislators/Profile/${senateChairperson.MemberCode}`}
@@ -168,13 +168,17 @@ export const HearingSidebar = ({
168168
className={`btn btn-secondary d-flex text-nowrap mt-1 mx-1 p-1`}
169169
onClick={toggleMembers}
170170
>
171-
&nbsp; {showMembers ? "Show less" : "Show more"} &nbsp;
171+
&nbsp;{" "}
172+
{showMembers
173+
? t("show_less", { ns: "hearing" })
174+
: t("show_more", { ns: "hearing" })}
175+
&nbsp;
172176
</CommitteeButton>
173177
</div>
174178

175179
{showMembers ? (
176180
<>
177-
{t("members")}
181+
{t("members", { ns: "hearing" })}
178182
<div>
179183
{members.map((member: Members, index: number) => {
180184
if (
@@ -185,7 +189,7 @@ export const HearingSidebar = ({
185189
<LabeledIcon
186190
key={index}
187191
idImage={`https://malegislature.gov/Legislators/Profile/170/${member.id}.jpg`}
188-
mainText={`Member`}
192+
mainText={t("member", { ns: "hearing" })}
189193
subText={
190194
<links.External
191195
href={`https://malegislature.gov/Legislators/Profile/${member.id}`}

components/hearing/Transcriptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const Transcriptions = ({
9696
</Container>
9797
) : (
9898
<ErrorContainer className={`fs-6 fw-bold mb-2 py-2 rounded`}>
99-
<div>{t("transcription_not_on_file")}</div>
99+
<div>{t("transcription_not_on_file", { ns: "hearing" })}</div>
100100
</ErrorContainer>
101101
)}
102102
</>

public/locales/en/hearing.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
"committee_members": "Committee members",
44
"hearing": "Hearing ",
55
"hearing_details": "Hearing details",
6+
"house_chair": "House Chair",
7+
"member": "Member",
68
"members": "Members",
79
"no_video_on_file": "This hearing does not yet have a video on file",
810
"recording_date": "Recording date",
11+
"senate_chair": "Senate Chair",
12+
"show_less": "Show less",
13+
"show_more": "Show more",
914
"transcription_not_on_file": "This hearing does not yet have a transcription on file"
1015
}

0 commit comments

Comments
 (0)