diff --git a/src/components/TranslateButton/index.tsx b/src/components/TranslateButton/index.tsx index 20a486fd..58d92e60 100644 --- a/src/components/TranslateButton/index.tsx +++ b/src/components/TranslateButton/index.tsx @@ -58,11 +58,9 @@ export default function TranslateButton({ if (/[\u4e00-\u9fff]/.test(cleanText)) { return i18n.language !== 'zh' } - if (/[\u0600-\u06ff]/.test(cleanText)) { return i18n.language !== 'ar' } - if (/[\u0400-\u04ff]/.test(cleanText)) { return i18n.language !== 'ru' } diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 291cfb63..193f2748 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -273,6 +273,7 @@ export default { 'انقر على متابعة لإخفاء {{type}} من المستخدمين غير الموثوقين.', 'Trusted users include people you follow and people they follow.': 'المستخدمون الموثوقون هم الأشخاص الذين تتابعهم والأشخاص الذين يتابعونهم.', - Continue: 'متابعة' + Continue: 'متابعة', + 'Successfully updated mute list': 'تم تحديث قائمة الكتم بنجاح' } } diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index 76f2469f..27296ea7 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -280,6 +280,7 @@ export default { 'Klicke auf Weiter, um {{type}} von nicht vertrauenswürdigen Benutzern auszublenden.', 'Trusted users include people you follow and people they follow.': 'Vertrauenswürdige Benutzer sind Personen, denen du folgst, und Personen, denen sie folgen.', - Continue: 'Weiter' + Continue: 'Weiter', + 'Successfully updated mute list': 'Stummschalteliste erfolgreich aktualisiert' } } diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 8cfea414..6fb6ee36 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -273,6 +273,7 @@ export default { 'Click continue to hide {{type}} from untrusted users.', 'Trusted users include people you follow and people they follow.': 'Trusted users include people you follow and people they follow.', - Continue: 'Continue' + Continue: 'Continue', + 'Successfully updated mute list': 'Successfully updated mute list' } } diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index c91c0f70..5537bf2d 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -278,6 +278,7 @@ export default { 'Haz clic en continuar para ocultar {{type}} de usuarios no confiables.', 'Trusted users include people you follow and people they follow.': 'Los usuarios confiables incluyen a las personas que sigues y a las personas que ellos siguen.', - Continue: 'Continuar' + Continue: 'Continuar', + 'Successfully updated mute list': 'Lista de silenciamiento actualizada con éxito' } } diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index aebf321e..bc01756c 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -278,6 +278,7 @@ export default { 'Cliquez sur continuer pour masquer les {{type}} des utilisateurs non fiables.', 'Trusted users include people you follow and people they follow.': 'Les utilisateurs de confiance incluent les personnes que vous suivez et les personnes qu’elles suivent.', - Continue: 'Continuer' + Continue: 'Continuer', + 'Successfully updated mute list': 'Liste de sourdine mise à jour avec succès' } } diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts index 9b54bfbb..30756f26 100644 --- a/src/i18n/locales/it.ts +++ b/src/i18n/locales/it.ts @@ -277,6 +277,7 @@ export default { 'Clicca su continua per nascondere {{type}} da utenti non fidati.', 'Trusted users include people you follow and people they follow.': 'Gli utenti fidati includono le persone che segui e le persone che seguono loro.', - Continue: 'Continua' + Continue: 'Continua', + 'Successfully updated mute list': 'Lista di silenziamento aggiornata con successo' } } diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index 1f78f433..6c5a476b 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -275,6 +275,7 @@ export default { '信頼されていないユーザーからの{{type}}を非表示にするには続行をクリックしてください。', 'Trusted users include people you follow and people they follow.': '信頼できるユーザーには、あなたがフォローしている人とその人がフォローしている人が含まれます。', - Continue: '続行' + Continue: '続行', + 'Successfully updated mute list': 'ミュートリストの更新に成功しました' } } diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts index 09dfd868..1e7db502 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -276,6 +276,7 @@ export default { 'Kliknij kontynuuj, aby ukryć {{type}} od nieznanych użytkowników.', 'Trusted users include people you follow and people they follow.': 'Zaufani użytkownicy to osoby, które obserwujesz i osoby, które oni obserwują.', - Continue: 'Kontynuuj' + Continue: 'Kontynuuj', + 'Successfully updated mute list': 'Sukces aktualizacji listy zablokowanych użytkowników' } } diff --git a/src/i18n/locales/pt-BR.ts b/src/i18n/locales/pt-BR.ts index 026e68b8..5ad1d51e 100644 --- a/src/i18n/locales/pt-BR.ts +++ b/src/i18n/locales/pt-BR.ts @@ -276,6 +276,7 @@ export default { 'Clique em continuar para ocultar {{type}} de usuários não confiáveis.', 'Trusted users include people you follow and people they follow.': 'Usuários confiáveis incluem pessoas que você segue e pessoas que elas seguem.', - Continue: 'Continuar' + Continue: 'Continuar', + 'Successfully updated mute list': 'Lista de silenciados atualizada com sucesso' } } diff --git a/src/i18n/locales/pt-PT.ts b/src/i18n/locales/pt-PT.ts index 17c5a339..cf7bdd3f 100644 --- a/src/i18n/locales/pt-PT.ts +++ b/src/i18n/locales/pt-PT.ts @@ -277,6 +277,7 @@ export default { 'Clique em continuar para esconder {{type}} de usuários não confiáveis.', 'Trusted users include people you follow and people they follow.': 'Usuários confiáveis incluem pessoas que você segue e pessoas que elas seguem.', - Continue: 'Continuar' + Continue: 'Continuar', + 'Successfully updated mute list': 'Lista de silenciados atualizada com sucesso' } } diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index 4c6da7d8..f15fbd2d 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -278,6 +278,7 @@ export default { 'Нажмите "Продолжить", чтобы скрыть {{type}} от недоверенных пользователей.', 'Trusted users include people you follow and people they follow.': 'Доверенные пользователи включают людей, на которых вы подписаны, и людей, на которых они подписаны.', - Continue: 'Продолжить' + Continue: 'Продолжить', + 'Successfully updated mute list': 'Успешно обновлен список заглушенных пользователей' } } diff --git a/src/i18n/locales/th.ts b/src/i18n/locales/th.ts index 8b5b1198..905a6c0e 100644 --- a/src/i18n/locales/th.ts +++ b/src/i18n/locales/th.ts @@ -272,6 +272,7 @@ export default { 'คลิกดำเนินการต่อเพื่อซ่อน {{type}} จากผู้ใช้ที่ไม่น่าเชื่อถือ', 'Trusted users include people you follow and people they follow.': 'ผู้ใช้ที่เชื่อถือได้รวมถึงผู้ที่คุณติดตามและผู้ที่พวกเขาติดตาม', - Continue: 'ดำเนินการต่อ' + Continue: 'ดำเนินการต่อ', + 'Successfully updated mute list': 'อัปเดตรายการปิดเสียงสำเร็จ' } } diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index 9e90eb32..c24ede8e 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -273,6 +273,7 @@ export default { '点击继续隐藏来自不受信任用户的{{type}}。', 'Trusted users include people you follow and people they follow.': '受信任的用户包括您关注的人和他们关注的人。', - Continue: '继续' + Continue: '继续', + 'Successfully updated mute list': '成功更新屏蔽列表' } } diff --git a/src/providers/MuteListProvider.tsx b/src/providers/MuteListProvider.tsx index 528eabe7..10a8a5cb 100644 --- a/src/providers/MuteListProvider.tsx +++ b/src/providers/MuteListProvider.tsx @@ -8,6 +8,7 @@ import { createContext, useCallback, useContext, useEffect, useMemo, useState } import { toast } from 'sonner' import { z } from 'zod' import { useNostr } from './NostrProvider' +import { useTranslation } from 'react-i18next' type TMuteListContext = { mutePubkeys: string[] @@ -32,6 +33,7 @@ export const useMuteList = () => { } export function MuteListProvider({ children }: { children: React.ReactNode }) { + const { t } = useTranslation() const { pubkey: accountPubkey, muteListEvent, @@ -110,7 +112,7 @@ export function MuteListProvider({ children }: { children: React.ReactNode }) { } const newMuteListDraftEvent = createMuteListDraftEvent(tags, content) const event = await publish(newMuteListDraftEvent) - toast.success('Successfully updated mute list') + toast.success(t('Successfully updated mute list')) return event }