diff --git a/languages/ar.json b/languages/ar.json index 3cd4a0e..526b6bb 100644 --- a/languages/ar.json +++ b/languages/ar.json @@ -409,7 +409,10 @@ "ytdlp_failed": "خطأ: فشل yt-dlp: {error}", "parse_failed": "خطأ: فشل تحليل مخرجات yt-dlp: {error}", "analysis_failed": "خطأ: فشل التحليل: {error}", - "generic_error": "خطأ: {error}" + "generic_error": "خطأ: {error}", + "download_failed_return_code_conflict": "فشل التنزيل برمز الإرجاع {return_code}. قد يكون ذلك بسبب تعارض بين عدة عمليات تثبيت لـ yt-dlp. جرّب إزالة أي تثبيت لنظام التشغيل (مثل snap أو apt) ثم أعد تشغيل التطبيق.", + "download_failed_return_code": "فشل التنزيل برمز الإرجاع {return_code}", + "direct_command_error": "خطأ في الأمر المباشر: {error}" }, "update_dialog": { "title": "تحديث متاح", diff --git a/languages/de.json b/languages/de.json index 3e9d727..3e0b073 100644 --- a/languages/de.json +++ b/languages/de.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Fehler: yt-dlp fehlgeschlagen: {error}", "parse_failed": "Fehler: Fehler beim Parsen der yt-dlp-Ausgabe: {error}", "analysis_failed": "Fehler: Analyse fehlgeschlagen: {error}", - "generic_error": "Fehler: {error}" + "generic_error": "Fehler: {error}", + "download_failed_return_code_conflict": "Download fehlgeschlagen mit Rückgabecode {return_code}. Dies kann an einem Konflikt mit mehreren yt-dlp-Installationen liegen. Deinstalliere ggf. eine systemweit installierte yt-dlp-Version (z. B. über snap oder apt) und starte die Anwendung neu.", + "download_failed_return_code": "Download fehlgeschlagen mit Rückgabecode {return_code}", + "direct_command_error": "Fehler im direkten Befehl: {error}" }, "update_dialog": { "title": "Update verfügbar", diff --git a/languages/en.json b/languages/en.json index 8f7684b..b961214 100644 --- a/languages/en.json +++ b/languages/en.json @@ -410,7 +410,10 @@ "ytdlp_failed": "Error: yt-dlp failed: {error}", "parse_failed": "Error: Failed to parse yt-dlp output: {error}", "analysis_failed": "Error: Analysis failed: {error}", - "generic_error": "Error: {error}" + "generic_error": "Error: {error}", + "download_failed_return_code_conflict": "Download failed with return code {return_code}. This may be due to a conflict with multiple yt-dlp installations. Try uninstalling any system-installed yt-dlp (e.g. through snap or apt) and restart the application.", + "download_failed_return_code": "Download failed with return code {return_code}", + "direct_command_error": "Error in direct command: {error}" }, "update_dialog": { "title": "Update Available", diff --git a/languages/es.json b/languages/es.json index 465fcdd..f27c4dd 100644 --- a/languages/es.json +++ b/languages/es.json @@ -392,7 +392,10 @@ "ytdlp_failed": "Error: yt-dlp falló: {error}", "parse_failed": "Error: Falló al analizar salida de yt-dlp: {error}", "analysis_failed": "Error: Análisis falló: {error}", - "generic_error": "Error: {error}" + "generic_error": "Error: {error}", + "download_failed_return_code_conflict": "La descarga falló con el código de salida {return_code}. Esto puede deberse a un conflicto con varias instalaciones de yt-dlp. Intenta desinstalar cualquier yt-dlp instalado en el sistema (p. ej., mediante snap o apt) y reinicia la aplicación.", + "download_failed_return_code": "La descarga falló con el código de salida {return_code}", + "direct_command_error": "Error en el comando directo: {error}" }, "update_dialog": { "title": "Actualización disponible", diff --git a/languages/fr.json b/languages/fr.json index 51a2f6b..ff77e2e 100644 --- a/languages/fr.json +++ b/languages/fr.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Erreur : yt-dlp a échoué : {error}", "parse_failed": "Erreur : Échec de l'analyse de la sortie yt-dlp : {error}", "analysis_failed": "Erreur : Échec de l'analyse : {error}", - "generic_error": "Erreur : {error}" + "generic_error": "Erreur : {error}", + "download_failed_return_code_conflict": "Téléchargement échoué avec le code de retour {return_code}. Cela peut être dû à un conflit entre plusieurs installations de yt-dlp. Essayez de désinstaller toute version installée au niveau du système (par ex. via snap ou apt) puis redémarrez l’application.", + "download_failed_return_code": "Téléchargement échoué avec le code de retour {return_code}", + "direct_command_error": "Erreur dans la commande directe : {error}" }, "update_dialog": { "title": "Mise à jour disponible", diff --git a/languages/hi.json b/languages/hi.json index bf4360c..1bacff3 100644 --- a/languages/hi.json +++ b/languages/hi.json @@ -409,7 +409,10 @@ "ytdlp_failed": "त्रुटि: yt-dlp असफल: {error}", "parse_failed": "त्रुटि: yt-dlp आउटपुट पार्स करने में विफल: {error}", "analysis_failed": "त्रुटि: विश्लेषण विफल: {error}", - "generic_error": "त्रुटि: {error}" + "generic_error": "त्रुटि: {error}", + "download_failed_return_code_conflict": "डाउनलोड {return_code} रिटर्न कोड के साथ विफल हुआ। यह कई yt-dlp इंस्टॉलेशन के टकराव के कारण हो सकता है। किसी भी सिस्टम-इंस्टॉल्ड yt-dlp (जैसे snap या apt) को हटाकर ऐप को रीस्टार्ट करें।", + "download_failed_return_code": "डाउनलोड {return_code} रिटर्न कोड के साथ विफल हुआ", + "direct_command_error": "सीधे कमांड में त्रुटि: {error}" }, "update_dialog": { "title": "अपडेट उपलब्ध", diff --git a/languages/id.json b/languages/id.json index f1e60f2..46eea59 100644 --- a/languages/id.json +++ b/languages/id.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Kesalahan: yt-dlp gagal: {error}", "parse_failed": "Kesalahan: Gagal mengurai output yt-dlp: {error}", "analysis_failed": "Kesalahan: Analisis gagal: {error}", - "generic_error": "Kesalahan: {error}" + "generic_error": "Kesalahan: {error}", + "download_failed_return_code_conflict": "Unduhan gagal dengan kode pengembalian {return_code}. Ini mungkin karena konflik dengan beberapa instalasi yt-dlp. Coba uninstall yt-dlp yang terpasang di sistem (mis. melalui snap atau apt) lalu mulai ulang aplikasi.", + "download_failed_return_code": "Unduhan gagal dengan kode pengembalian {return_code}", + "direct_command_error": "Error pada perintah langsung: {error}" }, "update_dialog": { "title": "Pembaruan Tersedia", diff --git a/languages/it.json b/languages/it.json index 7cfaf98..dc5f24e 100644 --- a/languages/it.json +++ b/languages/it.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Errore: yt-dlp fallito: {error}", "parse_failed": "Errore: Impossibile analizzare l'output di yt-dlp: {error}", "analysis_failed": "Errore: Analisi fallita: {error}", - "generic_error": "Errore: {error}" + "generic_error": "Errore: {error}", + "download_failed_return_code_conflict": "Download non riuscito con codice di uscita {return_code}. Potrebbe essere dovuto a un conflitto tra più installazioni di yt-dlp. Prova a disinstallare eventuali yt-dlp installati a livello di sistema (es. snap o apt) e riavvia l’app.", + "download_failed_return_code": "Download non riuscito con codice di uscita {return_code}", + "direct_command_error": "Errore nel comando diretto: {error}" }, "update_dialog": { "title": "Aggiornamento disponibile", diff --git a/languages/ja.json b/languages/ja.json index 4b8d4e2..784089b 100644 --- a/languages/ja.json +++ b/languages/ja.json @@ -409,7 +409,10 @@ "ytdlp_failed": "エラー: yt-dlpが失敗しました: {error}", "parse_failed": "エラー: yt-dlp出力の解析に失敗しました: {error}", "analysis_failed": "エラー: 解析が失敗しました: {error}", - "generic_error": "エラー: {error}" + "generic_error": "エラー: {error}", + "download_failed_return_code_conflict": "ダウンロードは戻りコード {return_code} で失敗しました。複数の yt-dlp インストールの競合が原因の可能性があります。システムにインストールされた yt-dlp(例: snap や apt)をアンインストールしてアプリを再起動してください。", + "download_failed_return_code": "ダウンロードは戻りコード {return_code} で失敗しました", + "direct_command_error": "直接コマンドのエラー: {error}" }, "update_dialog": { "title": "アップデートが利用可能です", diff --git a/languages/pl.json b/languages/pl.json index 8db7dc4..75744bf 100644 --- a/languages/pl.json +++ b/languages/pl.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Błąd: yt-dlp nie powiodło się: {error}", "parse_failed": "Błąd: Nie udało się przeanalizować wyjścia yt-dlp: {error}", "analysis_failed": "Błąd: Analiza nie powiodła się: {error}", - "generic_error": "Błąd: {error}" + "generic_error": "Błąd: {error}", + "download_failed_return_code_conflict": "Pobieranie nie powiodło się z kodem {return_code}. Może to wynikać z konfliktu wielu instalacji yt-dlp. Spróbuj odinstalować systemowo zainstalowane yt-dlp (np. przez snap lub apt) i uruchom aplikację ponownie.", + "download_failed_return_code": "Pobieranie nie powiodło się z kodem {return_code}", + "direct_command_error": "Błąd w bezpośrednim poleceniu: {error}" }, "update_dialog": { "title": "Dostępna aktualizacja", diff --git a/languages/pt.json b/languages/pt.json index 27f3152..16aa7c4 100644 --- a/languages/pt.json +++ b/languages/pt.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Erro: yt-dlp falhou: {error}", "parse_failed": "Erro: Falha ao analisar a saída do yt-dlp: {error}", "analysis_failed": "Erro: Análise falhou: {error}", - "generic_error": "Erro: {error}" + "generic_error": "Erro: {error}", + "download_failed_return_code_conflict": "O download falhou com o código de retorno {return_code}. Isso pode ser devido a um conflito com várias instalações do yt-dlp. Tente desinstalar qualquer yt-dlp instalado no sistema (ex.: snap ou apt) e reinicie o aplicativo.", + "download_failed_return_code": "O download falhou com o código de retorno {return_code}", + "direct_command_error": "Erro no comando direto: {error}" }, "update_dialog": { "title": "Atualização Disponível", diff --git a/languages/ru.json b/languages/ru.json index 1c7448b..83830ec 100644 --- a/languages/ru.json +++ b/languages/ru.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Ошибка: yt-dlp завершился с ошибкой: {error}", "parse_failed": "Ошибка: Не удалось разобрать вывод yt-dlp: {error}", "analysis_failed": "Ошибка: Анализ не удался: {error}", - "generic_error": "Ошибка: {error}" + "generic_error": "Ошибка: {error}", + "download_failed_return_code_conflict": "Загрузка завершилась ошибкой с кодом {return_code}. Это может быть из-за конфликта нескольких установок yt-dlp. Попробуйте удалить системно установленный yt-dlp (например, через snap или apt) и перезапустите приложение.", + "download_failed_return_code": "Загрузка не удалась, код {return_code}", + "direct_command_error": "Ошибка в прямой команде: {error}" }, "update_dialog": { "title": "Доступно обновление", diff --git a/languages/tr.json b/languages/tr.json index 906be44..a0aa779 100644 --- a/languages/tr.json +++ b/languages/tr.json @@ -409,7 +409,10 @@ "ytdlp_failed": "Hata: yt-dlp başarısız oldu: {error}", "parse_failed": "Hata: yt-dlp çıktısı ayrıştırılamadı: {error}", "analysis_failed": "Hata: Analiz başarısız oldu: {error}", - "generic_error": "Hata: {error}" + "generic_error": "Hata: {error}", + "download_failed_return_code_conflict": "İndirme {return_code} dönüş koduyla başarısız oldu. Bunun nedeni birden fazla yt-dlp kurulumunun çakışması olabilir. Sistem kurulumlu yt-dlp'yi (örn. snap veya apt) kaldırıp uygulamayı yeniden başlatmayı deneyin.", + "download_failed_return_code": "İndirme {return_code} dönüş koduyla başarısız oldu", + "direct_command_error": "Doğrudan komutta hata: {error}" }, "update_dialog": { "title": "Güncelleme Mevcut", diff --git a/languages/zh.json b/languages/zh.json index da2e429..812ae47 100644 --- a/languages/zh.json +++ b/languages/zh.json @@ -409,7 +409,10 @@ "ytdlp_failed": "错误:yt-dlp失败:{error}", "parse_failed": "错误:解析yt-dlp输出失败:{error}", "analysis_failed": "错误:分析失败:{error}", - "generic_error": "错误:{error}" + "generic_error": "错误:{error}", + "download_failed_return_code_conflict": "下载失败,返回码 {return_code}。这可能是由于存在多个 yt-dlp 安装导致冲突。请卸载系统中安装的 yt-dlp(例如通过 snap 或 apt),然后重启应用。", + "download_failed_return_code": "下载失败,返回码 {return_code}", + "direct_command_error": "直接命令出错:{error}" }, "update_dialog": { "title": "有可用更新", diff --git a/src/core/ytsage_downloader.py b/src/core/ytsage_downloader.py index 01dbd28..8719b9b 100644 --- a/src/core/ytsage_downloader.py +++ b/src/core/ytsage_downloader.py @@ -511,10 +511,12 @@ class DownloadThread(QThread): # Provide more descriptive error message for possible yt-dlp conflicts if return_code == 1: self.error_signal.emit( - f"Download failed with return code {return_code}. This may be due to a conflict with multiple yt-dlp installations. Try uninstalling any system-installed yt-dlp (e.g. through snap or apt) and restart the application." + _("errors.download_failed_return_code_conflict", return_code=return_code) ) else: - self.error_signal.emit(f"Download failed with return code {return_code}") + self.error_signal.emit( + _("errors.download_failed_return_code", return_code=return_code) + ) # Add delay before cleanup to allow file handles to be released time.sleep(1) @@ -522,7 +524,7 @@ class DownloadThread(QThread): except Exception as e: logger.exception(f"Error in direct command: {e}") - self.error_signal.emit(f"Error in direct command: {e}") + self.error_signal.emit(_("errors.direct_command_error", error=str(e))) # Add delay before cleanup to allow file handles to be released time.sleep(1) self.cleanup_partial_files() diff --git a/src/utils/ytsage_localization.py b/src/utils/ytsage_localization.py index 1116fb5..cfedccc 100644 --- a/src/utils/ytsage_localization.py +++ b/src/utils/ytsage_localization.py @@ -108,6 +108,11 @@ class LocalizationManager: }, "formats": { "show_formats": "Show formats:" + }, + "errors": { + "download_failed_return_code_conflict": "Download failed with return code {return_code}. This may be due to a conflict with multiple yt-dlp installations. Try uninstalling any system-installed yt-dlp (e.g. through snap or apt) and restart the application.", + "download_failed_return_code": "Download failed with return code {return_code}", + "direct_command_error": "Error in direct command: {error}" } }