From 98d1ccd614aa34b4bd5181d07255c10607827f6a Mon Sep 17 00:00:00 2001 From: codytseng Date: Thu, 22 May 2025 22:50:44 +0800 Subject: [PATCH] chore: i18n --- src/components/Note/Highlight.tsx | 6 ++++-- src/i18n/locales/ar.ts | 3 ++- src/i18n/locales/de.ts | 3 ++- src/i18n/locales/en.ts | 3 ++- src/i18n/locales/es.ts | 3 ++- src/i18n/locales/fr.ts | 3 ++- src/i18n/locales/it.ts | 3 ++- src/i18n/locales/ja.ts | 3 ++- src/i18n/locales/pl.ts | 3 ++- src/i18n/locales/pt-BR.ts | 3 ++- src/i18n/locales/pt-PT.ts | 3 ++- src/i18n/locales/ru.ts | 3 ++- src/i18n/locales/zh.ts | 3 ++- 13 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/components/Note/Highlight.tsx b/src/components/Note/Highlight.tsx index 17f8e28e..80cd93f2 100644 --- a/src/components/Note/Highlight.tsx +++ b/src/components/Note/Highlight.tsx @@ -7,6 +7,7 @@ import { cn } from '@/lib/utils' import { useSecondaryPage } from '@/PageManager' import { Event } from 'nostr-tools' import { useMemo } from 'react' +import { useTranslation } from 'react-i18next' import Content from '../Content' import ContentPreview from '../ContentPreview' import UserAvatar from '../UserAvatar' @@ -27,6 +28,7 @@ export default function Highlight({ event, className }: { event: Event; classNam } function HighlightSource({ event }: { event: Event }) { + const { t } = useTranslation() const { push } = useSecondaryPage() const sourceTag = useMemo(() => { let sourceTag: string[] | undefined @@ -84,7 +86,7 @@ function HighlightSource({ event }: { event: Event }) { if (sourceTag[0] === 'r') { return (
- {'From '} + {t('From')}{' '} -
{'From'}
+
{t('From')}
{pubkey && } {referenceEvent && isSupportedKind(referenceEvent.kind) ? (