on-demand: macOS: Tunnel detail: List SSIDs

This commit is contained in:
Roopesh Chander 2019-03-09 16:05:22 +05:30 committed by Jason A. Donenfeld
parent a876386c05
commit 986c5d3741
2 changed files with 10 additions and 1 deletions

View File

@ -93,6 +93,7 @@
"tunnelOnDemandOnlySSIDs (%d)" = "Only %d SSIDs";
"tunnelOnDemandExceptSSID (%d)" = "Except %d SSID";
"tunnelOnDemandExceptSSIDs (%d)" = "Except %d SSIDs";
"tunnelOnDemandSSIDOptionDescriptionMac (%1$@: %2$@)" = "%1$@: %2$@";
"tunnelOnDemandSSIDViewTitle" = "SSIDs";
"tunnelOnDemandSectionTitleSelectedSSIDs" = "SSIDs";

View File

@ -403,7 +403,15 @@ extension TunnelDetailTableViewController: NSTableViewDelegate {
case .onDemandSSIDRow:
let cell: KeyValueRow = tableView.dequeueReusableCell()
cell.key = tr("macFieldOnDemandSSIDs")
cell.value = onDemandViewModel.ssidOption.localizedUIString
let value: String
if onDemandViewModel.ssidOption == .anySSID {
value = onDemandViewModel.ssidOption.localizedUIString
} else {
value = tr(format: "tunnelOnDemandSSIDOptionDescriptionMac (%1$@: %2$@)",
onDemandViewModel.ssidOption.localizedUIString,
onDemandViewModel.selectedSSIDs.joined(separator: ", "))
}
cell.value = value
cell.isKeyInBold = false
return cell
}