diff --git a/src/components/profile/file-input.tsx b/src/components/profile/file-input.tsx index 5d8511b7..1315d7a5 100644 --- a/src/components/profile/file-input.tsx +++ b/src/components/profile/file-input.tsx @@ -42,7 +42,7 @@ export const FileInput = (props: Props) => { sx={{ flex: "none" }} onClick={() => inputRef.current?.click()} > - {t("Choose File")} + {t("components.profile.fileInput.chooseFile")} ( - {t("Type")} - Remote Local @@ -247,7 +257,11 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { name="name" control={control} render={({ field }) => ( - + )} /> @@ -255,7 +269,11 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { name="desc" control={control} render={({ field }) => ( - + )} /> @@ -269,7 +287,7 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { {...text} {...field} multiline - label={t("Subscription URL")} + label={t("components.profile.viewer.fields.subscriptionUrl")} /> )} /> @@ -296,7 +314,7 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { {...field} type="number" placeholder="60" - label={t("HTTP Request Timeout")} + label={t("components.profile.viewer.fields.httpTimeout")} slotProps={{ input: { endAdornment: ( @@ -321,7 +339,7 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { {...text} {...field} type="number" - label={t("Update Interval")} + label={t("components.profile.viewer.fields.updateInterval")} slotProps={{ input: { endAdornment: ( @@ -350,7 +368,9 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { control={control} render={({ field }) => ( - {t("Use System Proxy")} + + {t("components.profile.viewer.fields.useSystemProxy")} + )} @@ -361,7 +381,9 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { control={control} render={({ field }) => ( - {t("Use Clash Proxy")} + + {t("components.profile.viewer.fields.useClashProxy")} + )} @@ -372,7 +394,9 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { control={control} render={({ field }) => ( - {t("Accept Invalid Certs (Danger)")} + + {t("components.profile.viewer.fields.acceptInvalidCerts")} + )} @@ -383,7 +407,9 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) { control={control} render={({ field }) => ( - {t("Allow Auto Update")} + + {t("components.profile.viewer.fields.allowAutoUpdate")} + )} diff --git a/src/locales/ar.json b/src/locales/ar.json index 1e28a6cf..ec563cde 100644 --- a/src/locales/ar.json +++ b/src/locales/ar.json @@ -72,6 +72,44 @@ "trigger": "مزود القواعد", "dialogTitle": "مزود القواعد" } + }, + "profiles": { + "title": "الملفات الشخصية", + "actions": { + "updateAll": "تحديث جميع الملفات الشخصية", + "viewRuntimeConfig": "عرض تكوين وقت التشغيل", + "reactivate": "إعادة تنشيط الملفات الشخصية", + "import": "استيراد", + "new": "جديد" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "رابط الملف الشخصي", + "paste": "لصق", + "clear": "مسح" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "لا يتم دعم سوى ملفات YAML" + }, + "notifications": { + "importRetry": "Import failed, retrying with Clash proxy...", + "importFail": "Import failed even with Clash proxy", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "تم التبديل إلى الملف الشخصي", + "profileReactivated": "تم إعادة تنشيط الملف الشخصي", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "Home", @@ -802,6 +840,37 @@ "invalidRule": "قاعدة غير صالحة" } } + }, + "profile": { + "viewer": { + "title": { + "create": "إنشاء ملف شخصي", + "edit": "تعديل الملف الشخصي" + }, + "buttons": { + "save": "حفظ", + "cancel": "إلغاء" + }, + "fields": { + "type": "النوع", + "name": "الاسم", + "description": "الوصف", + "subscriptionUrl": "رابط الاشتراك", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "فاصل التحديث", + "useSystemProxy": "استخدام وكيل النظام", + "useClashProxy": "استخدام وكيل Clash", + "acceptInvalidCerts": "قبول الشهادات غير الصالحة (خطر)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profile creation failed, retrying with Clash proxy...", + "creationSuccess": "Profile creation succeeded with Clash proxy" + } + }, + "fileInput": { + "chooseFile": "اختر ملف" + } } } } diff --git a/src/locales/de.json b/src/locales/de.json index c95a76b8..41fee5cf 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -72,6 +72,44 @@ "trigger": "Regelsammlung", "dialogTitle": "Regelsammlung" } + }, + "profiles": { + "title": "Abonnement", + "actions": { + "updateAll": "Alle Abonnements aktualisieren", + "viewRuntimeConfig": "Laufzeit-Abonnement anzeigen", + "reactivate": "Abonnement erneut aktivieren", + "import": "Importieren", + "new": "Neu" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "Abonnement-Datei-Link", + "paste": "Einfügen", + "clear": "Löschen" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "Nur YAML-Dateien werden unterstützt" + }, + "notifications": { + "importRetry": "Import des Abonnements fehlgeschlagen. Versuche es mit dem Clash-Proxy erneut...", + "importFail": "Import des Abonnements auch mit Clash-Proxy fehlgeschlagen", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Abonnement gewechselt", + "profileReactivated": "Abonnement erneut aktiviert", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "Startseite", @@ -802,6 +840,37 @@ "invalidRule": "Ungültige Regel" } } + }, + "profile": { + "viewer": { + "title": { + "create": "Neue Konfiguration erstellen", + "edit": "Konfiguration bearbeiten" + }, + "buttons": { + "save": "Speichern", + "cancel": "Abbrechen" + }, + "fields": { + "type": "Typ", + "name": "Name", + "description": "Beschreibung", + "subscriptionUrl": "Abonnement-Link", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "Aktualisierungsintervall", + "useSystemProxy": "Systemproxy zur Aktualisierung verwenden", + "useClashProxy": "Kernel-Proxy zur Aktualisierung verwenden", + "acceptInvalidCerts": "Allows Invalid Certificates (Danger)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Erstellung des Abonnements fehlgeschlagen. Versuche es mit dem Clash-Proxy erneut...", + "creationSuccess": "Erstellung des Abonnements mit Clash-Proxy erfolgreich" + } + }, + "fileInput": { + "chooseFile": "Datei auswählen" + } } } } diff --git a/src/locales/en.json b/src/locales/en.json index a529c4c5..a31c96b0 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -72,6 +72,44 @@ "trigger": "Rule Provider", "dialogTitle": "Rule Providers" } + }, + "profiles": { + "title": "Profiles", + "actions": { + "updateAll": "Update All Profiles", + "viewRuntimeConfig": "View Runtime Config", + "reactivate": "Reactivate Profiles", + "import": "Import", + "new": "New" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "Profile URL", + "paste": "Paste", + "clear": "Clear" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "Only YAML Files Supported" + }, + "notifications": { + "importRetry": "Import failed, retrying with Clash proxy...", + "importFail": "Import failed even with Clash proxy", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Profile Switched", + "profileReactivated": "Profile Reactivated", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "Home", @@ -802,6 +840,37 @@ "invalidRule": "Invalid Rule" } } + }, + "profile": { + "viewer": { + "title": { + "create": "Create Profile", + "edit": "Edit Profile" + }, + "buttons": { + "save": "Save", + "cancel": "Cancel" + }, + "fields": { + "type": "Type", + "name": "Name", + "description": "Descriptions", + "subscriptionUrl": "Subscription URL", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "Update Interval", + "useSystemProxy": "Use System Proxy", + "useClashProxy": "Use Clash Proxy", + "acceptInvalidCerts": "Allows Invalid Certificates (Danger)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profile creation failed, retrying with Clash proxy...", + "creationSuccess": "Profile creation succeeded with Clash proxy" + } + }, + "fileInput": { + "chooseFile": "Choose File" + } } } } diff --git a/src/locales/es.json b/src/locales/es.json index 2c511fa9..38b89706 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -72,6 +72,44 @@ "trigger": "Proveedor de reglas", "dialogTitle": "Proveedor de reglas" } + }, + "profiles": { + "title": "Suscripciones", + "actions": { + "updateAll": "Actualizar todas las suscripciones", + "viewRuntimeConfig": "Ver configuración en tiempo de ejecución", + "reactivate": "Reactivar suscripciones", + "import": "Importar", + "new": "Nuevo" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "Enlace del archivo de suscripción", + "paste": "Pegar", + "clear": "Limpiar" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "Solo se admiten archivos YAML" + }, + "notifications": { + "importRetry": "Error al importar la suscripción. Intentando con el proxy de Clash...", + "importFail": "Error al importar incluso con el proxy de Clash", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Suscripción cambiada", + "profileReactivated": "Suscripción reactivada", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "Hogar", @@ -802,6 +840,37 @@ "invalidRule": "Regla no válida" } } + }, + "profile": { + "viewer": { + "title": { + "create": "Crear configuración", + "edit": "Editar configuración" + }, + "buttons": { + "save": "Guardar", + "cancel": "Cancelar" + }, + "fields": { + "type": "Tipo", + "name": "Nombre", + "description": "Descripción", + "subscriptionUrl": "Enlace de suscripción", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "Intervalo de actualización", + "useSystemProxy": "Usar proxy del sistema para actualizar", + "useClashProxy": "Usar proxy del núcleo para actualizar", + "acceptInvalidCerts": "Allows Invalid Certificates (Danger)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Error al crear la suscripción. Intentando con el proxy de Clash...", + "creationSuccess": "Creación de la suscripción con el proxy de Clash exitosa" + } + }, + "fileInput": { + "chooseFile": "Elegir archivo" + } } } } diff --git a/src/locales/fa.json b/src/locales/fa.json index 33e3bef4..b3a5763f 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -72,6 +72,44 @@ "trigger": "تأمین‌کننده قانون", "dialogTitle": "تأمین‌کننده قانون" } + }, + "profiles": { + "title": "پروفایل‌ها", + "actions": { + "updateAll": "به‌روزرسانی همه پروفایل‌ها", + "viewRuntimeConfig": "مشاهده پیکربندی زمان اجرا", + "reactivate": "فعال‌سازی مجدد پروفایل‌ها", + "import": "وارد کردن", + "new": "جدید" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "آدرس پروفایل", + "paste": "چسباندن", + "clear": "پاک کردن" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "فقط فایل‌های YAML پشتیبانی می‌شوند" + }, + "notifications": { + "importRetry": "Import failed, retrying with Clash proxy...", + "importFail": "Import failed even with Clash proxy", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "پروفایل تغییر یافت", + "profileReactivated": "پروفایل مجدداً فعال شد", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "Home", @@ -802,6 +840,37 @@ "invalidRule": "قانون نامعتبر" } } + }, + "profile": { + "viewer": { + "title": { + "create": "ایجاد پروفایل", + "edit": "ویرایش پروفایل" + }, + "buttons": { + "save": "ذخیره", + "cancel": "لغو" + }, + "fields": { + "type": "نوع", + "name": "نام", + "description": "توضیحات", + "subscriptionUrl": "آدرس اشتراک", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "فاصله زمانی به‌روزرسانی", + "useSystemProxy": "استفاده از پراکسی سیستم", + "useClashProxy": "استفاده از پراکسی Clash", + "acceptInvalidCerts": "پذیرش گواهی‌نامه‌های نامعتبر (خطرناک)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profile creation failed, retrying with Clash proxy...", + "creationSuccess": "Profile creation succeeded with Clash proxy" + } + }, + "fileInput": { + "chooseFile": "انتخاب فایل" + } } } } diff --git a/src/locales/id.json b/src/locales/id.json index a1d7b20e..5fae6e1e 100644 --- a/src/locales/id.json +++ b/src/locales/id.json @@ -72,6 +72,44 @@ "trigger": "Penyedia Aturan", "dialogTitle": "Penyedia Aturan" } + }, + "profiles": { + "title": "Profil", + "actions": { + "updateAll": "Perbarui Semua Profil", + "viewRuntimeConfig": "Lihat Konfigurasi Runtime", + "reactivate": "Reaktivasi Profil", + "import": "Impor", + "new": "Baru" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "URL Profil", + "paste": "Tempel", + "clear": "Bersihkan" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "Hanya File YAML yang Didukung" + }, + "notifications": { + "importRetry": "Import failed, retrying with Clash proxy...", + "importFail": "Import failed even with Clash proxy", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Profil Beralih", + "profileReactivated": "Profil Diaktifkan Kembali", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "Home", @@ -802,6 +840,37 @@ "invalidRule": "Aturan Tidak Valid" } } + }, + "profile": { + "viewer": { + "title": { + "create": "Buat Profil", + "edit": "Ubah Profil" + }, + "buttons": { + "save": "Simpan", + "cancel": "Batal" + }, + "fields": { + "type": "Jenis", + "name": "Nama", + "description": "Deskripsi", + "subscriptionUrl": "URL Langganan", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "Interval Pembaruan", + "useSystemProxy": "Gunakan Proksi Sistem", + "useClashProxy": "Gunakan Proksi Clash", + "acceptInvalidCerts": "Terima Sertifikat Tidak Valid (Bahaya)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profile creation failed, retrying with Clash proxy...", + "creationSuccess": "Profile creation succeeded with Clash proxy" + } + }, + "fileInput": { + "chooseFile": "Pilih Berkas" + } } } } diff --git a/src/locales/jp.json b/src/locales/jp.json index bc7ad2bf..0cadd345 100644 --- a/src/locales/jp.json +++ b/src/locales/jp.json @@ -72,6 +72,44 @@ "trigger": "ルールプロバイダー", "dialogTitle": "ルールプロバイダー" } + }, + "profiles": { + "title": "プロファイル", + "actions": { + "updateAll": "すべてのプロファイルを更新", + "viewRuntimeConfig": "実行時のプロファイルを表示", + "reactivate": "プロファイルを再アクティブ化", + "import": "インポート", + "new": "新規作成" + }, + "batch": { + "title": "バッチ操作", + "delete": "選択したプロファイルを削除", + "selectAll": "すべて選択", + "deselectAll": "すべての選択を解除", + "done": "完了", + "selected": "選択済み", + "items": "アイテム" + }, + "import": { + "placeholder": "プロファイルファイルのURL", + "paste": "貼り付け", + "clear": "クリア" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "YAMLファイルのみサポートされています。" + }, + "notifications": { + "importRetry": "インポートに失敗しました。Clashプロキシを使用して再試行します...", + "importFail": "Clashプロキシを使用してもインポートに失敗しました。", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "プロファイルが切り替えられました。", + "profileReactivated": "プロファイルが再アクティブ化されました。", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "選択したプロファイルが正常に削除されました" + } } }, "Label-Home": "ホーム", @@ -802,6 +840,37 @@ "invalidRule": "無効なルール" } } + }, + "profile": { + "viewer": { + "title": { + "create": "新規プロファイルを作成", + "edit": "プロファイルを編集" + }, + "buttons": { + "save": "保存", + "cancel": "キャンセル" + }, + "fields": { + "type": "タイプ", + "name": "名前", + "description": "説明", + "subscriptionUrl": "サブスクリプションURL", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "更新間隔", + "useSystemProxy": "システムプロキシを使用して更新", + "useClashProxy": "クラッシュプロキシを使用して更新", + "acceptInvalidCerts": "Allows Invalid Certificates (Danger)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "プロファイルの作成に失敗しました。Clashプロキシを使用して再試行します...", + "creationSuccess": "Clashプロキシを使用してプロファイルの作成に成功しました。" + } + }, + "fileInput": { + "chooseFile": "ファイルを選択" + } } } } diff --git a/src/locales/ko.json b/src/locales/ko.json index b9dce9ff..af7ede43 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -72,6 +72,44 @@ "trigger": "규칙 제공자", "dialogTitle": "규칙 제공자" } + }, + "profiles": { + "title": "프로필", + "actions": { + "updateAll": "모든 프로필 업데이트", + "viewRuntimeConfig": "런타임 설정 보기", + "reactivate": "프로필 재활성화", + "import": "가져오기", + "new": "새로 만들기" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "프로필 URL", + "paste": "붙여넣기", + "clear": "지우기" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "Only YAML Files Supported" + }, + "notifications": { + "importRetry": "Import failed, retrying with Clash proxy...", + "importFail": "Import failed even with Clash proxy", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Profile Switched", + "profileReactivated": "Profile Reactivated", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "홈", @@ -802,6 +840,37 @@ "invalidRule": "잘못된 규칙" } } + }, + "profile": { + "viewer": { + "title": { + "create": "프로필 생성", + "edit": "프로필 편집" + }, + "buttons": { + "save": "저장", + "cancel": "취소" + }, + "fields": { + "type": "유형", + "name": "이름", + "description": "설명", + "subscriptionUrl": "구독 URL", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "업데이트 간격", + "useSystemProxy": "시스템 프록시 사용", + "useClashProxy": "Clash 프록시 사용", + "acceptInvalidCerts": "잘못된 인증서 허용(위험)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profile creation failed, retrying with Clash proxy...", + "creationSuccess": "Profile creation succeeded with Clash proxy" + } + }, + "fileInput": { + "chooseFile": "파일 선택" + } } } } diff --git a/src/locales/ru.json b/src/locales/ru.json index d2c0c300..2838931c 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -72,6 +72,44 @@ "trigger": "Провайдеры правил", "dialogTitle": "Провайдеры правил" } + }, + "profiles": { + "title": "Профили", + "actions": { + "updateAll": "Обновить все профили", + "viewRuntimeConfig": "Просмотреть используемый конфиг", + "reactivate": "Перезапустить профиль", + "import": "Импорт", + "new": "Новый" + }, + "batch": { + "title": "Пакетные операции", + "delete": "Удалить выбранные профили", + "selectAll": "Выбрать все", + "deselectAll": "Отменить выбор всех", + "done": "Готово", + "selected": "Выбрано", + "items": "элементы" + }, + "import": { + "placeholder": "URL профиля", + "paste": "Вставить", + "clear": "Очистить" + }, + "errors": { + "invalidUrl": "Недопустимая ссылка на профиль, введите адрес, начинающийся с http:// или https://", + "onlyYaml": "Поддерживаются только файлы YAML" + }, + "notifications": { + "importRetry": "Import failed, retrying with Clash proxy...", + "importFail": "Import failed even with Clash proxy", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Профиль изменен", + "profileReactivated": "Профиль перезапущен", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Выбранные профили успешно удалены" + } } }, "Label-Home": "Главная", @@ -802,6 +840,37 @@ "invalidRule": "Недействительное правило" } } + }, + "profile": { + "viewer": { + "title": { + "create": "Создать профиль", + "edit": "Изменить профиль" + }, + "buttons": { + "save": "Сохранить", + "cancel": "Отмена" + }, + "fields": { + "type": "Тип", + "name": "Название", + "description": "Описание", + "subscriptionUrl": "URL подписки", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "Интервал обновления", + "useSystemProxy": "Использовать системный прокси для обновления", + "useClashProxy": "Использовать прокси Clash для обновления", + "acceptInvalidCerts": "Принимать недействительные сертификаты (ОПАСНО)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profile creation failed, retrying with Clash proxy...", + "creationSuccess": "Profile creation succeeded with Clash proxy" + } + }, + "fileInput": { + "chooseFile": "Выбрать файл" + } } } } diff --git a/src/locales/tr.json b/src/locales/tr.json index bf61c1ca..8addb200 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -72,6 +72,44 @@ "trigger": "Kural Sağlayıcısı", "dialogTitle": "Kural Sağlayıcısı" } + }, + "profiles": { + "title": "Profiller", + "actions": { + "updateAll": "Tüm Profilleri Güncelle", + "viewRuntimeConfig": "Çalışma Zamanı Yapılandırmasını Görüntüle", + "reactivate": "Profilleri Yeniden Etkinleştir", + "import": "İçe Aktar", + "new": "Yeni" + }, + "batch": { + "title": "Toplu İşlemler", + "delete": "Seçili Profilleri Sil", + "selectAll": "Tümünü Seç", + "deselectAll": "Tüm Seçimi Kaldır", + "done": "Tamam", + "selected": "Seçildi", + "items": "öğeler" + }, + "import": { + "placeholder": "Profil URL'si", + "paste": "Yapıştır", + "clear": "Temizle" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "Yalnızca YAML Dosyaları Desteklenir" + }, + "notifications": { + "importRetry": "İçe aktarma başarısız oldu, Clash vekil ile yeniden deneniyor...", + "importFail": "Clash vekil ile bile içe aktarma başarısız oldu", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Profil Değiştirildi", + "profileReactivated": "Profil Yeniden Etkinleştirildi", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Seçili profiller başarıyla silindi" + } } }, "Label-Home": "Ana Sayfa", @@ -802,6 +840,37 @@ "invalidRule": "Geçersiz Kural" } } + }, + "profile": { + "viewer": { + "title": { + "create": "Profil Oluştur", + "edit": "Profili Düzenle" + }, + "buttons": { + "save": "Kaydet", + "cancel": "İptal" + }, + "fields": { + "type": "Tip", + "name": "İsim", + "description": "Açıklamalar", + "subscriptionUrl": "Abonelik URL'si", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "Güncelleme Aralığı", + "useSystemProxy": "Sistem Vekil'ini Kullan", + "useClashProxy": "Clash Vekil'ini Kullan", + "acceptInvalidCerts": "Geçersiz Sertifikalara İzin Ver (Tehlikeli)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profil oluşturma başarısız oldu, Clash vekil ile yeniden deneniyor...", + "creationSuccess": "Clash vekil ile profil oluşturma başarılı oldu" + } + }, + "fileInput": { + "chooseFile": "Dosya Seç" + } } } } diff --git a/src/locales/tt.json b/src/locales/tt.json index 7431811e..df3a4c1c 100644 --- a/src/locales/tt.json +++ b/src/locales/tt.json @@ -72,6 +72,44 @@ "trigger": "Кагыйдә провайдеры", "dialogTitle": "Кагыйдә провайдеры" } + }, + "profiles": { + "title": "Профильләр", + "actions": { + "updateAll": "Барлык профильләрне яңарту", + "viewRuntimeConfig": "Кулланылган конфигурацияне карау", + "reactivate": "Профильләрне янәдән активлаштыру", + "import": "Импорт", + "new": "Яңа" + }, + "batch": { + "title": "Batch Operations", + "delete": "Delete Selected Profiles", + "selectAll": "Select All", + "deselectAll": "Deselect All", + "done": "Done", + "selected": "Selected", + "items": "items" + }, + "import": { + "placeholder": "Профиль URL-ы", + "paste": "Кую", + "clear": "Чистарту" + }, + "errors": { + "invalidUrl": "Invalid profile URL. Please enter a URL starting with http:// or https://", + "onlyYaml": "Фәкать YAML-файллар гына хуплана" + }, + "notifications": { + "importRetry": "Import failed, retrying with Clash proxy...", + "importFail": "Import failed even with Clash proxy", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "Профиль алмаштырылды", + "profileReactivated": "Профиль яңадан активлаштырылды", + "switchInterrupted": "Profile switch interrupted by new selection", + "batchDeleted": "Selected profiles deleted successfully" + } } }, "Label-Home": "Home", @@ -802,6 +840,37 @@ "invalidRule": "Яраксыз кагыйдә" } } + }, + "profile": { + "viewer": { + "title": { + "create": "Профиль булдыру", + "edit": "Профильне үзгәртү" + }, + "buttons": { + "save": "Саклау", + "cancel": "Баш тарту" + }, + "fields": { + "type": "Төр", + "name": "Исем", + "description": "Тасвирламалар", + "subscriptionUrl": "Подписка URL-ы", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "Яңарту интервалы", + "useSystemProxy": "Системалы проксины кулланып яңарту", + "useClashProxy": "Clash прокси кулланып яңарту", + "acceptInvalidCerts": "Дөрес булмаган сертификатларны кабул итү (Куркыныч)", + "allowAutoUpdate": "Allow Auto Update" + }, + "notifications": { + "creationRetry": "Profile creation failed, retrying with Clash proxy...", + "creationSuccess": "Profile creation succeeded with Clash proxy" + } + }, + "fileInput": { + "chooseFile": "Файл сайлау" + } } } } diff --git a/src/locales/zh.json b/src/locales/zh.json index 07a743d2..bd319ccd 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -72,6 +72,44 @@ "trigger": "规则集合", "dialogTitle": "规则集合" } + }, + "profiles": { + "title": "订阅", + "actions": { + "updateAll": "更新所有订阅", + "viewRuntimeConfig": "查看运行时订阅", + "reactivate": "重新激活订阅", + "import": "导入", + "new": "新建" + }, + "batch": { + "title": "批量操作", + "delete": "删除选中订阅", + "selectAll": "全选", + "deselectAll": "取消全选", + "done": "完成", + "selected": "已选中", + "items": "项目" + }, + "import": { + "placeholder": "订阅文件链接", + "paste": "粘贴", + "clear": "清除" + }, + "errors": { + "invalidUrl": "无效的订阅链接,请输入以 http:// 或 https:// 开头的地址", + "onlyYaml": "仅支持 YAML 文件" + }, + "notifications": { + "importRetry": "订阅导入失败,尝试使用 Clash 代理导入", + "importFail": "使用 Clash 代理导入订阅也失败", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "订阅已切换", + "profileReactivated": "订阅已激活", + "switchInterrupted": "配置切换被新选择中断", + "batchDeleted": "选中的订阅已成功删除" + } } }, "Label-Home": "首 页", @@ -802,6 +840,37 @@ "invalidRule": "无效规则" } } + }, + "profile": { + "viewer": { + "title": { + "create": "新建配置", + "edit": "编辑配置" + }, + "buttons": { + "save": "保存", + "cancel": "取消" + }, + "fields": { + "type": "类型", + "name": "名称", + "description": "描述", + "subscriptionUrl": "订阅链接", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "更新间隔", + "useSystemProxy": "使用系统代理更新", + "useClashProxy": "使用内核代理更新", + "acceptInvalidCerts": "允许无效证书(危险)", + "allowAutoUpdate": "允许自动更新" + }, + "notifications": { + "creationRetry": "订阅创建失败,尝试使用 Clash 代理创建", + "creationSuccess": "使用 Clash 代理创建订阅成功" + } + }, + "fileInput": { + "chooseFile": "选择文件" + } } } } diff --git a/src/locales/zhtw.json b/src/locales/zhtw.json index a4009e2c..6dee439d 100644 --- a/src/locales/zhtw.json +++ b/src/locales/zhtw.json @@ -72,6 +72,44 @@ "trigger": "規則集合", "dialogTitle": "規則集合" } + }, + "profiles": { + "title": "訂閱", + "actions": { + "updateAll": "更新所有訂閱", + "viewRuntimeConfig": "查看執行時訂閱", + "reactivate": "重新啟用訂閱", + "import": "匯入", + "new": "新增" + }, + "batch": { + "title": "批次操作", + "delete": "刪除選取訂閱", + "selectAll": "全選", + "deselectAll": "取消選取", + "done": "完成", + "selected": "已選取", + "items": "項目" + }, + "import": { + "placeholder": "訂閱檔網址", + "paste": "貼上", + "clear": "清除" + }, + "errors": { + "invalidUrl": "無效的訂閱網址,請輸入以 http:// 或 https:// 開頭的位址", + "onlyYaml": "僅支援 YAML 檔案" + }, + "notifications": { + "importRetry": "訂閱匯入失敗,嘗試使用 Clash 代理匯入", + "importFail": "使用 Clash 代理匯入訂閱也失敗", + "importNeedsRefresh": "Profile imported but may need manual refresh", + "importSuccess": "Profile imported successfully, please restart if not visible", + "profileSwitched": "訂閱已切換", + "profileReactivated": "訂閱已啟用", + "switchInterrupted": "配置切換被新的選擇中斷", + "batchDeleted": "選取的訂閱已成功刪除" + } } }, "Label-Home": "首 頁", @@ -802,6 +840,37 @@ "invalidRule": "無效規則" } } + }, + "profile": { + "viewer": { + "title": { + "create": "新增設定檔", + "edit": "編輯設定檔" + }, + "buttons": { + "save": "儲存", + "cancel": "取消" + }, + "fields": { + "type": "類型", + "name": "名稱", + "description": "描述", + "subscriptionUrl": "訂閱網址", + "httpTimeout": "HTTP Request Timeout", + "updateInterval": "更新間隔", + "useSystemProxy": "使用系統代理更新", + "useClashProxy": "使用內核代理更新", + "acceptInvalidCerts": "允許無效憑證(危險)", + "allowAutoUpdate": "允許自動更新" + }, + "notifications": { + "creationRetry": "訂閱建立失敗,嘗試使用 Clash 代理建立", + "creationSuccess": "使用 Clash 代理建立訂閱成功" + } + }, + "fileInput": { + "chooseFile": "選擇檔案" + } } } } diff --git a/src/pages/profiles.tsx b/src/pages/profiles.tsx index 2c904321..b92ee2c9 100644 --- a/src/pages/profiles.tsx +++ b/src/pages/profiles.tsx @@ -253,7 +253,7 @@ const ProfilePage = () => { setActivatings((prev) => prev.filter((id) => id !== previousSwitching)); showNotice( "info", - `${t("Profile switch interrupted by new selection")}: ${previousSwitching} → ${newProfile}`, + `${t("pages.profiles.notifications.switchInterrupted")}: ${previousSwitching} → ${newProfile}`, 3000, ); }, @@ -297,7 +297,7 @@ const ProfilePage = () => { for (const file of paths) { if (!file.endsWith(".yaml") && !file.endsWith(".yml")) { - showNotice("error", t("Only YAML Files Supported")); + showNotice("error", t("pages.profiles.errors.onlyYaml")); continue; } const item = { @@ -385,7 +385,7 @@ const ProfilePage = () => { if (!url) return; // 校验url是否为http/https if (!/^https?:\/\//i.test(url)) { - showNotice("error", t("Invalid Profile URL")); + showNotice("error", t("pages.profiles.errors.invalidUrl")); return; } setLoading(true); @@ -439,7 +439,7 @@ const ProfilePage = () => { } // 首次导入失败且未检测到数据变更,尝试使用自身代理 - showNotice("info", t("Import failed, retrying with Clash proxy...")); + showNotice("info", t("pages.profiles.notifications.importRetry")); try { // 使用自身代理尝试导入 await importProfile(url, { @@ -452,7 +452,7 @@ const ProfilePage = () => { const retryErrmsg = retryErr?.message || retryErr.toString(); showNotice( "error", - `${t("Import failed even with Clash proxy")}: ${retryErrmsg}`, + `${t("pages.profiles.notifications.importFail")}: ${retryErrmsg}`, ); } } finally { @@ -524,14 +524,14 @@ const ProfilePage = () => { await onEnhance(false); showNotice( "error", - t("Profile imported but may need manual refresh"), + t("pages.profiles.notifications.importNeedsRefresh"), 3000, ); } catch (finalError) { console.error(`[导入刷新] 最终刷新尝试失败:`, finalError); showNotice( "error", - t("Profile imported successfully, please restart if not visible"), + t("pages.profiles.notifications.importSuccess"), 5000, ); } @@ -650,7 +650,11 @@ const ProfilePage = () => { closeAllConnections(); if (notifySuccess && success) { - showNotice("success", t("Profile Switched"), 1000); + showNotice( + "success", + t("pages.profiles.notifications.profileSwitched"), + 1000, + ); } console.log( @@ -747,7 +751,11 @@ const ProfilePage = () => { await enhanceProfiles(); mutateLogs(); if (notifySuccess) { - showNotice("success", t("Profile Reactivated"), 1000); + showNotice( + "success", + t("pages.profiles.notifications.profileReactivated"), + 1000, + ); } } catch (err: any) { showNotice("error", err.message || err.toString(), 3000); @@ -886,7 +894,7 @@ const ProfilePage = () => { setSelectedProfiles(new Set()); setBatchMode(false); - showNotice("success", t("Selected profiles deleted successfully")); + showNotice("success", t("pages.profiles.notifications.batchDeleted")); } catch (err: any) { showNotice("error", err?.message || err.toString()); } finally { @@ -966,7 +974,7 @@ const ProfilePage = () => { return ( @@ -976,7 +984,7 @@ const ProfilePage = () => { @@ -985,7 +993,7 @@ const ProfilePage = () => { @@ -994,7 +1002,7 @@ const ProfilePage = () => { configRef.current?.open()} > @@ -1003,7 +1011,7 @@ const ProfilePage = () => { onEnhance(true)} > @@ -1035,7 +1043,11 @@ const ProfilePage = () => { { - {t("Selected")} {selectedProfiles.size} {t("items")} + {t("pages.profiles.batch.selected")} {selectedProfiles.size}{" "} + {t("pages.profiles.batch.items")} )} @@ -1096,7 +1109,7 @@ const ProfilePage = () => { event.preventDefault(); void onImport(); }} - placeholder={t("Profile URL")} + placeholder={t("pages.profiles.import.placeholder")} slotProps={{ input: { sx: { pr: 1 }, @@ -1104,7 +1117,7 @@ const ProfilePage = () => { @@ -1113,7 +1126,7 @@ const ProfilePage = () => { setUrl("")} > @@ -1130,7 +1143,7 @@ const ProfilePage = () => { sx={{ borderRadius: "6px" }} onClick={onImport} > - {t("Import")} + {t("pages.profiles.actions.import")}