diff --git a/src/components/ReasoningModelSelector.tsx b/src/components/ReasoningModelSelector.tsx index 6cd9a5716..3a5cb88f7 100644 --- a/src/components/ReasoningModelSelector.tsx +++ b/src/components/ReasoningModelSelector.tsx @@ -8,7 +8,7 @@ import type { InferenceMode, } from "../types/electron"; import { Button } from "./ui/button"; -import { Cloud, Lock, Zap } from "lucide-react"; +import { CircleAlert, Cloud, Lock, Zap } from "lucide-react"; import ApiKeyInput from "./ui/ApiKeyInput"; import ModelCardList from "./ui/ModelCardList"; import LocalModelPicker, { type LocalProvider } from "./LocalModelPicker"; @@ -245,23 +245,33 @@ function GpuStatusBadge() { // State 6: Activation failed if (!isGpu && activationFailed) { return ( -
- - {t("gpu.activationFailed")} - - +
+ + + ); } diff --git a/src/components/TranscriptionModelPicker.tsx b/src/components/TranscriptionModelPicker.tsx index 9e6cfb2e5..c551754f9 100644 --- a/src/components/TranscriptionModelPicker.tsx +++ b/src/components/TranscriptionModelPicker.tsx @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"; import { Button } from "./ui/button"; import { Input } from "./ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select"; -import { Download, Trash2, Cloud, Lock, X, Zap, Check } from "lucide-react"; +import { Download, Trash2, Cloud, Lock, X, Zap, Check, CircleAlert } from "lucide-react"; import { ProviderIcon } from "./ui/ProviderIcon"; import { ProviderTabs } from "./ui/ProviderTabs"; import ModelCardList from "./ui/ModelCardList"; @@ -1298,55 +1298,79 @@ export default function TranscriptionModelPicker({ !gpuDismissed && !gpuDownloading && gpuBackend && ( -
+
{gpuDownloaded ? ( -
-
- {gpuFailed ? ( - <> - - + gpuFailed ? ( +
+
+ +
+

{t("gpu.activationFailed")} - - - - ) : gpuActivating ? ( - <> - - - {t("gpu.activating")} - - - ) : gpuActive ? ( - <> - - - {t("gpu.active")} - - - ) : ( - <> - - - {t("gpu.ready")} - - - )} + {t("gpu.retryActivation")} + +

+
+
- -
+ ) : ( +
+
+ {gpuActivating ? ( + <> + + + {t("gpu.activating")} + + + ) : gpuActive ? ( + <> + + + {t("gpu.active")} + + + ) : ( + <> + + + {t("gpu.ready")} + + + )} +
+ +
+ ) ) : (
diff --git a/src/hooks/useMainProcessNotifications.tsx b/src/hooks/useMainProcessNotifications.tsx index 871805469..04864738b 100644 --- a/src/hooks/useMainProcessNotifications.tsx +++ b/src/hooks/useMainProcessNotifications.tsx @@ -36,10 +36,22 @@ export function useMainProcessNotifications({ }); const showGpuFallbackToast = () => { - toast({ + let toastId: string; + toastId = toast({ title: t("app.toasts.gpuFallback.title"), description: t("app.toasts.gpuFallback.description"), duration: 10000, + action: ( + + ), }); }; const unsubscribeCudaFallback = diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json index b7658810f..b6b19791b 100644 --- a/src/locales/de/translation.json +++ b/src/locales/de/translation.json @@ -3410,8 +3410,11 @@ "active": "GPU-Beschleunigung aktiv", "ready": "GPU-Beschleunigung bereit", "activating": "GPU wird aktiviert...", - "activationFailed": "GPU konnte nicht aktiviert werden", + "activationFailed": "GPU-Beschleunigung nicht verfügbar", + "activationFailedDescription": "OpenWhispr verwendet die CPU-Transkription.", + "reasoningActivationFailedDescription": "OpenWhispr verwendet die CPU-Verarbeitung.", "retry": "Erneut versuchen", + "retryActivation": "GPU-Beschleunigung erneut versuchen", "remove": "Entfernen", "dismiss": "Nicht jetzt", "cancel": "Abbrechen" @@ -3434,7 +3437,8 @@ }, "gpuFallback": { "title": "GPU-Beschleunigung nicht verfügbar", - "description": "Die Transkription verwendet stattdessen die CPU. Du kannst die GPU-Beschleunigung in den Einstellungen deaktivieren." + "description": "OpenWhispr verwendet die CPU-Transkription.", + "retry": "GPU erneut versuchen" }, "gpuPackMigration": { "title": "GPU-Paket muss erneut heruntergeladen werden", diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index f8546a7db..4d6baa16d 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -3410,8 +3410,11 @@ "active": "GPU acceleration active", "ready": "GPU acceleration ready", "activating": "Activating GPU...", - "activationFailed": "GPU could not be activated", + "activationFailed": "GPU acceleration unavailable", + "activationFailedDescription": "OpenWhispr switched to CPU transcription.", + "reasoningActivationFailedDescription": "OpenWhispr switched to CPU processing.", "retry": "Retry", + "retryActivation": "Retry GPU acceleration", "remove": "Remove", "dismiss": "Not now", "cancel": "Cancel" @@ -3434,7 +3437,8 @@ }, "gpuFallback": { "title": "GPU acceleration unavailable", - "description": "Transcription is using the CPU instead. You can disable GPU acceleration in Settings." + "description": "OpenWhispr switched to CPU transcription.", + "retry": "Retry GPU" }, "gpuPackMigration": { "title": "GPU pack needs re-downloading", diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index 7abb0982d..8079d15de 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -3293,8 +3293,11 @@ "active": "Aceleración GPU activa", "ready": "Aceleración GPU lista", "activating": "Activando GPU...", - "activationFailed": "No se pudo activar la GPU", + "activationFailed": "Aceleración GPU no disponible", + "activationFailedDescription": "OpenWhispr cambió a la transcripción por CPU.", + "reasoningActivationFailedDescription": "OpenWhispr cambió al procesamiento por CPU.", "retry": "Reintentar", + "retryActivation": "Reintentar aceleración GPU", "remove": "Eliminar", "dismiss": "Ahora no", "cancel": "Cancelar" @@ -3317,7 +3320,8 @@ }, "gpuFallback": { "title": "Aceleración GPU no disponible", - "description": "La transcripción está usando la CPU. Puedes desactivar la aceleración GPU en Configuración." + "description": "OpenWhispr cambió a la transcripción por CPU.", + "retry": "Reintentar GPU" }, "gpuPackMigration": { "title": "Es necesario volver a descargar el paquete GPU", diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json index 0123d1592..e3601d1cb 100644 --- a/src/locales/fr/translation.json +++ b/src/locales/fr/translation.json @@ -3410,8 +3410,11 @@ "active": "Accélération GPU active", "ready": "Accélération GPU prête", "activating": "Activation du GPU...", - "activationFailed": "Impossible d'activer le GPU", + "activationFailed": "Accélération GPU indisponible", + "activationFailedDescription": "OpenWhispr est passé à la transcription par CPU.", + "reasoningActivationFailedDescription": "OpenWhispr est passé au traitement par CPU.", "retry": "Réessayer", + "retryActivation": "Réessayer l’accélération GPU", "remove": "Supprimer", "dismiss": "Pas maintenant", "cancel": "Annuler" @@ -3434,7 +3437,8 @@ }, "gpuFallback": { "title": "Accélération GPU indisponible", - "description": "La transcription utilise le CPU à la place. Vous pouvez désactiver l'accélération GPU dans les paramètres." + "description": "OpenWhispr est passé à la transcription par CPU.", + "retry": "Réessayer le GPU" }, "gpuPackMigration": { "title": "Le pack GPU doit être retéléchargé", diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 15901a645..817d51201 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -3245,8 +3245,11 @@ "active": "Accelerazione GPU attiva", "ready": "Accelerazione GPU pronta", "activating": "Attivazione GPU...", - "activationFailed": "Impossibile attivare la GPU", + "activationFailed": "Accelerazione GPU non disponibile", + "activationFailedDescription": "OpenWhispr sta usando la trascrizione CPU.", + "reasoningActivationFailedDescription": "OpenWhispr sta usando l'elaborazione CPU.", "retry": "Riprova", + "retryActivation": "Riprova l'accelerazione GPU", "remove": "Rimuovi", "dismiss": "Non ora", "cancel": "Annulla" @@ -3269,7 +3272,8 @@ }, "gpuFallback": { "title": "Accelerazione GPU non disponibile", - "description": "La trascrizione sta usando la CPU. Puoi disattivare l'accelerazione GPU nelle Impostazioni." + "description": "OpenWhispr sta usando la trascrizione CPU.", + "retry": "Riprova GPU" }, "gpuPackMigration": { "title": "Il pacchetto GPU deve essere scaricato di nuovo", diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json index 49c829e66..8ceef9c3c 100644 --- a/src/locales/ja/translation.json +++ b/src/locales/ja/translation.json @@ -3245,8 +3245,11 @@ "active": "GPU アクセラレーション有効", "ready": "GPUアクセラレーション準備完了", "activating": "GPU を有効化中...", - "activationFailed": "GPU を有効化できませんでした", + "activationFailed": "GPU アクセラレーションを利用できません", + "activationFailedDescription": "OpenWhispr は CPU 文字起こしに切り替えました。", + "reasoningActivationFailedDescription": "OpenWhispr は CPU 処理に切り替えました。", "retry": "再試行", + "retryActivation": "GPU アクセラレーションを再試行", "remove": "削除", "dismiss": "後で", "cancel": "キャンセル" @@ -3269,7 +3272,8 @@ }, "gpuFallback": { "title": "GPU アクセラレーションを利用できません", - "description": "文字起こしは代わりに CPU を使用しています。設定で GPU アクセラレーションを無効にできます。" + "description": "OpenWhispr は CPU 文字起こしに切り替えました。", + "retry": "GPU を再試行" }, "gpuPackMigration": { "title": "GPU パックの再ダウンロードが必要です", diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json index a6319ddfe..19b23b71b 100644 --- a/src/locales/pt/translation.json +++ b/src/locales/pt/translation.json @@ -3245,8 +3245,11 @@ "active": "Aceleração GPU ativa", "ready": "Aceleração GPU pronta", "activating": "Ativando GPU...", - "activationFailed": "Não foi possível ativar a GPU", + "activationFailed": "Aceleração GPU indisponível", + "activationFailedDescription": "OpenWhispr mudou para a transcrição por CPU.", + "reasoningActivationFailedDescription": "OpenWhispr mudou para o processamento por CPU.", "retry": "Tentar novamente", + "retryActivation": "Tentar aceleração por GPU novamente", "remove": "Remover", "dismiss": "Agora não", "cancel": "Cancelar" @@ -3269,7 +3272,8 @@ }, "gpuFallback": { "title": "Aceleração GPU indisponível", - "description": "A transcrição está usando a CPU. Você pode desativar a aceleração GPU nas Configurações." + "description": "OpenWhispr mudou para a transcrição por CPU.", + "retry": "Tentar GPU novamente" }, "gpuPackMigration": { "title": "O pacote GPU precisa ser baixado novamente", diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json index 32bfc6cde..91cceea39 100644 --- a/src/locales/ru/translation.json +++ b/src/locales/ru/translation.json @@ -3273,8 +3273,11 @@ "active": "Ускорение GPU активно", "ready": "Ускорение GPU готово", "activating": "Активация GPU...", - "activationFailed": "Не удалось активировать GPU", + "activationFailed": "Ускорение GPU недоступно", + "activationFailedDescription": "OpenWhispr переключился на транскрипцию на CPU.", + "reasoningActivationFailedDescription": "OpenWhispr переключился на обработку на CPU.", "retry": "Повторить", + "retryActivation": "Повторить ускорение GPU", "remove": "Удалить", "dismiss": "Не сейчас", "cancel": "Отмена" @@ -3297,7 +3300,8 @@ }, "gpuFallback": { "title": "Ускорение GPU недоступно", - "description": "Транскрипция выполняется на CPU. Вы можете отключить ускорение GPU в настройках." + "description": "OpenWhispr переключился на транскрипцию на CPU.", + "retry": "Повторить GPU" }, "gpuPackMigration": { "title": "Требуется повторная загрузка GPU-пакета", diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json index 45563ec06..16e5b8a49 100644 --- a/src/locales/zh-CN/translation.json +++ b/src/locales/zh-CN/translation.json @@ -3245,8 +3245,11 @@ "active": "GPU 加速已启用", "ready": "GPU 加速已就绪", "activating": "正在激活 GPU...", - "activationFailed": "无法激活 GPU", + "activationFailed": "GPU 加速不可用", + "activationFailedDescription": "OpenWhispr 已切换为 CPU 转录。", + "reasoningActivationFailedDescription": "OpenWhispr 已切换为 CPU 处理。", "retry": "重试", + "retryActivation": "重试 GPU 加速", "remove": "移除", "dismiss": "暂不启用", "cancel": "取消" @@ -3269,7 +3272,8 @@ }, "gpuFallback": { "title": "GPU 加速不可用", - "description": "转录正在使用 CPU。你可以在设置中关闭 GPU 加速。" + "description": "OpenWhispr 已切换为 CPU 转录。", + "retry": "重试 GPU" }, "gpuPackMigration": { "title": "需要重新下载 GPU 加速包", diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json index 985feb7ac..05ef4b863 100644 --- a/src/locales/zh-TW/translation.json +++ b/src/locales/zh-TW/translation.json @@ -3245,8 +3245,11 @@ "active": "GPU 加速已啟用", "ready": "GPU 加速已就緒", "activating": "正在啟動 GPU...", - "activationFailed": "無法啟動 GPU", + "activationFailed": "GPU 加速無法使用", + "activationFailedDescription": "OpenWhispr 已切換為 CPU 轉錄。", + "reasoningActivationFailedDescription": "OpenWhispr 已切換為 CPU 處理。", "retry": "重試", + "retryActivation": "重試 GPU 加速", "remove": "移除", "dismiss": "暫時不要", "cancel": "取消" @@ -3269,7 +3272,8 @@ }, "gpuFallback": { "title": "GPU 加速無法使用", - "description": "轉錄正在使用 CPU。你可以在設定中關閉 GPU 加速。" + "description": "OpenWhispr 已切換為 CPU 轉錄。", + "retry": "重試 GPU" }, "gpuPackMigration": { "title": "需要重新下載 GPU 加速包",