Skip to content

Commit fc4d107

Browse files
committed
refactor: finish page-languages deprecation
1 parent 5fbfcd6 commit fc4d107

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

src/components/LanguagePicker/MenuItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const MenuItem = forwardRef(({ displayInfo, ...props }: ItemProps, ref) => {
3131
wordsApproved,
3232
isBrowserDefault,
3333
} = displayInfo
34-
const { t } = useTranslation("page-languages")
34+
const { t } = useTranslation("common")
3535
const { asPath, locale } = useRouter()
3636
const isCurrent = localeOption === locale
3737

src/components/LanguagePicker/NoResultsCallout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type NoResultsCalloutProps = { onClose: () => void }
99

1010
const NoResultsCallout = forwardRef(
1111
({ onClose }: NoResultsCalloutProps, ref) => {
12-
const { t } = useTranslation("page-languages")
12+
const { t } = useTranslation("common")
1313
return (
1414
<FormHelperText color="body.medium" lineHeight="base" fontSize="md">
1515
<Text fontWeight="bold" mb="2" color="body.base">

src/components/LanguagePicker/useLanguagePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const useLanguagePicker = (
2323
handleClose?: () => void,
2424
menuState?: UseDisclosureReturn
2525
) => {
26-
const { t } = useTranslation("page-languages")
26+
const { t } = useTranslation("common")
2727
const { locale, locales: rawLocales } = useRouter()
2828
const refs = {
2929
inputRef: useRef<HTMLInputElement>(null),

src/lib/utils/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const getRequiredNamespacesForPage = (
3838
path: string,
3939
layout?: string | undefined
4040
) => {
41-
const baseNamespaces = ["common", "page-languages"]
41+
const baseNamespaces = ["common"]
4242

4343
const requiredNamespacesForPath = getRequiredNamespacesForPath(path)
4444
const requiredNamespacesForLayout = getRequiredNamespacesForLayout(layout)

src/pages/contributing/translation-program/contributors.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ const ContentHeading = (props: HeadingProps) => (
6161
)
6262

6363
const Contributors = () => {
64-
const { t } = useTranslation([
65-
"page-contributing-translation-program-contributors",
66-
"page-languages",
67-
])
64+
const { t } = useTranslation(
65+
"page-contributing-translation-program-contributors"
66+
)
6867
const router = useRouter()
6968

7069
// TODO: Remove specific user checks once Acolad has updated their usernames
@@ -149,9 +148,9 @@ const Contributors = () => {
149148
)}
150149
</Text>
151150
<Text>
152-
{t("page-languages:page-languages-interested")}{" "}
151+
{t("common:page-languages-interested")}{" "}
153152
<InlineLink href="/contributing/translation-program/">
154-
{t("page-languages:page-languages-learn-more")}
153+
{t("common:page-languages-learn-more")}
155154
</InlineLink>
156155
.
157156
</Text>
@@ -177,9 +176,9 @@ const Contributors = () => {
177176
})}
178177
</SimpleGrid>
179178
<Text>
180-
{t("page-languages:page-languages-interested")}{" "}
179+
{t("common:page-languages-interested")}{" "}
181180
<InlineLink href="/contributing/translation-program/">
182-
{t("page-languages:page-languages-learn-more")}
181+
{t("common:page-languages-learn-more")}
183182
</InlineLink>
184183
.
185184
</Text>

0 commit comments

Comments
 (0)