Fix localization issues

This commit is contained in:
2023-04-16 17:11:21 +02:00
parent e9e5756c94
commit d93a0600f3
8 changed files with 40 additions and 22 deletions

View File

@@ -45,7 +45,7 @@ struct ConfigView: View {
}
NavigationLink(destination: NotificationSettingsView(settings: settings)) {
IconLabel(NSLocalizedString("Local Notifications", comment: "Section header for damus local notifications user configuration"), img_name: "bell.fill", color: .blue)
IconLabel(NSLocalizedString("Notifications", comment: "Section header for Damus notifications"), img_name: "bell.fill", color: .blue)
}
NavigationLink(destination: ZapSettingsView(pubkey: state.pubkey, settings: settings)) {

View File

@@ -262,7 +262,7 @@ struct PostView: View {
} onVideoPicked: { url in
self.mediaToUpload = .video(url)
}
.alert("Are you sure you want to upload this image?", isPresented: $image_upload_confirm) {
.alert(NSLocalizedString("Are you sure you want to upload this image?", comment: "Alert message asking if the user wants to upload an image."), isPresented: $image_upload_confirm) {
Button(NSLocalizedString("Upload", comment: "Button to proceed with uploading."), role: .none) {
if let mediaToUpload {
self.handle_upload(media: mediaToUpload)

View File

@@ -50,7 +50,7 @@ struct AppearanceSettingsView: View {
}
.navigationTitle("Appearance")
.navigationTitle(NSLocalizedString("Appearance", comment: "Navigation title for text and appearance settings."))
.onReceive(handle_notify(.switched_timeline)) { _ in
dismiss()
}

View File

@@ -100,7 +100,7 @@ struct KeySettingsView: View {
}
}
.navigationTitle("Keys")
.navigationTitle(NSLocalizedString("Keys", comment: "Navigation title for managing keys."))
.onReceive(handle_notify(.switched_timeline)) { _ in
dismiss()
}

View File

@@ -76,7 +76,7 @@ struct TranslationSettingsView: View {
}
}
}
.navigationTitle("Translation")
.navigationTitle(NSLocalizedString("Translation", comment: "Navigation title for translation settings."))
.onReceive(handle_notify(.switched_timeline)) { _ in
dismiss()
}

View File

@@ -24,7 +24,7 @@ struct ZapSettingsView: View {
var body: some View {
Form {
Section("Wallet") {
Section(NSLocalizedString("Wallet", comment: "Title for section in zap settings that controls the Lightning wallet selection.")) {
Toggle(NSLocalizedString("Show wallet selector", comment: "Toggle to show or hide selection of wallet."), isOn: $settings.show_wallet_selector).toggleStyle(.switch)
Picker(NSLocalizedString("Select default wallet", comment: "Prompt selection of user's default wallet"),
@@ -36,12 +36,12 @@ struct ZapSettingsView: View {
}
}
Section("Zaps") {
Section(NSLocalizedString("Zaps", comment: "Title for section in zap settings that controls general zap preferences.")) {
Toggle(NSLocalizedString("Zap Vibration", comment: "Setting to enable vibration on zap"), isOn: $settings.zap_vibration)
.toggleStyle(.switch)
}
Section("Default Zap Amount in sats") {
Section(NSLocalizedString("Default Zap Amount in sats", comment: "Title for section in zap settings that controls the default zap amount in sats.")) {
TextField(String("1000"), text: $default_zap_amount)
.keyboardType(.numberPad)
.onReceive(Just(default_zap_amount)) { newValue in
@@ -52,7 +52,7 @@ struct ZapSettingsView: View {
}
}
}
.navigationTitle("Zaps")
.navigationTitle(NSLocalizedString("Zaps", comment: "Navigation title for zap settings."))
.onReceive(handle_notify(.switched_timeline)) { _ in
dismiss()
}