A free, open source, and extensible speech-to-text application that works completely offline.
toast if exists
CJ Paise624a4526484
diff --git a/src/components/settings/CustomWords.tsx b/src/components/settings/CustomWords.tsxindex bdb9e14a..0137d87e 100644--- a/src/components/settings/CustomWords.tsx+++ b/src/components/settings/CustomWords.tsx@@ -1,5 +1,6 @@import React, { useState } from "react";import { useTranslation } from "react-i18next";+import { toast } from "sonner";import { useSettings } from "../../hooks/useSettings";import { Input } from "../ui/Input";import { Button } from "../ui/Button";@@ -23,9 +24,16 @@ export const CustomWords: React.FC<CustomWordsProps> = React.memo(if (sanitizedWord &&!sanitizedWord.includes(" ") &&- sanitizedWord.length <= 50 &&- !customWords.includes(sanitizedWord)+ sanitizedWord.length <= 50) {+ if (customWords.includes(sanitizedWord)) {+ toast.error(+ t("settings.advanced.customWords.duplicate", {+ word: sanitizedWord,+ }),+ );+ return;+ }updateSetting("custom_words", [...customWords, sanitizedWord]);setNewWord("");}diff --git a/src/i18n/locales/ar/translation.json b/src/i18n/locales/ar/translation.jsonindex 5c197fca..5202c199 100644--- a/src/i18n/locales/ar/translation.json+++ b/src/i18n/locales/ar/translation.json@@ -294,7 +294,8 @@"description": ".أضف الكلمات التي غالباً ما يتم فهمها بشكل خاطئ أو كتابتها بشكل خاطئ أثناء التفريغ. سيقوم النظام تلقائياً بتصحيح الكلمات ذات الصوت المماثل لتطابق قائمتك","placeholder": "أضف كلمة","add": "إضافة",- "remove": "إزالة {{word}}"+ "remove": "إزالة {{word}}",+ "duplicate": "\"{{word}}\" موجود بالفعل"}},"postProcessing": {diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.jsonindex afc25a4a..1193b9fc 100644--- a/src/i18n/locales/cs/translation.json+++ b/src/i18n/locales/cs/translation.json@@ -316,7 +316,8 @@"description": "Přidejte slova, která jsou při přepisu často špatně rozpoznána nebo napsána. Systém automaticky opraví podobně znějící slova podle vašeho seznamu.","placeholder": "Přidat slovo","add": "Přidat",- "remove": "Odebrat {{word}}"+ "remove": "Odebrat {{word}}",+ "duplicate": "\"{{word}}\" již existuje"}},"postProcessing": {diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.jsonindex 60d45f5f..07a3c3ff 100644--- a/src/i18n/locales/de/translation.json+++ b/src/i18n/locales/de/translation.json@@ -316,7 +316,8 @@"description": "Wörter hinzufügen, die oft falsch gehört oder geschrieben werden. Das System korrigiert automatisch ähnlich klingende Wörter entsprechend deiner Liste.","placeholder": "Wort hinzufügen","add": "Hinzufügen",- "remove": "{{word}} entfernen"+ "remove": "{{word}} entfernen",+ "duplicate": "\"{{word}}\" existiert bereits"}},"postProcessing": {diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.jsonindex 69fd796a..e3bdde15 100644--- a/src/i18n/locales/en/translation.json+++ b/src/i18n/locales/en/translation.json@@ -316,7 +316,8 @@"description": "Add words that are often misheard or misspelled during transcription. The system will automatically correct similar-sounding words to match your list.","placeholder": "Add a word","add": "Add",- "remove": "Remove {{word}}"+ "remove": "Remove {{word}}",+ "duplicate": "\"{{word}}\" already exists"}},"postProcessing": {diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.jsonindex af397c68..04a00691 100644--- a/src/i18n/locales/es/translation.json+++ b/src/i18n/locales/es/translation.json@@ -316,7 +316,8 @@"description": "Agrega palabras que a menudo se escuchan mal o se escriben incorrectamente durante la transcripción. El sistema corregirá automáticamente palabras similares para que coincidan con tu lista.","placeholder": "Agregar una palabra","add": "Agregar",- "remove": "Eliminar {{word}}"+ "remove": "Eliminar {{word}}",+ "duplicate": "\"{{word}}\" ya existe"}},"postProcessing": {diff --git a/src/i18n/locales/fr/translation.json b/src/i18n/locales/fr/translation.jsonindex cc01fda2..8e1501b4 100644--- a/src/i18n/locales/fr/translation.json+++ b/src/i18n/locales/fr/translation.json@@ -316,7 +316,8 @@"description": "Ajoutez des mots souvent mal entendus ou mal orthographiés lors de la transcription. Le système corrigera automatiquement les mots similaires pour correspondre à votre liste.","placeholder": "Ajouter un mot","add": "Ajouter",- "remove": "Supprimer {{word}}"+ "remove": "Supprimer {{word}}",+ "duplicate": "\"{{word}}\" existe déjà"}},"postProcessing": {diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.jsonindex c167910f..f3495847 100644--- a/src/i18n/locales/it/translation.json+++ b/src/i18n/locales/it/translation.json@@ -316,7 +316,8 @@"description": "Aggiungi parole che vengono spesso fraintese o scritte in modo errato durante la trascrizione. Il sistema correggerà automaticamente le parole dal suono simile in modo che corrispondano al tuo elenco.","placeholder": "Aggiungi una parola","add": "Aggiungi",- "remove": "Rimuovi {{word}}"+ "remove": "Rimuovi {{word}}",+ "duplicate": "\"{{word}}\" esiste già"}},"postProcessing": {diff --git a/src/i18n/locales/ja/translation.json b/src/i18n/locales/ja/translation.jsonindex 738ff02a..c62a7e3b 100644--- a/src/i18n/locales/ja/translation.json+++ b/src/i18n/locales/ja/translation.json@@ -316,7 +316,8 @@"description": "よく誤認識または誤入力される単語を追加します。システムは自動的に類似した発音の単語をリストに合わせて修正します。","placeholder": "単語を追加","add": "追加",- "remove": "{{word}}を削除"+ "remove": "{{word}}を削除",+ "duplicate": "「{{word}}」は既に存在します"}},"postProcessing": {diff --git a/src/i18n/locales/ko/translation.json b/src/i18n/locales/ko/translation.jsonindex 8e91f318..70950a49 100644--- a/src/i18n/locales/ko/translation.json+++ b/src/i18n/locales/ko/translation.json@@ -316,7 +316,8 @@"description": "녹음 중 자주 잘못 들리거나 철자가 틀리는 단어를 추가하세요. 시스템이 유사한 소리의 단어를 목록과 일치하도록 자동으로 수정합니다.","placeholder": "단어 추가","add": "추가",- "remove": "{{word}} 제거"+ "remove": "{{word}} 제거",+ "duplicate": "\"{{word}}\"이(가) 이미 존재합니다"}},"postProcessing": {diff --git a/src/i18n/locales/pl/translation.json b/src/i18n/locales/pl/translation.jsonindex 015b3be8..2ef5a7be 100644--- a/src/i18n/locales/pl/translation.json+++ b/src/i18n/locales/pl/translation.json@@ -316,7 +316,8 @@"description": "Dodaj słowa, które często są źle rozpoznawane lub zapisywane podczas transkrypcji. System automatycznie poprawi podobnie brzmiące słowa, aby pasowały do Twojej listy.","placeholder": "Dodaj słowo","add": "Dodaj",- "remove": "Usuń {{word}}"+ "remove": "Usuń {{word}}",+ "duplicate": "\"{{word}}\" już istnieje"}},"postProcessing": {diff --git a/src/i18n/locales/pt/translation.json b/src/i18n/locales/pt/translation.jsonindex 80917ed7..914bee1b 100644--- a/src/i18n/locales/pt/translation.json+++ b/src/i18n/locales/pt/translation.json@@ -316,7 +316,8 @@"description": "Adicione palavras que são frequentemente mal ouvidas ou mal escritas durante a transcrição. O sistema irá automaticamente corrigir palavras semelhantes para corresponder à sua lista.","placeholder": "Adicionar uma palavra","add": "Adicionar",- "remove": "Remover {{word}}"+ "remove": "Remover {{word}}",+ "duplicate": "\"{{word}}\" já existe"}},"postProcessing": {diff --git a/src/i18n/locales/ru/translation.json b/src/i18n/locales/ru/translation.jsonindex adcca9a1..144c703b 100644--- a/src/i18n/locales/ru/translation.json+++ b/src/i18n/locales/ru/translation.json@@ -316,7 +316,8 @@"description": "Добавить слова, которые часто неправильно слышатся или пишутся с ошибками во время транскрипции. Система автоматически исправит похожие по звучанию слова, чтобы они соответствовали вашему списку.","placeholder": "Добавить слово","add": "Добавлять",- "remove": "Удалить {{word}}"+ "remove": "Удалить {{word}}",+ "duplicate": "\"{{word}}\" уже существует"}},"postProcessing": {diff --git a/src/i18n/locales/tr/translation.json b/src/i18n/locales/tr/translation.jsonindex dd1d424a..9f908f73 100644--- a/src/i18n/locales/tr/translation.json+++ b/src/i18n/locales/tr/translation.json@@ -316,7 +316,8 @@"description": "Transkripsiyon sırasında sıkça yanlış duyulan veya yanlış yazılan kelimeleri ekleyin. Sistem, benzer sesli kelimeleri listenize göre otomatik olarak düzeltir.","placeholder": "Kelime ekle","add": "Ekle",- "remove": "{{word}} Kaldır"+ "remove": "{{word}} Kaldır",+ "duplicate": "\"{{word}}\" zaten mevcut"}},"postProcessing": {diff --git a/src/i18n/locales/uk/translation.json b/src/i18n/locales/uk/translation.jsonindex e9d3f3c4..15c7ad57 100644--- a/src/i18n/locales/uk/translation.json+++ b/src/i18n/locales/uk/translation.json@@ -316,7 +316,8 @@"description": "Додайте слова, які часто неправильно розпізнаються під час транскрипції. Система автоматично виправлятиме схожі за звучанням слова відповідно до вашого списку.","placeholder": "Додати слово","add": "Додати",- "remove": "Видалити {{word}}"+ "remove": "Видалити {{word}}",+ "duplicate": "\"{{word}}\" вже існує"}},"postProcessing": {diff --git a/src/i18n/locales/vi/translation.json b/src/i18n/locales/vi/translation.jsonindex ec486ac0..da24d806 100644--- a/src/i18n/locales/vi/translation.json+++ b/src/i18n/locales/vi/translation.json@@ -316,7 +316,8 @@"description": "Thêm các từ thường bị nghe nhầm hoặc viết sai trong quá trình chuyển đổi. Hệ thống sẽ tự động sửa các từ có âm thanh tương tự để khớp với danh sách của bạn.","placeholder": "Thêm một từ","add": "Thêm",- "remove": "Xóa {{word}}"+ "remove": "Xóa {{word}}",+ "duplicate": "\"{{word}}\" đã tồn tại"}},"postProcessing": {diff --git a/src/i18n/locales/zh-TW/translation.json b/src/i18n/locales/zh-TW/translation.jsonindex 7c0611de..1197792c 100644--- a/src/i18n/locales/zh-TW/translation.json+++ b/src/i18n/locales/zh-TW/translation.json@@ -316,7 +316,8 @@"description": "新增經常被誤聽或拼寫錯誤的詞彙。系統會自動將發音相似的詞彙修正為您列表中的詞彙","placeholder": "新增詞彙","add": "新增",- "remove": "刪除 {{word}}"+ "remove": "刪除 {{word}}",+ "duplicate": "「{{word}}」已存在"}},"postProcessing": {diff --git a/src/i18n/locales/zh/translation.json b/src/i18n/locales/zh/translation.jsonindex 5744ad99..bf396824 100644--- a/src/i18n/locales/zh/translation.json+++ b/src/i18n/locales/zh/translation.json@@ -316,7 +316,8 @@"description": "添加经常被误听或拼写错误的词汇。系统将自动将发音相似的词汇修正为您列表中的词汇。","placeholder": "添加词汇","add": "添加",- "remove": "删除 {{word}}"+ "remove": "删除 {{word}}",+ "duplicate": "\"{{word}}\" 已存在"}},"postProcessing": {