chore: i18n

This commit is contained in:
codytseng
2025-05-22 22:50:44 +08:00
parent 6c91ba9eff
commit 98d1ccd614
13 changed files with 28 additions and 14 deletions

View File

@@ -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 (
<div className="truncate text-muted-foreground">
{'From '}
{t('From')}{' '}
<a
href={sourceTag[1]}
target="_blank"
@@ -100,7 +102,7 @@ function HighlightSource({ event }: { event: Event }) {
return (
<div className="flex items-center gap-2 text-muted-foreground">
<div>{'From'}</div>
<div>{t('From')}</div>
{pubkey && <UserAvatar userId={pubkey} size="xSmall" className="cursor-pointer" />}
{referenceEvent && isSupportedKind(referenceEvent.kind) ? (
<ContentPreview

View File

@@ -230,6 +230,7 @@ export default {
Preview: 'معاينة',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'أنت على وشك نشر حدث موقع من قبل [{{eventAuthorName}}]. أنت حالياً مسجل الدخول كـ [{{currentUsername}}]. هل أنت متأكد؟',
'Platinum Sponsors': 'الرعاة البلاتينيون'
'Platinum Sponsors': 'الرعاة البلاتينيون',
From: 'من'
}
}

View File

@@ -236,6 +236,7 @@ export default {
Preview: 'Vorschau',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Du bist dabei, ein Ereignis zu veröffentlichen, das von [{{eventAuthorName}}] signiert wurde. Du bist derzeit als [{{currentUsername}}] angemeldet. Bist du sicher?',
'Platinum Sponsors': 'Platin-Sponsoren'
'Platinum Sponsors': 'Platin-Sponsoren',
From: 'Von'
}
}

View File

@@ -230,6 +230,7 @@ export default {
Preview: 'Preview',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?',
'Platinum Sponsors': 'Platinum Sponsors'
'Platinum Sponsors': 'Platinum Sponsors',
From: 'From'
}
}

View File

@@ -235,6 +235,7 @@ export default {
Preview: 'Vista previa',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Estás a punto de publicar un evento firmado por [{{eventAuthorName}}]. Actualmente has iniciado sesión como [{{currentUsername}}]. ¿Estás seguro?',
'Platinum Sponsors': 'Patrocinadores Platino'
'Platinum Sponsors': 'Patrocinadores Platino',
From: 'De'
}
}

View File

@@ -235,6 +235,7 @@ export default {
Preview: 'Aperçu',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Vous êtes sur le point de publier un événement signé par [{{eventAuthorName}}]. Vous êtes actuellement connecté en tant que [{{currentUsername}}]. Êtes-vous sûr ?',
'Platinum Sponsors': 'Sponsors Platine'
'Platinum Sponsors': 'Sponsors Platine',
From: 'De'
}
}

View File

@@ -234,6 +234,7 @@ export default {
Preview: 'Anteprima',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Stai per pubblicare un evento firmato da [{{eventAuthorName}}]. Attualmente sei connesso come [{{currentUsername}}]. Sei sicuro?',
'Platinum Sponsors': 'Sponsor Platino'
'Platinum Sponsors': 'Sponsor Platino',
From: 'Da'
}
}

View File

@@ -231,6 +231,7 @@ export default {
Preview: 'プレビュー',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'あなたは[{{eventAuthorName}}]によって署名されたイベントを公開しようとしています。現在[{{currentUsername}}]としてログインしています。よろしいですか?',
'Platinum Sponsors': 'プラチナスポンサー'
'Platinum Sponsors': 'プラチナスポンサー',
From: 'から'
}
}

View File

@@ -233,6 +233,7 @@ export default {
Preview: 'Podgląd',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Zaraz opublikujesz zdarzenie podpisane przez [{{eventAuthorName}}]. Obecnie jesteś zalogowany jako [{{currentUsername}}]. Czy jesteś pewien?',
'Platinum Sponsors': 'Sponsorzy Platynowi'
'Platinum Sponsors': 'Sponsorzy Platynowi',
From: 'Od'
}
}

View File

@@ -233,6 +233,7 @@ export default {
Preview: 'Pré-visualização',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Você está prestes a publicar um evento assinado por [{{eventAuthorName}}]. Você está atualmente logado como [{{currentUsername}}]. Tem certeza?',
'Platinum Sponsors': 'Patrocinadores Platinum'
'Platinum Sponsors': 'Patrocinadores Platinum',
From: 'De'
}
}

View File

@@ -234,6 +234,7 @@ export default {
Preview: 'Pré-visualização',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Você está prestes a publicar um evento assinado por [{{eventAuthorName}}]. Você está atualmente logado como [{{currentUsername}}]. Tem certeza?',
'Platinum Sponsors': 'Patrocinadores Platinum'
'Platinum Sponsors': 'Patrocinadores Platinum',
From: 'De'
}
}

View File

@@ -234,6 +234,7 @@ export default {
Preview: 'Предварительный просмотр',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'Вы собираетесь опубликовать событие, подписанное [{{eventAuthorName}}]. Вы в данный момент вошли как [{{currentUsername}}]. Вы уверены?',
'Platinum Sponsors': 'Платиновые спонсоры'
'Platinum Sponsors': 'Платиновые спонсоры',
From: 'От'
}
}

View File

@@ -231,6 +231,7 @@ export default {
Preview: '预览',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'您即将发布一条由 [{{eventAuthorName}}] 签名的事件。您当前以 [{{currentUsername}}] 登录。确定吗?',
'Platinum Sponsors': '白金赞助商'
'Platinum Sponsors': '白金赞助商',
From: '来自'
}
}