refactor: update notification strings and improve translations in common.json

This commit is contained in:
Firman Ramdhani
2026-07-03 16:18:33 +07:00
parent 1de110818a
commit 03fc2d2036
4 changed files with 25 additions and 27 deletions
@@ -148,7 +148,7 @@ export default function HeaderLayout() {
{/* Application Section */}
<Menu.Label>{t('common:application')}</Menu.Label>
<Menu.Item leftSection={<Settings size={14} />}>{t('common:accountSettings')}</Menu.Item>
<Menu.Item leftSection={<Settings size={14} />}>{t('common:settings')}</Menu.Item>
<Menu.Item leftSection={<User size={14} />}>{t('common:myProfile')}</Menu.Item>
<Menu.Divider />
@@ -36,21 +36,21 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
id: '1',
title: 'New User Registration',
description: 'John Doe has registered a new account in the system.',
timestamp: t('common:notifications_justNow'),
timestamp: t('common:justNow'),
isRead: false,
},
{
id: '2',
title: 'System Update Completed',
description: 'The ERP database has been successfully updated to v2.4.',
timestamp: `2 ${t('common:notifications_hoursAgo')}`,
timestamp: `2 ${t('common:hoursAgo')}`,
isRead: false,
},
{
id: '3',
title: 'Weekly Report Ready',
description: 'Your weekly financial summary is ready to be downloaded.',
timestamp: `5 ${t('common:notifications_hoursAgo')}`,
timestamp: `5 ${t('common:hoursAgo')}`,
isRead: true,
},
]);
@@ -80,12 +80,12 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
style={{ borderBottom: '1px solid var(--mantine-color-default-border)' }}
>
<Text fw={600} size="sm">
{t('common:notifications_title')}
{t('common:notificationsTitle')}
</Text>
{unreadCount > 0 && (
<UnstyledButton onClick={handleMarkAllAsRead}>
<Text size="xs" c="blue" fw={500} style={{ '&:hover': { textDecoration: 'underline' } }}>
{t('common:notifications_markAllAsRead')}
{t('common:markAllAsRead')}
</Text>
</UnstyledButton>
)}
@@ -97,7 +97,7 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
<Stack align="center" gap="xs">
<BellOff size={32} style={{ opacity: 0.2 }} />
<Text size="sm" c="dimmed">
{t('common:notifications_emptyState')}
{t('common:emptyState')}
</Text>
</Stack>
</Center>
@@ -138,7 +138,7 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
{notifications.length > 0 && (
<Box p="xs">
<Button variant="light" color="gray" fullWidth size="xs" radius="md">
{t('common:notifications_viewAll')}
{t('common:viewAll')}
</Button>
</Box>
)}