Skip to content

Commit

Permalink
feat: add translation for collapse/expand button and update polish lo…
Browse files Browse the repository at this point in the history
…cale (#3811)

add: collapse, expand, polish locale
  • Loading branch information
3sky authored Aug 14, 2024
1 parent aae3e8a commit 18db781
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 62 deletions.
6 changes: 4 additions & 2 deletions web/src/layouts/RootLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import useResponsiveWidth from "@/hooks/useResponsiveWidth";
import Loading from "@/pages/Loading";
import { Routes } from "@/router";
import { useMemoFilterStore } from "@/store/v1";
import { useTranslate } from "@/utils/i18n";

const RootLayout = () => {
const t = useTranslate();
const location = useLocation();
const { sm } = useResponsiveWidth();
const currentUser = useCurrentUser();
Expand Down Expand Up @@ -54,10 +56,10 @@ const RootLayout = () => {
>
{!collapsed ? (
<Button variant="plain" color="neutral" startDecorator={<Icon.ChevronLeft className="w-5 h-auto opacity-70" />}>
Collapse
{t("common.collapse")}
</Button>
) : (
<Tooltip title="Expand" placement="right" arrow>
<Tooltip title={t("common.expand")} placement="right" arrow>
<IconButton>
<Icon.ChevronRight className="w-5 h-auto opacity-70" />
</IconButton>
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
"clear": "Clear",
"close": "Close",
"confirm": "Confirm",
"collapse": "Collapse",
"create": "Create",
"database": "Database",
"days": "Days",
"delete": "Delete",
"description": "Description",
"edit": "Edit",
"email": "Email",
"expand": "Expand",
"explore": "Explore",
"file": "File",
"filter": "Filter",
Expand Down
Loading

0 comments on commit 18db781

Please sign in to comment.