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Mcd2{Q5XI$3@%$+9ztX
Yxi0nt^W+O0BAYpqJXpXCyYyR(0FdHCTmS$7
diff --git a/damus/ContentView.swift b/damus/ContentView.swift
index bada26e5..1df96c83 100644
--- a/damus/ContentView.swift
+++ b/damus/ContentView.swift
@@ -434,21 +434,26 @@ struct ContentView: View {
.onReceive(handle_notify(.new_mutes)) { notif in
home.filter_muted()
}
- .alert("User blocked", isPresented: $user_blocked_confirm, actions: {
- Button("Thanks!") {
+ .alert(NSLocalizedString("User blocked", comment: "Alert message to indicate "), isPresented: $user_blocked_confirm, actions: {
+ Button(NSLocalizedString("Thanks!", comment: "Button to close out of alert that informs that the action to block a user was successful.")) {
user_blocked_confirm = false
}
}, message: {
if let pubkey = self.blocking {
let profile = damus_state!.profiles.lookup(id: pubkey)
let name = Profile.displayName(profile: profile, pubkey: pubkey)
- Text("\(name) has been blocked")
+ Text("\(name) has been blocked", comment: "Alert message that informs a user was blocked.")
} else {
- Text("User has been blocked")
+ Text("User has been blocked", comment: "Alert message that informs a user was blocked.")
}
})
- .alert("Create new mutelist", isPresented: $confirm_overwrite_mutelist, actions: {
- Button("Yes, Overwrite") {
+ .alert(NSLocalizedString("Create new mutelist", comment: "Title of alert prompting the user to create a new mutelist."), isPresented: $confirm_overwrite_mutelist, actions: {
+ Button(NSLocalizedString("Cancel", comment: "Button to cancel out of alert that creates a new mutelist.")) {
+ confirm_overwrite_mutelist = false
+ confirm_block = false
+ }
+
+ Button(NSLocalizedString("Yes, Overwrite", comment: "Text of button that confirms to overwrite the existing mutelist.")) {
guard let ds = damus_state else {
return
}
@@ -472,20 +477,18 @@ struct ContentView: View {
confirm_block = false
user_blocked_confirm = true
}
-
- Button("Cancel") {
- confirm_overwrite_mutelist = false
+ }, message: {
+ Text("No block list found, create a new one? This will overwrite any previous block lists.", comment: "Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists.")
+ })
+ .alert(NSLocalizedString("Block User", comment: "Title of alert for blocking a user."), isPresented: $confirm_block, actions: {
+ Button(NSLocalizedString("Cancel", comment: "Alert button to cancel out of alert for blocking a user."), role: .cancel) {
confirm_block = false
}
- }, message: {
- Text("No block list found, create a new one? This will overwrite any previous block lists.")
- })
- .alert("Block User", isPresented: $confirm_block, actions: {
- Button("Block") {
+ Button(NSLocalizedString("Block", comment: "Alert button to block a user."), role: .destructive) {
guard let ds = damus_state else {
return
}
-
+
if ds.contacts.mutelist == nil {
confirm_overwrite_mutelist = true
} else {
@@ -495,7 +498,7 @@ struct ContentView: View {
guard let pubkey = blocking else {
return
}
-
+
guard let ev = create_or_update_mutelist(keypair: keypair, mprev: ds.contacts.mutelist, to_add: pubkey) else {
return
}
@@ -503,17 +506,13 @@ struct ContentView: View {
ds.pool.send(.event(ev))
}
}
-
- Button("Cancel") {
- confirm_block = false
- }
}, message: {
if let pubkey = blocking {
let profile = damus_state?.profiles.lookup(id: pubkey)
let name = Profile.displayName(profile: profile, pubkey: pubkey)
- Text("Block \(name)?")
+ Text("Block \(name)?", comment: "Alert message prompt to ask if a user should be blocked.")
} else {
- Text("Could not find user to block...")
+ Text("Could not find user to block...", comment: "Alert message to indicate that the blocked user could not be found.")
}
})
}
diff --git a/damus/Views/ConfigView.swift b/damus/Views/ConfigView.swift
index 07d4b66b..f5861811 100644
--- a/damus/Views/ConfigView.swift
+++ b/damus/Views/ConfigView.swift
@@ -139,10 +139,10 @@ struct ConfigView: View {
.navigationTitle(NSLocalizedString("Settings", comment: "Navigation title for Settings view."))
.navigationBarTitleDisplayMode(.large)
.alert(NSLocalizedString("Logout", comment: "Alert for logging out the user."), isPresented: $confirm_logout) {
- Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user.")) {
+ Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user."), role: .cancel) {
confirm_logout = false
}
- Button(NSLocalizedString("Logout", comment: "Button for logging out the user.")) {
+ Button(NSLocalizedString("Logout", comment: "Button for logging out the user."), role: .destructive) {
notify(.logout, ())
}
} message: {
diff --git a/damus/Views/EULAView.swift b/damus/Views/EULAView.swift
index 3bdf1c3b..eae670f6 100644
--- a/damus/Views/EULAView.swift
+++ b/damus/Views/EULAView.swift
@@ -16,7 +16,7 @@ struct EULAView: View {
DamusGradient()
ScrollView {
- Text("EULA")
+ Text("EULA", comment: "Label indicating that the below text is the EULA, an acronym for End User License Agreement.")
.font(.title.bold())
.foregroundColor(.white)
@@ -72,11 +72,11 @@ By using our Application, you signify your acceptance of this EULA. If you do no
NavigationLink(destination: CreateAccountView(), isActive: $creating_account) {
EmptyView()
}
- DamusWhiteButton("Accept") {
+ DamusWhiteButton(NSLocalizedString("Accept", comment: "Button to accept the end user license agreement before being allowed into the app.")) {
creating_account = true
}
-
- DamusWhiteButton("Reject") {
+
+ DamusWhiteButton(NSLocalizedString("Reject", comment: "Button to reject the end user license agreement, which disallows the user from being let into the app.")) {
dismiss()
}
}
diff --git a/damus/Views/Events/EventMenu.swift b/damus/Views/Events/EventMenu.swift
index 8ab2ead0..dc8ec18e 100644
--- a/damus/Views/Events/EventMenu.swift
+++ b/damus/Views/Events/EventMenu.swift
@@ -38,14 +38,14 @@ struct EventMenuContext: View {
Label(NSLocalizedString("Copy Note JSON", comment: "Context menu option for copying the JSON text from the note."), systemImage: "square.on.square")
}
- Button {
+ Button(role: .destructive) {
let target: ReportTarget = .note(ReportNoteTarget(pubkey: event.pubkey, note_id: event.id))
notify(.report, target)
} label: {
Label(NSLocalizedString("Report", comment: "Context menu option for reporting content."), systemImage: "exclamationmark.bubble")
}
- Button {
+ Button(role: .destructive) {
notify(.block, event.pubkey)
} label: {
Label(NSLocalizedString("Block", comment: "Context menu option for blocking users."), systemImage: "exclamationmark.octagon")
diff --git a/damus/Views/Muting/MutelistView.swift b/damus/Views/Muting/MutelistView.swift
index c847e86c..bbdc157e 100644
--- a/damus/Views/Muting/MutelistView.swift
+++ b/damus/Views/Muting/MutelistView.swift
@@ -43,7 +43,7 @@ struct MutelistView: View {
RemoveAction(pubkey: pubkey)
}
}
- .navigationTitle("Blocked Users")
+ .navigationTitle(NSLocalizedString("Blocked Users", comment: "Navigation title of view to see list of blocked users."))
}
}
diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift
index 4bcd62c5..a48412ed 100644
--- a/damus/Views/ProfileView.swift
+++ b/damus/Views/ProfileView.swift
@@ -374,17 +374,17 @@ struct ProfileView: View {
}
}
}
- .confirmationDialog("Actions", isPresented: $action_sheet_presented) {
- Button("Share") {
+ .confirmationDialog(NSLocalizedString("Actions", comment: "Title for confirmation dialog to either share, report, or block a profile."), isPresented: $action_sheet_presented) {
+ Button(NSLocalizedString("Share", comment: "Button to share the link to a profile.")) {
show_share_sheet = true
}
- Button("Report") {
+ Button(NSLocalizedString("Report", comment: "Button to report a profile."), role: .destructive) {
let target: ReportTarget = .user(profile.pubkey)
notify(.report, target)
}
- Button("Block") {
+ Button(NSLocalizedString("Block", comment: "Button to block a profile."), role: .destructive) {
notify(.block, profile.pubkey)
}
}
diff --git a/damus/Views/ReportView.swift b/damus/Views/ReportView.swift
index b3286bc5..d69a2873 100644
--- a/damus/Views/ReportView.swift
+++ b/damus/Views/ReportView.swift
@@ -25,16 +25,16 @@ struct ReportView: View {
var Success: some View {
VStack(alignment: .center, spacing: 20) {
- Text("Report sent!")
+ Text("Report sent!", comment: "Message indicating that a report was successfully sent to relay servers.")
.font(.headline)
- Text("Relays have been notified and clients will be able to use this information to filter content. Thank you!")
+ Text("Relays have been notified and clients will be able to use this information to filter content. Thank you!", comment: "Description of what was done as a result of sending a report to relay servers.")
- Text("Report ID:")
+ Text("Report ID:", comment: "Label indicating that the text underneath is the identifier of the report that was sent to relay servers.")
Text(report_id)
- Button("Copy Report ID") {
+ Button(NSLocalizedString("Copy Report ID", comment: "Button to copy report ID.")) {
UIPasteboard.general.string = report_id
let g = UIImpactFeedbackGenerator(style: .medium)
g.impactOccurred()
@@ -59,33 +59,33 @@ struct ReportView: View {
var MainForm: some View {
VStack {
- Text("Report")
+ Text("Report", comment: "Label indicating that the current view is for the user to report content.")
.font(.headline)
.padding()
Form {
Section(content: {
- Button("It's spam") {
+ Button(NSLocalizedString("It's spam", comment: "Button for user to report that the account or content has spam.")) {
do_send_report(type: .spam)
}
- Button("Nudity or explicit content") {
+ Button(NSLocalizedString("Nudity or explicit content", comment: "Button for user to report that the account or content has nudity or explicit content.")) {
do_send_report(type: .explicit)
}
- Button("Illegal content") {
+ Button(NSLocalizedString("Illegal content", comment: "Button for user to report that the account or content has illegal content.")) {
do_send_report(type: .illegal)
}
if case .user = target {
- Button("They are impersonating someone") {
+ Button(NSLocalizedString("They are impersonating someone", comment: "Button for user to report that the account is impersonating someone.")) {
do_send_report(type: .impersonation)
}
}
}, header: {
- Text("What do you want to report?")
+ Text("What do you want to report?", comment: "Header text to prompt user what issue they want to report.")
}, footer: {
- Text("Your report will be sent to the relays you are connected to")
+ Text("Your report will be sent to the relays you are connected to", comment: "Footer text to inform user what will happen when the report is submitted.")
})
}
}
diff --git a/damus/Views/SideMenuView.swift b/damus/Views/SideMenuView.swift
index 9f9c72d0..6ce48dff 100644
--- a/damus/Views/SideMenuView.swift
+++ b/damus/Views/SideMenuView.swift
@@ -148,10 +148,10 @@ struct SideMenuView: View {
isSidebarVisible.toggle()
}
.alert("Logout", isPresented: $confirm_logout) {
- Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user.")) {
+ Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user."), role: .cancel) {
confirm_logout = false
}
- Button(NSLocalizedString("Logout", comment: "Button for logging out the user.")) {
+ Button(NSLocalizedString("Logout", comment: "Button for logging out the user."), role: .destructive) {
notify(.logout, ())
}
} message: {