File tree Expand file tree Collapse file tree 2 files changed +101
-5
lines changed
Expand file tree Collapse file tree 2 files changed +101
-5
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ struct ControlWidgetsControl: ControlWidget {
2323 isOn: isConnected,
2424 action: ToggleVPNIntent ( )
2525 ) { isOn in
26- Label ( isOn ? " Connected " : " Disconnected " , systemImage: " network " )
27- . controlWidgetActionHint ( isOn ? " Disconnect " : " Connect " )
26+ Label ( isOn ? LocalizedStringResource ( " vpn_connected " ) : LocalizedStringResource ( " vpn_disconnected " ) , systemImage: " network " )
27+ . controlWidgetActionHint ( isOn ? LocalizedStringResource ( " vpn_disconnect " ) : LocalizedStringResource ( " vpn_connect " ) )
2828 }
2929 }
3030 . displayName ( " EasyTier " )
31- . description ( " Toggle VPN connection " )
31+ . description ( LocalizedStringResource ( " toggle_vpn_connection " ) )
3232 }
3333}
3434
@@ -49,9 +49,9 @@ extension ControlWidgetsControl {
4949}
5050
5151struct ToggleVPNIntent : SetValueIntent {
52- static let title : LocalizedStringResource = " Toggle VPN "
52+ static let title : LocalizedStringResource = " toggle_vpn "
5353
54- @Parameter ( title: " Connected " )
54+ @Parameter ( title: LocalizedStringResource ( " vpn_connected " ) )
5555 var value : Bool
5656
5757 func perform( ) async throws -> some IntentResult {
Original file line number Diff line number Diff line change 29372937 }
29382938 }
29392939 },
2940+ "toggle_vpn" : {
2941+ "localizations" : {
2942+ "en" : {
2943+ "stringUnit" : {
2944+ "state" : "translated",
2945+ "value" : "Toggle VPN"
2946+ }
2947+ },
2948+ "zh-Hans" : {
2949+ "stringUnit" : {
2950+ "state" : "translated",
2951+ "value" : "切换 VPN"
2952+ }
2953+ }
2954+ }
2955+ },
2956+ "toggle_vpn_connection" : {
2957+ "localizations" : {
2958+ "en" : {
2959+ "stringUnit" : {
2960+ "state" : "translated",
2961+ "value" : "Toggle VPN connection"
2962+ }
2963+ },
2964+ "zh-Hans" : {
2965+ "stringUnit" : {
2966+ "state" : "translated",
2967+ "value" : "切换 VPN 连接"
2968+ }
2969+ }
2970+ }
2971+ },
29402972 "tunnel_proto" : {
29412973 "localizations" : {
29422974 "en" : {
31453177 }
31463178 }
31473179 },
3180+ "vpn_connect" : {
3181+ "localizations" : {
3182+ "en" : {
3183+ "stringUnit" : {
3184+ "state" : "translated",
3185+ "value" : "Connect"
3186+ }
3187+ },
3188+ "zh-Hans" : {
3189+ "stringUnit" : {
3190+ "state" : "translated",
3191+ "value" : "连接"
3192+ }
3193+ }
3194+ }
3195+ },
3196+ "vpn_connected" : {
3197+ "localizations" : {
3198+ "en" : {
3199+ "stringUnit" : {
3200+ "state" : "translated",
3201+ "value" : "Connected"
3202+ }
3203+ },
3204+ "zh-Hans" : {
3205+ "stringUnit" : {
3206+ "state" : "translated",
3207+ "value" : "已连接"
3208+ }
3209+ }
3210+ }
3211+ },
3212+ "vpn_disconnect" : {
3213+ "localizations" : {
3214+ "en" : {
3215+ "stringUnit" : {
3216+ "state" : "translated",
3217+ "value" : "Disconnect"
3218+ }
3219+ },
3220+ "zh-Hans" : {
3221+ "stringUnit" : {
3222+ "state" : "translated",
3223+ "value" : "断开"
3224+ }
3225+ }
3226+ }
3227+ },
3228+ "vpn_disconnected" : {
3229+ "localizations" : {
3230+ "en" : {
3231+ "stringUnit" : {
3232+ "state" : "translated",
3233+ "value" : "Disconnected"
3234+ }
3235+ },
3236+ "zh-Hans" : {
3237+ "stringUnit" : {
3238+ "state" : "translated",
3239+ "value" : "已断开"
3240+ }
3241+ }
3242+ }
3243+ },
31483244 "vpn_portal_client_network" : {
31493245 "localizations" : {
31503246 "en" : {
You can’t perform that action at this time.
0 commit comments