From ef6d8d0fb8dd93a51e19897ebae74173d79a8164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 4 Feb 2026 18:55:03 +0800 Subject: [PATCH] Fix strings in OnDemandRulesView --- .../Views/Setting/OnDemandRulesView.swift | 12 +++---- Localizable.xcstrings | 32 ++++++++++++++++++- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/ApplicationLibrary/Views/Setting/OnDemandRulesView.swift b/ApplicationLibrary/Views/Setting/OnDemandRulesView.swift index 51213b8..8c38ac3 100644 --- a/ApplicationLibrary/Views/Setting/OnDemandRulesView.swift +++ b/ApplicationLibrary/Views/Setting/OnDemandRulesView.swift @@ -11,17 +11,17 @@ private enum OnDemandMode: String, CaseIterable, Identifiable { var name: String { switch self { - case .disabled: "Disabled" - case .alwaysOn: "Always On" - case .enabled: "Enabled" + case .disabled: String(localized: "Disabled") + case .alwaysOn: String(localized: "Always On") + case .enabled: String(localized: "Enabled") } } var description: String { switch self { - case .disabled: "VPN will not connect automatically." - case .alwaysOn: "Automatically connect VPN on any network." - case .enabled: "Automatically connect or disconnect VPN based on rules." + case .disabled: String(localized: "VPN will not connect automatically.") + case .alwaysOn: String(localized: "Automatically connect VPN on any network.") + case .enabled: String(localized: "Automatically connect or disconnect VPN based on rules.") } } } diff --git a/Localizable.xcstrings b/Localizable.xcstrings index ceb881e..0424fe1 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -287,6 +287,26 @@ } } }, + "Automatically connect or disconnect VPN based on rules." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "根据规则自动连接或断开 VPN 连接。" + } + } + } + }, + "Automatically connect VPN on any network." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "在任何网络上自动连接 VPN。" + } + } + } + }, "Browse" : { "localizations" : { "zh-Hans" : { @@ -2798,6 +2818,16 @@ } } }, + "VPN will not connect automatically." : { + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "VPN 不会自动连接。" + } + } + } + }, "What is QRS" : { "localizations" : { "zh-Hans" : { @@ -2860,4 +2890,4 @@ } }, "version" : "1.0" -} \ No newline at end of file +}