From a43ea0697ae846da2b654fbae3a11e024175ea1d Mon Sep 17 00:00:00 2001
From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com>
Date: Mon, 6 Jul 2026 15:21:04 +0700
Subject: [PATCH] feat: internationalize sidebar collapse and expand labels
using translation keys
---
apps/web/src/apps/modules/layouts/components/sidebar.tsx | 6 +++---
packages/core-i18n/src/locales/en/common.json | 4 +++-
packages/core-i18n/src/locales/id/common.json | 4 +++-
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/apps/web/src/apps/modules/layouts/components/sidebar.tsx b/apps/web/src/apps/modules/layouts/components/sidebar.tsx
index 63505fc..00da3b8 100644
--- a/apps/web/src/apps/modules/layouts/components/sidebar.tsx
+++ b/apps/web/src/apps/modules/layouts/components/sidebar.tsx
@@ -2,7 +2,7 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { Box, NavLink, Stack, Tooltip, ActionIcon, Divider, Menu, TextInput } from '@repo/ui/components';
import { useCoreAppShell } from '@repo/ui/components';
-import { ChevronsLeft, ChevronsRight, PanelTopClose, PanelTopOpen, Search, X } from 'lucide-react';
+import { ChevronsLeft, ChevronsRight, PanelTopClose, PanelTopOpen, Search, X } from 'lucide-react';
import type { MenuItemType } from '../types/menu.types';
import type { SidebarVariant } from '@repo/ui/components';
import { useTranslation } from '@repo/core-i18n';
@@ -387,7 +387,7 @@ export const SidebarMenu = memo(function SidebarMenu({
<>
-
+
@@ -485,7 +485,7 @@ export const SidebarMenu = memo(function SidebarMenu({
}
onClick={handleToggle}
variant="subtle"
diff --git a/packages/core-i18n/src/locales/en/common.json b/packages/core-i18n/src/locales/en/common.json
index 3bdf019..2d01dcc 100644
--- a/packages/core-i18n/src/locales/en/common.json
+++ b/packages/core-i18n/src/locales/en/common.json
@@ -35,6 +35,8 @@
"systemNotificationsDesc": "View and manage all system notifications.",
"expandAll": "Expand all menu",
"collapseAll": "Collapse all menu",
- "searchMenu": "Search menu"
+ "searchMenu": "Search menu",
+ "collapse": "Collapse",
+ "expandSidebar": "Expand Sidebar"
}
}
\ No newline at end of file
diff --git a/packages/core-i18n/src/locales/id/common.json b/packages/core-i18n/src/locales/id/common.json
index 987ac7a..c7a5d70 100644
--- a/packages/core-i18n/src/locales/id/common.json
+++ b/packages/core-i18n/src/locales/id/common.json
@@ -35,6 +35,8 @@
"systemNotificationsDesc": "Lihat dan kelola semua notifikasi sistem.",
"expandAll": "Buka semua menu",
"collapseAll": "Tutup semua menu",
- "searchMenu": "Cari menu"
+ "searchMenu": "Cari menu",
+ "collapse": "Tutup",
+ "expandSidebar": "Perluas Sidebar"
}
}
\ No newline at end of file