diff --git a/apps/desktop/src/routes/activty/components/activityRepost.tsx b/apps/desktop/src/routes/activty/components/activityRepost.tsx index 3386ba6d1..cc577bd0f 100644 --- a/apps/desktop/src/routes/activty/components/activityRepost.tsx +++ b/apps/desktop/src/routes/activty/components/activityRepost.tsx @@ -1,8 +1,11 @@ import { User } from "@lume/ark"; import { NDKEvent } from "@nostr-dev-kit/ndk"; +import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; export function ActivityRepost({ event }: { event: NDKEvent }) { + const { t } = useTranslation(); + return (
-

reposted

+

{t("activity.repost")}

-

mention you

+

{t("activity.mention")}

- zapped {compactNumber.format(invoice.amount)} sats + {t("activity.zap")} {compactNumber.format(invoice.amount)} sats

diff --git a/apps/desktop/src/routes/activty/components/list.tsx b/apps/desktop/src/routes/activty/components/list.tsx index 61755fa5e..02d6ff2f4 100644 --- a/apps/desktop/src/routes/activty/components/list.tsx +++ b/apps/desktop/src/routes/activty/components/list.tsx @@ -4,6 +4,7 @@ import { FETCH_LIMIT } from "@lume/utils"; import { NDKEvent, NDKKind } from "@nostr-dev-kit/ndk"; import { useInfiniteQuery, useQueryClient } from "@tanstack/react-query"; import { useCallback, useMemo } from "react"; +import { useTranslation } from "react-i18next"; import { ActivityRepost } from "./activityRepost"; import { ActivityText } from "./activityText"; import { ActivityZap } from "./activityZap"; @@ -12,6 +13,7 @@ export function ActivityList() { const ark = useArk(); const queryClient = useQueryClient(); + const { t } = useTranslation(); const { data, hasNextPage, isLoading, isFetchingNextPage, fetchNextPage } = useInfiniteQuery({ queryKey: ["activity"], @@ -86,7 +88,7 @@ export function ActivityList() { ) : !allEvents.length ? (

🎉

-

Yo! Nothing new yet.

+

{t("activity.empty")}

) : ( allEvents.map((event) => renderEvenKind(event)) @@ -104,7 +106,7 @@ export function ActivityList() { ) : ( <> - Load more + {t("global.loadMore")} )} diff --git a/apps/desktop/src/routes/activty/components/singleRepost.tsx b/apps/desktop/src/routes/activty/components/singleRepost.tsx index f975d3aa2..c97e876b9 100644 --- a/apps/desktop/src/routes/activty/components/singleRepost.tsx +++ b/apps/desktop/src/routes/activty/components/singleRepost.tsx @@ -1,16 +1,20 @@ import { User } from "@lume/ark"; import { NDKEvent } from "@nostr-dev-kit/ndk"; +import { useTranslation } from "react-i18next"; import { ActivityRootNote } from "./rootNote"; export function ActivitySingleRepost({ event }: { event: NDKEvent }) { + const { t } = useTranslation(); const repostId = event.tags.find((el) => el[0] === "e")[1]; return (
-

Boost

+

+ {t("activity.boost")} +

- @ Someone has reposted to your note + {t("activity.boostSubtitle")}

@@ -22,7 +26,7 @@ export function ActivitySingleRepost({ event }: { event: NDKEvent }) {
-

Reposted

+

{t("activity.repost")}

diff --git a/apps/desktop/src/routes/activty/components/singleText.tsx b/apps/desktop/src/routes/activty/components/singleText.tsx index 52c53cb73..d0c6d7345 100644 --- a/apps/desktop/src/routes/activty/components/singleText.tsx +++ b/apps/desktop/src/routes/activty/components/singleText.tsx @@ -1,5 +1,6 @@ import { Note, useArk } from "@lume/ark"; import { NDKEvent } from "@nostr-dev-kit/ndk"; +import { useTranslation } from "react-i18next"; import { ActivityRootNote } from "./rootNote"; export function ActivitySingleText({ event }: { event: NDKEvent }) { @@ -9,14 +10,16 @@ export function ActivitySingleText({ event }: { event: NDKEvent }) { tags: event.tags, }); + const { t } = useTranslation(); + return (

- Conversation + {t("activity.conversation")}

- @ Someone has replied to your note + {t("activity.conversationSubtitle")}

@@ -33,7 +36,9 @@ export function ActivitySingleText({ event }: { event: NDKEvent }) { ) : null}
-

New reply

+

+ {t("activity.newReply")} +

diff --git a/apps/desktop/src/routes/activty/index.tsx b/apps/desktop/src/routes/activty/index.tsx index 5a13bf81d..1dc3e54cc 100644 --- a/apps/desktop/src/routes/activty/index.tsx +++ b/apps/desktop/src/routes/activty/index.tsx @@ -1,10 +1,12 @@ import { activityUnreadAtom } from "@lume/utils"; import { useSetAtom } from "jotai"; import { useEffect } from "react"; +import { useTranslation } from "react-i18next"; import { Outlet } from "react-router-dom"; import { ActivityList } from "./components/list"; export function ActivityScreen() { + const { t } = useTranslation(); const setUnreadActivity = useSetAtom(activityUnreadAtom); useEffect(() => { @@ -15,7 +17,7 @@ export function ActivityScreen() {
- Activity + {t("activity.title")}
diff --git a/src-tauri/locales/cn.json b/src-tauri/locales/cn.json index e4f811c5a..8400f6f83 100644 --- a/src-tauri/locales/cn.json +++ b/src-tauri/locales/cn.json @@ -279,5 +279,17 @@ "subtitle": "You can exit the setup here and start using Lume.", "report": "Report a issue" } + }, + "activity": { + "title": "Activity", + "empty": "Yo! Nothing new yet.", + "mention": "mention you", + "repost": "reposted", + "zap": "zapped", + "newReply": "New reply", + "boost": "Boost", + "boostSubtitle": "@ Someone has reposted to your note", + "conversation": "Conversation", + "conversationSubtitle": "@ Someone has replied to your note" } } diff --git a/src-tauri/locales/en.json b/src-tauri/locales/en.json index e4f811c5a..8400f6f83 100644 --- a/src-tauri/locales/en.json +++ b/src-tauri/locales/en.json @@ -279,5 +279,17 @@ "subtitle": "You can exit the setup here and start using Lume.", "report": "Report a issue" } + }, + "activity": { + "title": "Activity", + "empty": "Yo! Nothing new yet.", + "mention": "mention you", + "repost": "reposted", + "zap": "zapped", + "newReply": "New reply", + "boost": "Boost", + "boostSubtitle": "@ Someone has reposted to your note", + "conversation": "Conversation", + "conversationSubtitle": "@ Someone has replied to your note" } } diff --git a/src-tauri/locales/ja.json b/src-tauri/locales/ja.json index e4f811c5a..8400f6f83 100644 --- a/src-tauri/locales/ja.json +++ b/src-tauri/locales/ja.json @@ -279,5 +279,17 @@ "subtitle": "You can exit the setup here and start using Lume.", "report": "Report a issue" } + }, + "activity": { + "title": "Activity", + "empty": "Yo! Nothing new yet.", + "mention": "mention you", + "repost": "reposted", + "zap": "zapped", + "newReply": "New reply", + "boost": "Boost", + "boostSubtitle": "@ Someone has reposted to your note", + "conversation": "Conversation", + "conversationSubtitle": "@ Someone has replied to your note" } } diff --git a/src-tauri/locales/ru.json b/src-tauri/locales/ru.json index e4f811c5a..8400f6f83 100644 --- a/src-tauri/locales/ru.json +++ b/src-tauri/locales/ru.json @@ -279,5 +279,17 @@ "subtitle": "You can exit the setup here and start using Lume.", "report": "Report a issue" } + }, + "activity": { + "title": "Activity", + "empty": "Yo! Nothing new yet.", + "mention": "mention you", + "repost": "reposted", + "zap": "zapped", + "newReply": "New reply", + "boost": "Boost", + "boostSubtitle": "@ Someone has reposted to your note", + "conversation": "Conversation", + "conversationSubtitle": "@ Someone has replied to your note" } } diff --git a/src-tauri/locales/vi.json b/src-tauri/locales/vi.json index e4f811c5a..8400f6f83 100644 --- a/src-tauri/locales/vi.json +++ b/src-tauri/locales/vi.json @@ -279,5 +279,17 @@ "subtitle": "You can exit the setup here and start using Lume.", "report": "Report a issue" } + }, + "activity": { + "title": "Activity", + "empty": "Yo! Nothing new yet.", + "mention": "mention you", + "repost": "reposted", + "zap": "zapped", + "newReply": "New reply", + "boost": "Boost", + "boostSubtitle": "@ Someone has reposted to your note", + "conversation": "Conversation", + "conversationSubtitle": "@ Someone has replied to your note" } }