diff --git a/src/localization/cn.ts b/src/localization/cn.ts index 0f4d5d35..e8d76ee9 100644 --- a/src/localization/cn.ts +++ b/src/localization/cn.ts @@ -151,7 +151,9 @@ const chinese: Language = { error_wp_not_found: 'warp-plus 文件不在应用程序包旁边。', error_wp_stopped: 'warp-plus 文件在运行时遇到了问题!', error_connection_failed: '无法连接到1.1.1.1。', - error_country_failed: '无法连接到所选国家.' + error_country_failed: '无法连接到所选国家.', + error_singbox_failed_stop: '停止 Sing-Box 失败!', + error_singbox_failed_start: '启动 Sing-Box 失败!' }, about: { title: '关于应用', diff --git a/src/localization/de.ts b/src/localization/de.ts index ae818740..374111d0 100644 --- a/src/localization/de.ts +++ b/src/localization/de.ts @@ -156,7 +156,9 @@ const deutsch: Language = { error_wp_not_found: 'Die Datei warp-plus befindet sich nicht neben dem Anwendungspaket.', error_wp_stopped: 'Die Datei warp-plus hat ein Problem beim Ausführen!', error_connection_failed: 'Verbindung zu 1.1.1.1 war nicht möglich.', - error_country_failed: 'Verbindung zum ausgewählten Land nicht möglich.' + error_country_failed: 'Verbindung zum ausgewählten Land nicht möglich.', + error_singbox_failed_stop: 'Sing-Box konnte nicht gestoppt werden!', + error_singbox_failed_start: 'Sing-Box konnte nicht gestartet werden!' }, about: { title: 'Über', diff --git a/src/localization/en.ts b/src/localization/en.ts index cd8004b1..7820f208 100644 --- a/src/localization/en.ts +++ b/src/localization/en.ts @@ -153,7 +153,9 @@ const english: Language = { error_wp_not_found: 'The warp-plus file is not located alongside the application package!', error_wp_stopped: 'The warp-plus file has encountered an issue running!', error_connection_failed: 'Connection to 1.1.1.1 was not possible.', - error_country_failed: 'Cannot connect to the selected country.' + error_country_failed: 'Cannot connect to the selected country.', + error_singbox_failed_stop: 'Failed to stop Sing-Box!', + error_singbox_failed_start: 'Failed to start Sing-Box!' }, about: { title: 'About App', diff --git a/src/localization/fa.ts b/src/localization/fa.ts index 729e2d00..1ffba576 100644 --- a/src/localization/fa.ts +++ b/src/localization/fa.ts @@ -155,7 +155,9 @@ const persian: Language = { error_wp_not_found: `فایل warp-plus در کنار بسته برنامه وجود ندارد!`, error_wp_stopped: `فایل warp-plus برای اجرا با مشکل مواجه است!`, error_connection_failed: 'اتصال به 1.1.1.1 امکان‌پذیر نبود.', - error_country_failed: 'امکان اتصال به کشور انتخابی وجود ندارد.' + error_country_failed: 'امکان اتصال به کشور انتخابی وجود ندارد.', + error_singbox_failed_stop: 'متوقف‌کردن سینگ‌باکس با خطا مواجه شد!', + error_singbox_failed_start: 'فعال‌کردن سینگ‌باکس با خطا مواجه شد!' }, about: { title: 'درباره برنامه', diff --git a/src/localization/id.ts b/src/localization/id.ts index b79c00f2..394e1542 100644 --- a/src/localization/id.ts +++ b/src/localization/id.ts @@ -152,7 +152,9 @@ const indonesia: Language = { error_wp_not_found: 'File warp-plus tidak terletak di samping paket aplikasi!', error_wp_stopped: 'File warp-plus mengalami masalah saat dijalankan!', error_connection_failed: 'Koneksi ke 1.1.1.1 tidak berhasil.', - error_country_failed: 'Tidak dapat terhubung ke negara yang dipilih.' + error_country_failed: 'Tidak dapat terhubung ke negara yang dipilih.', + error_singbox_failed_stop: 'Gagal menghentikan Sing-Box!', + error_singbox_failed_start: 'Gagal memulai Sing-Box!' }, about: { title: 'Tentang Aplikasi', diff --git a/src/localization/ru.ts b/src/localization/ru.ts index 7a77ff7b..e4e63122 100644 --- a/src/localization/ru.ts +++ b/src/localization/ru.ts @@ -155,7 +155,9 @@ const russian: Language = { error_wp_not_found: 'Файл warp-plus не находится рядом с пакетом приложения.', error_wp_stopped: 'Файл warp-plus столкнулся с проблемой при запуске!', error_connection_failed: 'Подключение к 1.1.1.1 невозможно.', - error_country_failed: 'Невозможно подключиться к выбранной стране.' + error_country_failed: 'Невозможно подключиться к выбранной стране.', + error_singbox_failed_stop: 'Не удалось остановить Sing-Box!', + error_singbox_failed_start: 'Не удалось запустить Sing-Box!' }, about: { title: 'О приложении', diff --git a/src/localization/tr.ts b/src/localization/tr.ts index 6dbed18e..8c75e9c2 100644 --- a/src/localization/tr.ts +++ b/src/localization/tr.ts @@ -154,7 +154,9 @@ const turkish: Language = { error_wp_not_found: 'Warp-plus dosyası uygulama paketiyle birlikte yer almıyor!', error_wp_stopped: 'warp-plus dosyası çalışırken bir sorunla karşılaştı!', error_connection_failed: '1.1.1.1 ile bağlantı sağlanamadı.', - error_country_failed: 'Seçilen ülkeye bağlanılamıyor.' + error_country_failed: 'Seçilen ülkeye bağlanılamıyor.', + error_singbox_failed_stop: 'Sing-Box durdurulamadı!', + error_singbox_failed_start: 'Sing-Box başlatılamadı!' }, about: { title: 'Uygulama Hakkında', diff --git a/src/localization/type.ts b/src/localization/type.ts index f2824d15..13e89bbb 100644 --- a/src/localization/type.ts +++ b/src/localization/type.ts @@ -153,6 +153,8 @@ export interface Log { error_wp_not_found: string; error_wp_stopped: string; error_connection_failed: string; + error_singbox_failed_stop: string; + error_singbox_failed_start: string; } export interface About { diff --git a/src/main/ipcListeners/wp.ts b/src/main/ipcListeners/wp.ts index bb46d152..0622471a 100644 --- a/src/main/ipcListeners/wp.ts +++ b/src/main/ipcListeners/wp.ts @@ -132,7 +132,7 @@ ipcMain.on('wp-start', async (event) => { if (proxyMode === 'tun' && isSingBoxRunning) { isSingBoxRunning = !(await singBoxManager.stopSingBox()); if (isSingBoxRunning) { - event.reply('guide-toast', 'Failed to stop Sing-Box'); + event.reply('guide-toast', appLang.log.error_singbox_failed_stop); } else { disconnectedFlags[0] = true; sendDisconnectedSignalToRenderer(); @@ -189,7 +189,7 @@ ipcMain.on('wp-start', async (event) => { connectedFlags[1] = true; sendConnectedSignalToRenderer(); } else { - event.reply('guide-toast', 'Failed to start Sing-Box'); + event.reply('guide-toast', appLang.log.error_singbox_failed_start); event.reply('wp-end', true); if (typeof child?.pid !== 'undefined') { treeKill(child.pid, 'SIGKILL'); @@ -241,7 +241,7 @@ ipcMain.on('wp-end', async (event) => { if (proxyMode === 'tun' && isSingBoxRunning) { isSingBoxRunning = !(await singBoxManager.stopSingBox()); if (isSingBoxRunning) { - event.reply('guide-toast', 'Failed to stop Sing-Box'); + event.reply('guide-toast', appLang.log.error_singbox_failed_stop); event.reply('wp-end', false); event.reply('wp-start', true); } else { @@ -266,7 +266,7 @@ ipcMain.on('end-wp-and-exit-app', async (event) => { if (proxyMode === 'tune' && isSingBoxRunning) { isSingBoxRunning = !(await singBoxManager.stopSingBox()); if (isSingBoxRunning) { - event.reply('guide-toast', 'Failed to stop Sing-Box'); + event.reply('guide-toast', appLang.log.error_singbox_failed_stop); event.reply('wp-end', false); event.reply('wp-start', true); } else {