Skip to content

Commit 987c099

Browse files
committed
Fix translations in blog
1 parent c436ad2 commit 987c099

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/components/footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { getRootURL } from '@/lib/seo-utils'
1515
import { GitSHA } from '@/components/git-sha'
1616
import { Image, Link } from '@/components/mdx'
1717
import { NetlifyCallout } from '@/components/netlify'
18-
import { footerItems } from '@/data/footer-items'
18+
import { getFooterItems } from '@/data/footer-items'
1919
import { FaGithub, FaRss, FaTwitter, FaYoutube } from 'react-icons/fa'
2020
import { useLingui } from '@lingui/react/macro'
2121

src/components/layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const Layout = ({
2323
const router = useRouter()
2424
const { pathname, asPath, query } = router
2525

26-
const bannerTitle = 'Check out the latest blog post:'
26+
const bannerTitle = t`Check out the latest blog post:`
2727
// The first link will be the main description for the banner
2828
const bannerDescription = (
2929
<Link href='/blog/xarray-napari-plan' fontWeight='medium'>

src/components/raw-html.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { sanitizeHTML } from '@/lib/sanitize-html'
22
import { Box } from '@chakra-ui/react'
3+
import { useLingui } from '@lingui/react/macro'
34
import useSWR from 'swr'
45

56
async function fetcher(url) {
@@ -20,14 +21,16 @@ async function fetcher(url) {
2021
}
2122

2223
export const RawHTML = ({ filePath }) => {
24+
const { t } = useLingui()
25+
2326
const { data: htmlContent, error } = useSWR(
2427
`/api/html-content?filePath=${encodeURIComponent(filePath)}`,
2528
fetcher,
2629
{ dedupingInterval: 60 * 60 * 1000 }, // 1 hour in milliseconds
2730
)
2831

2932
if (error) {
30-
return <div>{`tError loading content`}</div>
33+
return <div>{t`Error loading content`}</div>
3134
}
3235

3336
if (!htmlContent) {

0 commit comments

Comments
 (0)