From 2d02a2840b31e189d70f844cc2ed779857f35431 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 20 Apr 2025 23:30:08 +0800 Subject: [PATCH] . --- components/utility/announcements.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/utility/announcements.tsx b/components/utility/announcements.tsx index 617895d..8654b38 100644 --- a/components/utility/announcements.tsx +++ b/components/utility/announcements.tsx @@ -8,10 +8,12 @@ import { Announcement } from "@/types/announcement" import { IconExternalLink, IconSpeakerphone } from "@tabler/icons-react" import { FC, useEffect, useState } from "react" import { SIDEBAR_ICON_SIZE } from "../sidebar/sidebar-switcher" +import { useTranslation } from 'react-i18next' interface AnnouncementsProps {} export const Announcements: FC = () => { + const { t } = useTranslation() const [announcements, setAnnouncements] = useState([]) useEffect(() => { @@ -93,7 +95,7 @@ export const Announcements: FC = () => {
- Updates + {t("help.updates")}
@@ -120,13 +122,13 @@ export const Announcements: FC = () => { size="sm" onClick={() => markAsRead(a.id)} > - Mark as Read + {t("help.markAsRead")} {a.link && ( @@ -144,17 +146,17 @@ export const Announcements: FC = () => { variant="outline" onClick={markAllAsRead} > - Mark All as Read + {t("help.markAllAsRead")} ) : (
- You are all caught up! + {t("help.youAreAllCaughtUp")} {announcements.length > 0 && (
markAllAsUnread()} > - Show recent updates + {t("help.showRecentUpdates")}
)}