Skip to content

Commit

Permalink
fix: support multi lang in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghuan committed Sep 25, 2024
1 parent 3627e45 commit 7322030
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/content/blog-header-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function BlogHeaderLayout({ locale }: { locale: string }) {
className="mb-8 flex w-full items-center border-y p-3 text-foreground/90 md:hidden"
>
<List className="size-[18px]" />
<p className="ml-2.5 text-sm font-medium">Categories</p>
<p className="ml-2.5 text-sm font-medium">{t("categories")}</p>
</Drawer.Trigger>
<Drawer.Overlay className="fixed inset-0 z-40 bg-background/80 backdrop-blur-sm" onClick={closeDrawer} />
<Drawer.Portal>
Expand All @@ -69,7 +69,7 @@ export function BlogHeaderLayout({ locale }: { locale: string }) {
</div>
<ul role="list" className="mb-14 w-full p-3 text-muted-foreground">
<CategoryLink
title="All"
title={t("all")}
href="/blog"
active={!slug}
clickAction={closeDrawer}
Expand All @@ -86,7 +86,7 @@ export function BlogHeaderLayout({ locale }: { locale: string }) {
/>
))}
<CategoryLink
title="Guides"
title={t("guides")}
href="/guides"
active={false}
mobile
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"title": "Blog - FFlow Next",
"description": "Latest news and updates from FFlow Next.",
"all": "All",
"categories": "Categories",
"guides": "Guides",
"news": {
"title": "News",
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"title": "博客 - FFlow Next",
"description": "来自 FFlow Next 的最新新闻和更新。",
"all": "所有",
"categories": "类别",
"guides": "指南",
"news": {
"title": "新闻",
Expand Down

0 comments on commit 7322030

Please sign in to comment.