Fix localization issues in RelayConfigView
Changelog-Fixed: Fixed localization issues in RelayConfigView Signed-off-by: Terry Yiu <963907+tyiu@users.noreply.github.com>
This commit is contained in:
@@ -14,9 +14,9 @@ enum RelayTab: Int, CaseIterable{
|
|||||||
var title: String{
|
var title: String{
|
||||||
switch self {
|
switch self {
|
||||||
case .myRelays:
|
case .myRelays:
|
||||||
return "My relays"
|
return NSLocalizedString("My Relays", comment: "Title of the tab that shows the user's list of their own relays.")
|
||||||
case .recommended:
|
case .recommended:
|
||||||
return "Recommended"
|
return NSLocalizedString("Recommended", comment: "Title of the tab that shows the list of relays recommended by Damus.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,10 +48,10 @@ struct RelayConfigView: View {
|
|||||||
NavigationView {
|
NavigationView {
|
||||||
ZStack(alignment: .bottom){
|
ZStack(alignment: .bottom){
|
||||||
TabView(selection: $selectedTab) {
|
TabView(selection: $selectedTab) {
|
||||||
RelayList(title: "My Relays", relayList: relays, recommended: false)
|
RelayList(title: RelayTab.myRelays.title, relayList: relays, recommended: false)
|
||||||
.tag(0)
|
.tag(0)
|
||||||
|
|
||||||
RelayList(title: "Recommended", relayList: recommended, recommended: true)
|
RelayList(title: RelayTab.recommended.title, relayList: recommended, recommended: true)
|
||||||
.tag(1)
|
.tag(1)
|
||||||
}
|
}
|
||||||
ZStack{
|
ZStack{
|
||||||
@@ -83,13 +83,13 @@ struct RelayConfigView: View {
|
|||||||
.toolbar {
|
.toolbar {
|
||||||
if state.keypair.privkey != nil && selectedTab == 0 {
|
if state.keypair.privkey != nil && selectedTab == 0 {
|
||||||
if showActionButtons {
|
if showActionButtons {
|
||||||
Button("Done") {
|
Button(NSLocalizedString("Done", comment: "Button to leave edit mode for modifying the list of relays.")) {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
showActionButtons.toggle()
|
showActionButtons.toggle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Button("Edit") {
|
Button(NSLocalizedString("Edit", comment: "Button to enter edit mode for modifying the list of relays.")) {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
showActionButtons.toggle()
|
showActionButtons.toggle()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user