Skip to content

Commit 33416e7

Browse files
added translations
1 parent 77ea83a commit 33416e7

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

frontend/src/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const Header = ({ hideLinks }: HeaderProps) => {
113113
<>
114114
<li className="usa-nav__primary-item">
115115
<a href="/search" className="usa-nav__link">
116-
<span>Search the Data</span>
116+
<span>{t("header.link.search")}</span>
117117
</a>
118118
</li>
119119
<li className="usa-nav__primary-item">

frontend/src/i18n/en/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import landing from "./landing.json"
66
import organizations from "./organizations.json"
77
import patients from "./patients.json"
88
import practitioners from "./practitioners.json"
9+
import search from "./search.json"
910

1011
/*
1112
* NOTE: (@abachman-dsac) a word about i18n usage in react components and the
@@ -37,4 +38,5 @@ export const translations = {
3738
organizations,
3839
patients,
3940
practitioners,
41+
search
4042
}

frontend/src/i18n/en/landing.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"links": {
1313
"developers": "Developer resources",
1414
"providers": "Provider resources",
15-
"learn": "Learn how it works"
15+
"learn": "Learn how it works",
16+
"search": "Search the data"
1617
},
1718
"authentication": {
1819
"error": {

frontend/src/i18n/en/search.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"title": "Search the data",
3+
"subtitle": "Search the National Provider Directory to find practitioners and organizations.",
4+
"practitioner": "Practitioner",
5+
"organization": "Organization"
6+
}
7+

frontend/src/pages/Landing/Landing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const Landing = () => {
3737
{t("landing.links.developers")}
3838
</Button>
3939
<Button variation="solid" href="/search">
40-
Search the Data
40+
{t("landing.links.search")}
4141
</Button>
4242
</div>
4343
</div>

frontend/src/pages/Search/Search.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ import { Button } from "@cmsgov/design-system"
22
import classNames from "classnames"
33
import { TitlePanel } from "../../components/TitlePanel"
44
import layout from "../Layout.module.css"
5+
import { useTranslation } from "react-i18next"
56

67
export const Search = () => {
8+
const { t } = useTranslation()
79
const contentClass = classNames(layout.content, "ds-l-container")
810

911
return (
1012
<>
1113
<TitlePanel
12-
title="Search the Data"
14+
title={t("search.title")}
1315
className={layout.compactLeader}
1416
>
1517
<div className="ds-l-row">
1618
<div className="ds-l-col--12 ds-u-margin-bottom--4">
1719
<p>
18-
Search the National Provider Directory to find practitioners and organizations.
20+
{t("search.subtitle")}
1921
</p>
2022
</div>
2123
</div>
@@ -25,10 +27,10 @@ export const Search = () => {
2527
<div className="ds-l-row">
2628
<div className="ds-l-col--12 ds-u-display--flex ds-u-justify-content--center ds-u-margin-bottom--6">
2729
<Button variation="solid" size="big" href="/practitioners/search" className="ds-u-margin-right--2">
28-
Practitioner
30+
{t("search.practitioner")}
2931
</Button>
3032
<Button variation="solid" size="big" href="/organizations/search">
31-
Organization
33+
{t("search.organization")}
3234
</Button>
3335
</div>
3436
</div>

0 commit comments

Comments
 (0)