From 6638ac4a1edf6bacd294aee27ecac7ade60c58d5 Mon Sep 17 00:00:00 2001 From: Sanaei Date: Tue, 18 Aug 2026 12:27:33 +0200 Subject: [PATCH] i18n: translate importKeepHostSettings keys Translate the `importKeepHostSettings` and `importKeepHostSettingsDesc` keys from English placeholders into 10 locale files (ar-EG, es-ES, fa-IR, id-ID, ja-JP, pt-BR, tr-TR, vi-VN, zh-CN, zh-TW). Also removes `main_test.go` which contained a test for a `commandHelp` function. --- internal/web/translation/ar-EG.json | 4 ++-- internal/web/translation/es-ES.json | 4 ++-- internal/web/translation/fa-IR.json | 4 ++-- internal/web/translation/id-ID.json | 4 ++-- internal/web/translation/ja-JP.json | 4 ++-- internal/web/translation/pt-BR.json | 4 ++-- internal/web/translation/tr-TR.json | 4 ++-- internal/web/translation/vi-VN.json | 4 ++-- internal/web/translation/zh-CN.json | 4 ++-- internal/web/translation/zh-TW.json | 4 ++-- main_test.go | 12 ------------ 11 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 main_test.go diff --git a/internal/web/translation/ar-EG.json b/internal/web/translation/ar-EG.json index afab8d6d7..ddacdeaf6 100644 --- a/internal/web/translation/ar-EG.json +++ b/internal/web/translation/ar-EG.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "الاحتفاظ بإعدادات هذا الجهاز", + "importKeepHostSettingsDesc": "يحتفظ بعناوين الاستماع والمنافذ والمسار الأساسي والشهادات وهوية العقدة الخاصة بهذه اللوحة بدلًا من أخذها من الملف المرفوع." }, "inbounds": { "totalDownUp": "إجمالي المرسل/المستقبل", diff --git a/internal/web/translation/es-ES.json b/internal/web/translation/es-ES.json index 53c75d26f..82c7db697 100644 --- a/internal/web/translation/es-ES.json +++ b/internal/web/translation/es-ES.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "Mantener la configuración de esta máquina", + "importKeepHostSettingsDesc": "Conserva las direcciones de escucha, los puertos, la ruta base, los certificados y la identidad de nodo de este panel en lugar de tomarlos del archivo subido." }, "inbounds": { "totalDownUp": "Subidas/Descargas Totales", diff --git a/internal/web/translation/fa-IR.json b/internal/web/translation/fa-IR.json index d8b3a5a2c..dc4a375cd 100644 --- a/internal/web/translation/fa-IR.json +++ b/internal/web/translation/fa-IR.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "حفظ تنظیمات این دستگاه", + "importKeepHostSettingsDesc": "آدرس‌ها و پورت‌های شنود، مسیر پایه، گواهی‌ها و هویت نودِ همین پنل را نگه می‌دارد و آن‌ها را از فایل بارگذاری‌شده نمی‌گیرد." }, "inbounds": { "totalDownUp": "دریافت/ارسال کل", diff --git a/internal/web/translation/id-ID.json b/internal/web/translation/id-ID.json index a6bf29282..59c76a126 100644 --- a/internal/web/translation/id-ID.json +++ b/internal/web/translation/id-ID.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "Pertahankan pengaturan mesin ini", + "importKeepHostSettingsDesc": "Mempertahankan alamat dengar, port, path dasar, sertifikat, dan identitas node panel ini alih-alih mengambilnya dari berkas yang diunggah." }, "inbounds": { "totalDownUp": "Total Terkirim/Diterima", diff --git a/internal/web/translation/ja-JP.json b/internal/web/translation/ja-JP.json index 4e3d4fd4b..56b6eebd6 100644 --- a/internal/web/translation/ja-JP.json +++ b/internal/web/translation/ja-JP.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "このマシンの設定を保持する", + "importKeepHostSettingsDesc": "アップロードしたファイルの値ではなく、このパネルのリッスンアドレス、ポート、ベースパス、証明書、ノード ID を保持します。" }, "inbounds": { "totalDownUp": "総アップロード / ダウンロード", diff --git a/internal/web/translation/pt-BR.json b/internal/web/translation/pt-BR.json index a74ca3d00..d7936f19b 100644 --- a/internal/web/translation/pt-BR.json +++ b/internal/web/translation/pt-BR.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "Manter as configurações desta máquina", + "importKeepHostSettingsDesc": "Mantém os endereços de escuta, as portas, o caminho base, os certificados e a identidade de nó deste painel em vez de obtê-los do arquivo enviado." }, "inbounds": { "totalDownUp": "Total Enviado/Recebido", diff --git a/internal/web/translation/tr-TR.json b/internal/web/translation/tr-TR.json index 06da96644..0e0475c45 100644 --- a/internal/web/translation/tr-TR.json +++ b/internal/web/translation/tr-TR.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "Bu makinenin ayarlarını koru", + "importKeepHostSettingsDesc": "Yüklenen dosyadan almak yerine bu panelin dinleme adreslerini, portlarını, temel yolunu, sertifikalarını ve düğüm kimliğini korur." }, "inbounds": { "totalDownUp": "Toplam Gönderilen/Alınan", diff --git a/internal/web/translation/vi-VN.json b/internal/web/translation/vi-VN.json index d3c8a858f..df7adf5bb 100644 --- a/internal/web/translation/vi-VN.json +++ b/internal/web/translation/vi-VN.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "Giữ cài đặt của máy này", + "importKeepHostSettingsDesc": "Giữ nguyên địa chỉ lắng nghe, cổng, đường dẫn cơ sở, chứng chỉ và danh tính node của bảng điều khiển này thay vì lấy chúng từ tệp đã tải lên." }, "inbounds": { "totalDownUp": "Tổng tải lên/tải xuống", diff --git a/internal/web/translation/zh-CN.json b/internal/web/translation/zh-CN.json index 68fef95a7..a45f3c6c2 100644 --- a/internal/web/translation/zh-CN.json +++ b/internal/web/translation/zh-CN.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "保留本机设置", + "importKeepHostSettingsDesc": "保留本面板的监听地址、端口、基础路径、证书和节点身份,而不是使用上传文件中的值。" }, "inbounds": { "totalDownUp": "总上传 / 下载", diff --git a/internal/web/translation/zh-TW.json b/internal/web/translation/zh-TW.json index 1d571748d..9320d8712 100644 --- a/internal/web/translation/zh-TW.json +++ b/internal/web/translation/zh-TW.json @@ -267,8 +267,8 @@ "accessDirect": "DIRECT", "accessBlocked": "BLOCKED", "accessProxy": "PROXY", - "importKeepHostSettings": "Keep this machine's settings", - "importKeepHostSettingsDesc": "Keeps this panel's listen addresses, ports, base path, certificates and node identity instead of taking them from the uploaded file." + "importKeepHostSettings": "保留本機設定", + "importKeepHostSettingsDesc": "保留本面板的監聽位址、連接埠、基礎路徑、憑證與節點身分,而不是使用上傳檔案中的值。" }, "inbounds": { "totalDownUp": "總上傳 / 下載", diff --git a/main_test.go b/main_test.go deleted file mode 100644 index 0d87091c5..000000000 --- a/main_test.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -import ( - "strings" - "testing" -) - -func TestCommandHelpListsEncryptTokens(t *testing.T) { - if help := commandHelp(); !strings.Contains(help, "encrypt-tokens") { - t.Fatalf("command help omits encrypt-tokens:\n%s", help) - } -}