Localize strings in common
Move "Protocol" from macOS to Core.
This commit is contained in:
parent
49dcbf2553
commit
0a9beaf8e0
|
@ -25,6 +25,7 @@
|
|||
|
||||
import Foundation
|
||||
import TunnelKit
|
||||
import PassepartoutCore
|
||||
|
||||
public protocol UIDescriptible {
|
||||
var uiDescription: String { get }
|
||||
|
@ -123,3 +124,33 @@ extension OpenVPN.ConfigurationBuilder {
|
|||
return (randomizeEndpoint ?? false) ? V.enabled : V.disabled
|
||||
}
|
||||
}
|
||||
|
||||
extension NetworkChoice: CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch self {
|
||||
case .client:
|
||||
return L10n.Core.NetworkChoice.client
|
||||
|
||||
case .server:
|
||||
return L10n.Core.NetworkChoice.server
|
||||
|
||||
case .manual:
|
||||
return L10n.Core.Global.Values.manual
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension DNSProtocol: CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch self {
|
||||
case .plain:
|
||||
return "Cleartext"
|
||||
|
||||
case .https:
|
||||
return "HTTPS"
|
||||
|
||||
case .tls:
|
||||
return "TLS"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -539,6 +539,8 @@ internal enum L10n {
|
|||
internal static let address = L10n.tr("Core", "global.captions.address")
|
||||
/// Port
|
||||
internal static let port = L10n.tr("Core", "global.captions.port")
|
||||
/// Protocol
|
||||
internal static let `protocol` = L10n.tr("Core", "global.captions.protocol")
|
||||
}
|
||||
internal enum Host {
|
||||
internal enum TitleInput {
|
||||
|
|
|
@ -713,18 +713,3 @@ extension NetworkSettingsViewController: FieldTableViewCellDelegate {
|
|||
func fieldCellDidEnter(_: FieldTableViewCell) {
|
||||
}
|
||||
}
|
||||
|
||||
extension NetworkChoice: CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch self {
|
||||
case .client:
|
||||
return L10n.Core.NetworkChoice.client
|
||||
|
||||
case .server:
|
||||
return L10n.Core.NetworkChoice.server
|
||||
|
||||
case .manual:
|
||||
return L10n.Core.Global.Values.manual
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,8 +31,6 @@ internal enum L10n {
|
|||
internal enum Cells {
|
||||
/// Address
|
||||
internal static let address = L10n.tr("App", "endpoint.cells.address")
|
||||
/// Protocol
|
||||
internal static let `protocol` = L10n.tr("App", "endpoint.cells.protocol")
|
||||
}
|
||||
}
|
||||
internal enum Menu {
|
||||
|
@ -529,6 +527,8 @@ internal enum L10n {
|
|||
internal static let address = L10n.tr("Core", "global.captions.address")
|
||||
/// Port
|
||||
internal static let port = L10n.tr("Core", "global.captions.port")
|
||||
/// Protocol
|
||||
internal static let `protocol` = L10n.tr("Core", "global.captions.protocol")
|
||||
}
|
||||
internal enum Host {
|
||||
internal enum TitleInput {
|
||||
|
|
|
@ -77,21 +77,6 @@ extension PoolGroup {
|
|||
}
|
||||
}
|
||||
|
||||
extension NetworkChoice: CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch self {
|
||||
case .client:
|
||||
return L10n.Core.NetworkChoice.client
|
||||
|
||||
case .server:
|
||||
return L10n.Core.NetworkChoice.server
|
||||
|
||||
case .manual:
|
||||
return L10n.Core.Global.Values.manual
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension String {
|
||||
var image: NSImage? {
|
||||
return ImageAsset(name: lowercased()).image
|
||||
|
|
|
@ -53,7 +53,7 @@ class EndpointViewController: NSViewController, ProfileCustomization {
|
|||
super.viewDidLoad()
|
||||
|
||||
labelAddressCaption.stringValue = L10n.App.Endpoint.Cells.address.asCaption
|
||||
labelProtocolCaption.stringValue = L10n.App.Endpoint.Cells.protocol.asCaption
|
||||
labelProtocolCaption.stringValue = L10n.Core.Global.Captions.protocol.asCaption
|
||||
|
||||
popupAddress.removeAllItems()
|
||||
for address in dataSource.addresses {
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
"service.cells.addresses.caption" = "Addresses";
|
||||
|
||||
"endpoint.cells.address" = "Address";
|
||||
"endpoint.cells.protocol" = "Protocol";
|
||||
|
||||
"configuration.title" = "Configuration";
|
||||
"configuration.alerts.commit.message" = "New parameters will not be effective until you reconnect manually. Changes in trusted networks will apply immediately.";
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
"global.captions.address" = "Address";
|
||||
"global.captions.port" = "Port";
|
||||
"global.captions.protocol" = "Protocol";
|
||||
|
||||
"global.values.enabled" = "Enabled";
|
||||
"global.values.disabled" = "Disabled";
|
||||
|
|
Loading…
Reference in New Issue