mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 10:29:58 +02:00
refactor(apple): type the merged relay/network resources
Convert master's raw-string localization keys and SF Symbols in the new relay/network code to typed accessors, matching this branch's typed-resources convention: relay mode labels/descriptions, NetworkSettings strings, the endpoint id and relay-validation messages (now typed L10n functions), and SF Symbols via SFSafeSymbols. Retype the model's relayApplyErrorKey from a raw String key to String.LocalizationValue so no loose key literals remain in the settings layer.
This commit is contained in:
@@ -125,19 +125,19 @@ private struct SettingsSectionContent: View {
|
||||
|
||||
func relayModeLabel(_ mode: RelayPreferenceMode) -> String {
|
||||
switch mode {
|
||||
case .automatic: return String(localized: "relay_mode_automatic")
|
||||
case .strictCustom: return String(localized: "relay_mode_custom")
|
||||
case .customWithDirectFallback: return String(localized: "relay_mode_custom_direct_fallback")
|
||||
case .localOnly: return String(localized: "relay_mode_local_only")
|
||||
case .automatic: return String(localized: L10n.Relay.modeAutomatic)
|
||||
case .strictCustom: return String(localized: L10n.Relay.modeCustom)
|
||||
case .customWithDirectFallback: return String(localized: L10n.Relay.modeCustomDirectFallback)
|
||||
case .localOnly: return String(localized: L10n.Relay.modeLocalOnly)
|
||||
}
|
||||
}
|
||||
|
||||
func relayModeDescriptionKey(_ mode: RelayPreferenceMode) -> String {
|
||||
func relayModeDescription(_ mode: RelayPreferenceMode) -> String.LocalizationValue {
|
||||
switch mode {
|
||||
case .automatic: return "relay_mode_automatic_description"
|
||||
case .strictCustom: return "relay_mode_custom_description"
|
||||
case .customWithDirectFallback: return "relay_mode_custom_direct_fallback_description"
|
||||
case .localOnly: return "relay_mode_local_only_description"
|
||||
case .automatic: return L10n.Relay.modeAutomaticDescription
|
||||
case .strictCustom: return L10n.Relay.modeCustomDescription
|
||||
case .customWithDirectFallback: return L10n.Relay.modeCustomDirectFallbackDescription
|
||||
case .localOnly: return L10n.Relay.modeLocalOnlyDescription
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user