Skip to content

Commit c5b8d43

Browse files
committed
Clean up translations
1 parent 28da968 commit c5b8d43

5 files changed

Lines changed: 70 additions & 26 deletions

File tree

src/frontend/public/locales/en/translation.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@
3232
"signInConfirm": "We sent an email with a login link to {{email}}. Click the link to sign into ECHO.",
3333
"enterEmailAddress": "Enter your email address"
3434
},
35+
"discoverNeighborhoods": {
36+
"title": "Discover Neighborhoods",
37+
"subtitle": "Recommendations are based on your profile and selected trip",
38+
"topTen": "Top 10",
39+
"bestRecTitle": "Highest-ranked recommendations",
40+
"recTitle": "Recommended",
41+
"otherTitle": "Other recommended neighborhoods",
42+
"otherTitleLegend": "Other",
43+
"tooFarTitle": "Not a match",
44+
"tooFarDisclaimer": "These neighborhoods are out of reach with your selected transit option, meaning commute times exceeding 1 hour"
45+
},
3546
"photoCredit": "Photo by {{artist}}. ",
3647
"photoSource": "Source.",
3748
"neighborhoodDetail": {

src/frontend/public/locales/es/translation.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,28 @@
3232
"signInConfirm": "Enviamos un correo electrónico con un enlace de inicio de sesión a {{email}}. Haga clic en el enlace para iniciar sesión en ECHO.",
3333
"enterEmailAddress": "Introduce tu dirección de correo electrónico"
3434
},
35+
"discoverNeighborhoods": {
36+
"title": "Discover Neighborhoods",
37+
"subtitle": "Recommendations are based on your profile and selected trip",
38+
"topTen": "Top 10",
39+
"bestRecTitle": "Highest-ranked recommendations",
40+
"recTitle": "Recommended",
41+
"otherTitle": "Other recommended neighborhoods",
42+
"otherTitleLegend": "Other",
43+
"tooFarTitle": "Not a match",
44+
"tooFarDisclaimer": "These neighborhoods are out of reach with your selected transit option, meaning commute times exceeding 1 hour"
45+
},
3546
"photoCredit": "Photo by {{artist}}. ",
3647
"photoSource": "Source.",
3748
"neighborhoodDetail": {
3849
"addToFavorites": "Add to favorites",
39-
"moveCountText": "¡EXAMPLE {{count}} titulares de vales ya se mudaron aquí!",
50+
"moveCountText": "¡{{count}} titulares de vales ya se mudaron aquí!",
4051
"infoToggleLabel": "Infos",
4152
"unitsToggleLabel": "Find units",
4253
"eccYes": "Yes",
4354
"affordableCard": {
4455
"header": "Affordable",
45-
"bodyText": "EXAMPLE La mayoría de las familias pagan <strong>no más del 30% de sus ingresos</strong> en alquiler."
56+
"bodyText": "La mayoría de las familias pagan <strong>no más del 30% de sus ingresos</strong> en alquiler."
4657
},
4758
"echoBenefitsCard": {
4859
"header": "ECHO Benefits",
@@ -116,12 +127,12 @@
116127
"openInGoogle": "Abierto en Google Maps"
117128
},
118129
"userProfile": {
119-
"title": "¡EXAMPLE Descubra los barrios",
130+
"title": "¡Descubra los barrios",
120131
"description": "Start by creating a profile to help us recommend neighborhoods to you",
121132
"actionButton": "Create your profile",
122133
"caption": "Takes just 5 minutes!",
123134
"wizard": {
124-
"header": "¡EXAMPLE Tu perfil",
135+
"header": "¡Tu perfil",
125136
"stepBedroom": {
126137
"question": "How many bedrooms does your voucher have?",
127138
"description": "Reach out to your BHA Housing Coordinator if you're unsure."

src/frontend/public/locales/zh/translation.json

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,28 @@
3232
"signInConfirm": "我们已向{{email}}发送了一封包含登录链接的电子邮件。点击该链接即可登录ECHO。",
3333
"enterEmailAddress": "输入您的电子邮箱地址"
3434
},
35+
"discoverNeighborhoods": {
36+
"title": "Discover Neighborhoods",
37+
"subtitle": "Recommendations are based on your profile and selected trip",
38+
"topTen": "Top 10",
39+
"bestRecTitle": "Highest-ranked recommendations",
40+
"recTitle": "Recommended",
41+
"otherTitle": "Other recommended neighborhoods",
42+
"otherTitleLegend": "Other",
43+
"tooFarTitle": "Not a match",
44+
"tooFarDisclaimer": "These neighborhoods are out of reach with your selected transit option, meaning commute times exceeding 1 hour"
45+
},
3546
"photoCredit": "Photo by {{artist}}. ",
3647
"photoSource": "Source.",
3748
"neighborhoodDetail": {
3849
"addToFavorites": "Add to favorites",
39-
"moveCountText": "EXAMPLE 已有 {{count}} 名代金券持有者搬到这里了!",
50+
"moveCountText": "已有 {{count}} 名代金券持有者搬到这里了!",
4051
"infoToggleLabel": "Infos",
4152
"unitsToggleLabel": "Find units",
4253
"eccYes": "Yes",
4354
"affordableCard": {
4455
"header": "Affordable",
45-
"bodyText": "EXAMPLE 大多数家庭支付的租金<strong>不超过其收入的30%</strong>。"
56+
"bodyText": "大多数家庭支付的租金<strong>不超过其收入的30%</strong>。"
4657
},
4758
"echoBenefitsCard": {
4859
"header": "ECHO Benefits",
@@ -113,22 +124,22 @@
113124
"car": "Car",
114125
"touchPrompt": "Select a trip to see directions on a map",
115126
"editTrips": "Edit your trips",
116-
"openInGoogle": "EXAMPLE 在谷歌地图中打开"
127+
"openInGoogle": "在谷歌地图中打开"
117128
},
118129
"userProfile": {
119130
"title": "发现社区",
120131
"description": "创建个人资料,帮助我们向您推荐社区",
121132
"actionButton": "创建个人资料",
122133
"caption": "只要5分钟!",
123134
"wizard": {
124-
"header": "EXAMPLE 您的资料",
135+
"header": "您的资料",
125136
"stepBedroom": {
126137
"question": "How many bedrooms does your voucher have?",
127-
"description": "EXAMPLE 如果您不确定,请联系BHA住房协调员。"
138+
"description": "如果您不确定,请联系BHA住房协调员。"
128139
},
129140
"stepImportance": {
130141
"question": "What is important to you?",
131-
"commuteTime": "EXAMPLE 通勤时长",
142+
"commuteTime": "通勤时长",
132143
"schoolQuality": "School Quality",
133144
"publicSafety": "Public safety",
134145
"notImportant": "Not important",
@@ -142,7 +153,7 @@
142153
"checkboxLabel": "I'm willing to take the express bus or commuter rail"
143154
},
144155
"button": {
145-
"continue": "EXAMPLE 继续",
156+
"continue": "继续",
146157
"finish": "Finish"
147158
}
148159
}
@@ -165,7 +176,7 @@
165176
"finish": "Add trip"
166177
},
167178
"button": {
168-
"continue": "EXAMPLE 继续",
179+
"continue": "继续",
169180
"finish": "完成"
170181
}
171182
}

src/frontend/src/pages/Discover/Map/Legend.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import { useTranslation } from "react-i18next";
12
import mapStyles from "./Map.styles";
23

34
interface Props {
45
isMobile?: boolean;
56
}
67

78
const Legend = ({ isMobile = true }: Props) => {
9+
const { t } = useTranslation();
810
const {
911
legendWrapper,
1012
legendContainer,
@@ -20,22 +22,24 @@ const Legend = ({ isMobile = true }: Props) => {
2022
<div
2123
className={`${legendColorBox()} bg-[#B9C26D] border-1 border-[#748C27]`}
2224
/>
23-
<span className={legendLabel()}>Top 10</span>
25+
<span className={legendLabel()}>
26+
{t("discoverNeighborhoods.topTen")}
27+
</span>
2428
</div>
2529
<div className={legendItem()}>
2630
<div
2731
className={`${legendColorBox()} bg-[#E6ECBB] border-1 border-[#909772]`}
2832
/>
2933
<span className={`${legendLabel()} font-normal`}>
30-
Other
34+
{t("discoverNeighborhoods.otherTitleLegend")}
3135
</span>
3236
</div>
3337
<div className={legendItem()}>
3438
<div
3539
className={`${legendColorBox()} bg-[#F7F3F1] border-1 border-[#8F8F8F]`}
3640
/>
3741
<span className={`${legendLabel()} font-normal`}>
38-
Not a match
42+
{t("discoverNeighborhoods.tooFarTitle")}
3943
</span>
4044
</div>
4145
</div>

src/frontend/src/pages/Discover/Neighborhoods.tsx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useEffect, useState } from "react";
2+
import { useTranslation } from "react-i18next";
23

34
import NeighborhoodList from "components/NeighborhoodsList/NeighborhoodsList";
45
import {
@@ -21,6 +22,7 @@ const Neighborhoods = ({
2122
mobile: boolean;
2223
listDisplay?: boolean;
2324
}) => {
25+
const { t } = useTranslation();
2426
const [showTooFar, setShowTooFar] = useState(false);
2527
const {
2628
recoContainer,
@@ -78,10 +80,11 @@ const Neighborhoods = ({
7880
<SearchList isMobile={mobile} />
7981
{/* Sub-title */}
8082
<div className={subTitleContainer()}>
81-
<p className={subTitle()}>Discover Neighborhoods</p>
83+
<p className={subTitle()}>
84+
{t("discoverNeighborhoods.title")}
85+
</p>
8286
<p className={description()}>
83-
Recommendations are based on your profile and selected
84-
trip
87+
{t("discoverNeighborhoods.subtitle")}
8588
</p>
8689
</div>
8790
{isLoading && (
@@ -96,15 +99,17 @@ const Neighborhoods = ({
9699
<div className={recoList()}>
97100
<div>
98101
<div className={recoTitleContainer()}>
99-
<p className={recoTitle()}>Top 10</p>
102+
<p className={recoTitle()}>
103+
{t("discoverNeighborhoods.topTen")}
104+
</p>
100105
<div
101106
className={swatch({
102107
swatchColor: "topTen",
103108
})}
104109
></div>
105110
</div>
106111
<p className={recoDescription()}>
107-
Highest-ranked recommendations
112+
{t("discoverNeighborhoods.bestRecTitle")}
108113
</p>
109114
</div>
110115
<NeighborhoodList
@@ -122,15 +127,17 @@ const Neighborhoods = ({
122127
<div className={recoList()}>
123128
<div>
124129
<div className={recoTitleContainer()}>
125-
<p className={recoTitle()}>Recommended</p>
130+
<p className={recoTitle()}>
131+
{t("discoverNeighborhoods.recTitle")}
132+
</p>
126133
<div
127134
className={swatch({
128135
swatchColor: "recommended",
129136
})}
130137
></div>
131138
</div>
132139
<p className={recoDescription()}>
133-
Other recommended neighborhoods
140+
{t("discoverNeighborhoods.otherTitle")}
134141
</p>
135142
</div>
136143
<NeighborhoodList
@@ -148,15 +155,15 @@ const Neighborhoods = ({
148155
<div className={recoList()}>
149156
<div>
150157
<div className={recoTitleContainer()}>
151-
<p className={recoTitle()}>Not a match</p>
158+
<p className={recoTitle()}>
159+
{t("discoverNeighborhoods.tooFarTitle")}
160+
</p>
152161
<div
153162
className={swatch({ swatchColor: "tooFar" })}
154163
></div>
155164
</div>
156165
<p className={recoDescription()}>
157-
These neighborhoods are out of reach with your
158-
selected transit option, meaning commute times
159-
exceeding 1 hour
166+
{t("discoverNeighborhoods.tooFarDisclaimer")}
160167
</p>
161168
</div>
162169
<NeighborhoodList

0 commit comments

Comments
 (0)