refactor: update notification strings and improve translations in common.json
This commit is contained in:
@@ -148,7 +148,7 @@ export default function HeaderLayout() {
|
|||||||
|
|
||||||
{/* Application Section */}
|
{/* Application Section */}
|
||||||
<Menu.Label>{t('common:application')}</Menu.Label>
|
<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.Item leftSection={<User size={14} />}>{t('common:myProfile')}</Menu.Item>
|
||||||
|
|
||||||
<Menu.Divider />
|
<Menu.Divider />
|
||||||
|
|||||||
+7
-7
@@ -36,21 +36,21 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
|
|||||||
id: '1',
|
id: '1',
|
||||||
title: 'New User Registration',
|
title: 'New User Registration',
|
||||||
description: 'John Doe has registered a new account in the system.',
|
description: 'John Doe has registered a new account in the system.',
|
||||||
timestamp: t('common:notifications_justNow'),
|
timestamp: t('common:justNow'),
|
||||||
isRead: false,
|
isRead: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
title: 'System Update Completed',
|
title: 'System Update Completed',
|
||||||
description: 'The ERP database has been successfully updated to v2.4.',
|
description: 'The ERP database has been successfully updated to v2.4.',
|
||||||
timestamp: `2 ${t('common:notifications_hoursAgo')}`,
|
timestamp: `2 ${t('common:hoursAgo')}`,
|
||||||
isRead: false,
|
isRead: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '3',
|
id: '3',
|
||||||
title: 'Weekly Report Ready',
|
title: 'Weekly Report Ready',
|
||||||
description: 'Your weekly financial summary is ready to be downloaded.',
|
description: 'Your weekly financial summary is ready to be downloaded.',
|
||||||
timestamp: `5 ${t('common:notifications_hoursAgo')}`,
|
timestamp: `5 ${t('common:hoursAgo')}`,
|
||||||
isRead: true,
|
isRead: true,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
@@ -80,12 +80,12 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
|
|||||||
style={{ borderBottom: '1px solid var(--mantine-color-default-border)' }}
|
style={{ borderBottom: '1px solid var(--mantine-color-default-border)' }}
|
||||||
>
|
>
|
||||||
<Text fw={600} size="sm">
|
<Text fw={600} size="sm">
|
||||||
{t('common:notifications_title')}
|
{t('common:notificationsTitle')}
|
||||||
</Text>
|
</Text>
|
||||||
{unreadCount > 0 && (
|
{unreadCount > 0 && (
|
||||||
<UnstyledButton onClick={handleMarkAllAsRead}>
|
<UnstyledButton onClick={handleMarkAllAsRead}>
|
||||||
<Text size="xs" c="blue" fw={500} style={{ '&:hover': { textDecoration: 'underline' } }}>
|
<Text size="xs" c="blue" fw={500} style={{ '&:hover': { textDecoration: 'underline' } }}>
|
||||||
{t('common:notifications_markAllAsRead')}
|
{t('common:markAllAsRead')}
|
||||||
</Text>
|
</Text>
|
||||||
</UnstyledButton>
|
</UnstyledButton>
|
||||||
)}
|
)}
|
||||||
@@ -97,7 +97,7 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
|
|||||||
<Stack align="center" gap="xs">
|
<Stack align="center" gap="xs">
|
||||||
<BellOff size={32} style={{ opacity: 0.2 }} />
|
<BellOff size={32} style={{ opacity: 0.2 }} />
|
||||||
<Text size="sm" c="dimmed">
|
<Text size="sm" c="dimmed">
|
||||||
{t('common:notifications_emptyState')}
|
{t('common:emptyState')}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Center>
|
</Center>
|
||||||
@@ -138,7 +138,7 @@ export function NotificationDropdown({ children }: NotificationDropdownProps) {
|
|||||||
{notifications.length > 0 && (
|
{notifications.length > 0 && (
|
||||||
<Box p="xs">
|
<Box p="xs">
|
||||||
<Button variant="light" color="gray" fullWidth size="xs" radius="md">
|
<Button variant="light" color="gray" fullWidth size="xs" radius="md">
|
||||||
{t('common:notifications_viewAll')}
|
{t('common:viewAll')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -13,20 +13,19 @@
|
|||||||
"preferences": "Preferences",
|
"preferences": "Preferences",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"application": "Application",
|
"application": "Application",
|
||||||
"accountSettings": "Account Settings",
|
|
||||||
"myProfile": "My Profile",
|
"myProfile": "My Profile",
|
||||||
"workspace": "Workspace",
|
"workspace": "Workspace",
|
||||||
"switchWorkspace": "Switch Workspace",
|
"switchWorkspace": "Switch Workspace",
|
||||||
"signOut": "Sign Out",
|
"signOut": "Sign Out",
|
||||||
"english": "English",
|
"english": "English",
|
||||||
"indonesian": "Indonesia",
|
"indonesian": "Indonesia",
|
||||||
"notifications_title": "Notifications",
|
"notificationsTitle": "Notifications",
|
||||||
"notifications_unread": "Unread",
|
"unread": "Unread",
|
||||||
"notifications_all": "All",
|
"all": "All",
|
||||||
"notifications_markAllAsRead": "Mark all as read",
|
"markAllAsRead": "Mark all as read",
|
||||||
"notifications_viewAll": "View all notifications",
|
"viewAll": "View all notifications",
|
||||||
"notifications_emptyState": "No new notifications",
|
"emptyState": "No new notifications",
|
||||||
"notifications_justNow": "Just now",
|
"justNow": "Just now",
|
||||||
"notifications_hoursAgo": "hours ago"
|
"hoursAgo": "hours ago"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,20 +13,19 @@
|
|||||||
"preferences": "Preferensi",
|
"preferences": "Preferensi",
|
||||||
"language": "Bahasa",
|
"language": "Bahasa",
|
||||||
"application": "Aplikasi",
|
"application": "Aplikasi",
|
||||||
"accountSettings": "Pengaturan Akun",
|
|
||||||
"myProfile": "Profil Saya",
|
"myProfile": "Profil Saya",
|
||||||
"workspace": "Ruang Kerja",
|
"workspace": "Ruang Kerja",
|
||||||
"switchWorkspace": "Ganti Ruang Kerja",
|
"switchWorkspace": "Ganti Ruang Kerja",
|
||||||
"signOut": "Keluar",
|
"signOut": "Keluar",
|
||||||
"english": "Inggris",
|
"english": "Inggris",
|
||||||
"indonesian": "Bahasa Indonesia",
|
"indonesian": "Indonesia",
|
||||||
"notifications_title": "Notifikasi",
|
"notificationsTitle": "Notifikasi",
|
||||||
"notifications_unread": "Belum dibaca",
|
"unread": "Belum dibaca",
|
||||||
"notifications_all": "Semua",
|
"all": "Semua",
|
||||||
"notifications_markAllAsRead": "Tandai semua dibaca",
|
"markAllAsRead": "Tandai semua dibaca",
|
||||||
"notifications_viewAll": "Lihat semua notifikasi",
|
"viewAll": "Lihat semua notifikasi",
|
||||||
"notifications_emptyState": "Tidak ada notifikasi baru",
|
"emptyState": "Tidak ada notifikasi baru",
|
||||||
"notifications_justNow": "Baru saja",
|
"justNow": "Baru saja",
|
||||||
"notifications_hoursAgo": "jam lalu"
|
"hoursAgo": "jam lalu"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user