Browse Source

Add missing comments to localized strings, reorder buttons, mark destructive buttons

translations_damus-localizations-en-us-xcloc-localized-contents-en-us-xliff--master_ar
Terry Yiu 2 years ago
parent
commit
51f94cf135
No known key found for this signature in database GPG Key ID: 108645AE8A19B71A
  1. 168
      damus Localizations/en-US.xcloc/Localized Contents/en-US.xliff
  2. BIN
      damus Localizations/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings
  3. 39
      damus/ContentView.swift
  4. 4
      damus/Views/ConfigView.swift
  5. 6
      damus/Views/EULAView.swift
  6. 4
      damus/Views/Events/EventMenu.swift
  7. 2
      damus/Views/Muting/MutelistView.swift
  8. 8
      damus/Views/ProfileView.swift
  9. 22
      damus/Views/ReportView.swift
  10. 4
      damus/Views/SideMenuView.swift

168
damus Localizations/en-US.xcloc/Localized Contents/en-US.xliff

@ -41,9 +41,14 @@ Abbreviated version of a nostr public key.</note>
<trans-unit id="%@ %@" xml:space="preserve"> <trans-unit id="%@ %@" xml:space="preserve">
<source>%@ %@</source> <source>%@ %@</source>
<target>%@ %@</target> <target>%@ %@</target>
<note>Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'. <note>Sentence composed of 2 variables to describe how many tip payments there are on a post. In source English, the first variable is the number of tip payments, and the second variable is 'Tip' or 'Tips'.
Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.</note> Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.</note>
</trans-unit> </trans-unit>
<trans-unit id="%@ has been blocked" xml:space="preserve">
<source>%@ has been blocked</source>
<target>%@ has been blocked</target>
<note>Alert message that informs a user was blocked.</note>
</trans-unit>
<trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve"> <trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve">
<source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source> <source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source>
<target>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</target> <target>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</target>
@ -62,7 +67,7 @@ Sentence composed of 2 variables to describe how many profiles a user is followi
<trans-unit id="%lld" xml:space="preserve"> <trans-unit id="%lld" xml:space="preserve">
<source>%lld</source> <source>%lld</source>
<target>%lld</target> <target>%lld</target>
<note>Number of reposts. <note>Number of tip payments on a post.
Number of profiles a user is following.</note> Number of profiles a user is following.</note>
</trans-unit> </trans-unit>
<trans-unit id="%lld/%lld" xml:space="preserve"> <trans-unit id="%lld/%lld" xml:space="preserve">
@ -115,11 +120,21 @@ Number of profiles a user is following.</note>
<target>Absolute Boss</target> <target>Absolute Boss</target>
<note>Placeholder text for About Me description.</note> <note>Placeholder text for About Me description.</note>
</trans-unit> </trans-unit>
<trans-unit id="Accept" xml:space="preserve">
<source>Accept</source>
<target>Accept</target>
<note>Button to accept the end user license agreement before being allowed into the app.</note>
</trans-unit>
<trans-unit id="Account ID" xml:space="preserve"> <trans-unit id="Account ID" xml:space="preserve">
<source>Account ID</source> <source>Account ID</source>
<target>Account ID</target> <target>Account ID</target>
<note>Label to indicate the public ID of the account.</note> <note>Label to indicate the public ID of the account.</note>
</trans-unit> </trans-unit>
<trans-unit id="Actions" xml:space="preserve">
<source>Actions</source>
<target>Actions</target>
<note>Title for confirmation dialog to either share, report, or block a profile.</note>
</trans-unit>
<trans-unit id="Add" xml:space="preserve"> <trans-unit id="Add" xml:space="preserve">
<source>Add</source> <source>Add</source>
<target>Add</target> <target>Add</target>
@ -171,6 +186,33 @@ Number of profiles a user is following.</note>
<target>Blixt Wallet</target> <target>Blixt Wallet</target>
<note>Dropdown option label for Lightning wallet, Blixt Wallet</note> <note>Dropdown option label for Lightning wallet, Blixt Wallet</note>
</trans-unit> </trans-unit>
<trans-unit id="Block" xml:space="preserve">
<source>Block</source>
<target>Block</target>
<note>Alert button to block a user.
Button to block a profile.
Context menu option for blocking users.</note>
</trans-unit>
<trans-unit id="Block %@?" xml:space="preserve">
<source>Block %@?</source>
<target>Block %@?</target>
<note>Alert message prompt to ask if a user should be blocked.</note>
</trans-unit>
<trans-unit id="Block User" xml:space="preserve">
<source>Block User</source>
<target>Block User</target>
<note>Title of alert for blocking a user.</note>
</trans-unit>
<trans-unit id="Blocked" xml:space="preserve">
<source>Blocked</source>
<target>Blocked</target>
<note>Sidebar menu label for Profile view.</note>
</trans-unit>
<trans-unit id="Blocked Users" xml:space="preserve">
<source>Blocked Users</source>
<target>Blocked Users</target>
<note>Navigation title of view to see list of blocked users.</note>
</trans-unit>
<trans-unit id="Blue Wallet" xml:space="preserve"> <trans-unit id="Blue Wallet" xml:space="preserve">
<source>Blue Wallet</source> <source>Blue Wallet</source>
<target>Blue Wallet</target> <target>Blue Wallet</target>
@ -189,7 +231,9 @@ Number of profiles a user is following.</note>
<trans-unit id="Cancel" xml:space="preserve"> <trans-unit id="Cancel" xml:space="preserve">
<source>Cancel</source> <source>Cancel</source>
<target>Cancel</target> <target>Cancel</target>
<note>Button to cancel out of posting a note. <note>Alert button to cancel out of alert for blocking a user.
Button to cancel out of alert that creates a new mutelist.
Button to cancel out of posting a note.
Button to cancel out of reposting a post. Button to cancel out of reposting a post.
Button to cancel out of view adding user inputted relay. Button to cancel out of view adding user inputted relay.
Cancel out of logging out the user.</note> Cancel out of logging out the user.</note>
@ -255,14 +299,19 @@ Number of profiles a user is following.</note>
<target>Copy Note JSON</target> <target>Copy Note JSON</target>
<note>Context menu option for copying the JSON text from the note.</note> <note>Context menu option for copying the JSON text from the note.</note>
</trans-unit> </trans-unit>
<trans-unit id="Copy Report ID" xml:space="preserve">
<source>Copy Report ID</source>
<target>Copy Report ID</target>
<note>Button to copy report ID.</note>
</trans-unit>
<trans-unit id="Copy Text" xml:space="preserve"> <trans-unit id="Copy Text" xml:space="preserve">
<source>Copy Text</source> <source>Copy Text</source>
<target>Copy Text</target> <target>Copy Text</target>
<note>Context menu option for copying the text from an note.</note> <note>Context menu option for copying the text from an note.</note>
</trans-unit> </trans-unit>
<trans-unit id="Copy User ID" xml:space="preserve"> <trans-unit id="Copy User Pubkey" xml:space="preserve">
<source>Copy User ID</source> <source>Copy User Pubkey</source>
<target>Copy User ID</target> <target>Copy User Pubkey</target>
<note>Context menu option for copying the ID of the user who created the note.</note> <note>Context menu option for copying the ID of the user who created the note.</note>
</trans-unit> </trans-unit>
<trans-unit id="Copy invoice" xml:space="preserve"> <trans-unit id="Copy invoice" xml:space="preserve">
@ -270,6 +319,11 @@ Number of profiles a user is following.</note>
<target>Copy invoice</target> <target>Copy invoice</target>
<note>Title of section for copying a Lightning invoice identifier.</note> <note>Title of section for copying a Lightning invoice identifier.</note>
</trans-unit> </trans-unit>
<trans-unit id="Could not find user to block..." xml:space="preserve">
<source>Could not find user to block...</source>
<target>Could not find user to block...</target>
<note>Alert message to indicate that the blocked user could not be found.</note>
</trans-unit>
<trans-unit id="Create" xml:space="preserve"> <trans-unit id="Create" xml:space="preserve">
<source>Create</source> <source>Create</source>
<target>Create</target> <target>Create</target>
@ -280,6 +334,11 @@ Number of profiles a user is following.</note>
<target>Create Account</target> <target>Create Account</target>
<note>Button to create an account.</note> <note>Button to create an account.</note>
</trans-unit> </trans-unit>
<trans-unit id="Create new mutelist" xml:space="preserve">
<source>Create new mutelist</source>
<target>Create new mutelist</target>
<note>Title of alert prompting the user to create a new mutelist.</note>
</trans-unit>
<trans-unit id="Creator(s) of Bitcoin. Absolute legend." xml:space="preserve"> <trans-unit id="Creator(s) of Bitcoin. Absolute legend." xml:space="preserve">
<source>Creator(s) of Bitcoin. Absolute legend.</source> <source>Creator(s) of Bitcoin. Absolute legend.</source>
<target>Creator(s) of Bitcoin. Absolute legend.</target> <target>Creator(s) of Bitcoin. Absolute legend.</target>
@ -309,7 +368,8 @@ Number of profiles a user is following.</note>
<trans-unit id="Delete" xml:space="preserve"> <trans-unit id="Delete" xml:space="preserve">
<source>Delete</source> <source>Delete</source>
<target>Delete</target> <target>Delete</target>
<note>Button to delete a relay server that the user connects to.</note> <note>Button to delete a relay server that the user connects to.
Button to remove a user from their blocklist.</note>
</trans-unit> </trans-unit>
<trans-unit id="Dismiss" xml:space="preserve"> <trans-unit id="Dismiss" xml:space="preserve">
<source>Dismiss</source> <source>Dismiss</source>
@ -326,6 +386,11 @@ Number of profiles a user is following.</note>
<target>Done</target> <target>Done</target>
<note>Button to dismiss wallet selection view for paying Lightning invoice.</note> <note>Button to dismiss wallet selection view for paying Lightning invoice.</note>
</trans-unit> </trans-unit>
<trans-unit id="EULA" xml:space="preserve">
<source>EULA</source>
<target>EULA</target>
<note>Label indicating that the below text is the EULA, an acronym for End User License Agreement.</note>
</trans-unit>
<trans-unit id="Earn Money" xml:space="preserve"> <trans-unit id="Earn Money" xml:space="preserve">
<source>Earn Money</source> <source>Earn Money</source>
<target>Earn Money</target> <target>Earn Money</target>
@ -407,11 +472,21 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Home</target> <target>Home</target>
<note>Navigation bar title for Home view where posts and replies appear from those who the user is following.</note> <note>Navigation bar title for Home view where posts and replies appear from those who the user is following.</note>
</trans-unit> </trans-unit>
<trans-unit id="Illegal content" xml:space="preserve">
<source>Illegal content</source>
<target>Illegal content</target>
<note>Button for user to report that the account or content has illegal content.</note>
</trans-unit>
<trans-unit id="Invalid key" xml:space="preserve"> <trans-unit id="Invalid key" xml:space="preserve">
<source>Invalid key</source> <source>Invalid key</source>
<target>Invalid key</target> <target>Invalid key</target>
<note>Error message indicating that an invalid account key was entered for login.</note> <note>Error message indicating that an invalid account key was entered for login.</note>
</trans-unit> </trans-unit>
<trans-unit id="It's spam" xml:space="preserve">
<source>It's spam</source>
<target>It's spam</target>
<note>Button for user to report that the account or content has spam.</note>
</trans-unit>
<trans-unit id="LNLink" xml:space="preserve"> <trans-unit id="LNLink" xml:space="preserve">
<source>LNLink</source> <source>LNLink</source>
<target>LNLink</target> <target>LNLink</target>
@ -470,6 +545,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>NIP-05 Verification</target> <target>NIP-05 Verification</target>
<note>Label for NIP-05 Verification section of user profile form.</note> <note>Label for NIP-05 Verification section of user profile form.</note>
</trans-unit> </trans-unit>
<trans-unit id="No block list found, create a new one? This will overwrite any previous block lists." xml:space="preserve">
<source>No block list found, create a new one? This will overwrite any previous block lists.</source>
<target>No block list found, create a new one? This will overwrite any previous block lists.</target>
<note>Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists.</note>
</trans-unit>
<trans-unit id="Nothing to see here. Check back later!" xml:space="preserve"> <trans-unit id="Nothing to see here. Check back later!" xml:space="preserve">
<source>Nothing to see here. Check back later!</source> <source>Nothing to see here. Check back later!</source>
<target>Nothing to see here. Check back later!</target> <target>Nothing to see here. Check back later!</target>
@ -480,6 +560,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Notifications</target> <target>Notifications</target>
<note>Navigation title for notifications.</note> <note>Navigation title for notifications.</note>
</trans-unit> </trans-unit>
<trans-unit id="Nudity or explicit content" xml:space="preserve">
<source>Nudity or explicit content</source>
<target>Nudity or explicit content</target>
<note>Button for user to report that the account or content has nudity or explicit content.</note>
</trans-unit>
<trans-unit id="Pay" xml:space="preserve"> <trans-unit id="Pay" xml:space="preserve">
<source>Pay</source> <source>Pay</source>
<target>Pay</target> <target>Pay</target>
@ -560,6 +645,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Recommended Relays</target> <target>Recommended Relays</target>
<note>Section title for recommend relay servers that could be added as part of configuration</note> <note>Section title for recommend relay servers that could be added as part of configuration</note>
</trans-unit> </trans-unit>
<trans-unit id="Reject" xml:space="preserve">
<source>Reject</source>
<target>Reject</target>
<note>Button to reject the end user license agreement, which disallows the user from being let into the app.</note>
</trans-unit>
<trans-unit id="Relay" xml:space="preserve"> <trans-unit id="Relay" xml:space="preserve">
<source>Relay</source> <source>Relay</source>
<target>Relay</target> <target>Relay</target>
@ -570,6 +660,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Relays</target> <target>Relays</target>
<note>Sidebar menu label for Relay servers view</note> <note>Sidebar menu label for Relay servers view</note>
</trans-unit> </trans-unit>
<trans-unit id="Relays have been notified and clients will be able to use this information to filter content. Thank you!" xml:space="preserve">
<source>Relays have been notified and clients will be able to use this information to filter content. Thank you!</source>
<target>Relays have been notified and clients will be able to use this information to filter content. Thank you!</target>
<note>Description of what was done as a result of sending a report to relay servers.</note>
</trans-unit>
<trans-unit id="Remove all" xml:space="preserve"> <trans-unit id="Remove all" xml:space="preserve">
<source>Remove all</source> <source>Remove all</source>
<target>Remove all</target> <target>Remove all</target>
@ -590,6 +685,22 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Replying to:</target> <target>Replying to:</target>
<note>Indicating that the user is replying to the following listed people.</note> <note>Indicating that the user is replying to the following listed people.</note>
</trans-unit> </trans-unit>
<trans-unit id="Report" xml:space="preserve">
<source>Report</source>
<target>Report</target>
<note>Button to report a profile.
Context menu option for reporting content.</note>
</trans-unit>
<trans-unit id="Report ID:" xml:space="preserve">
<source>Report ID:</source>
<target>Report ID:</target>
<note>Label indicating that the text underneath is the identifier of the report that was sent to relay servers.</note>
</trans-unit>
<trans-unit id="Report sent!" xml:space="preserve">
<source>Report sent!</source>
<target>Report sent!</target>
<note>Message indicating that a report was successfully sent to relay servers.</note>
</trans-unit>
<trans-unit id="Repost" xml:space="preserve"> <trans-unit id="Repost" xml:space="preserve">
<source>Repost</source> <source>Repost</source>
<target>Repost</target> <target>Repost</target>
@ -601,6 +712,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Reposted</target> <target>Reposted</target>
<note>Text indicating that the post was reposted (i.e. re-shared).</note> <note>Text indicating that the post was reposted (i.e. re-shared).</note>
</trans-unit> </trans-unit>
<trans-unit id="Reposts" xml:space="preserve">
<source>Reposts</source>
<target>Reposts</target>
<note>Navigation bar title for Reposts view.</note>
</trans-unit>
<trans-unit id="Requests" xml:space="preserve"> <trans-unit id="Requests" xml:space="preserve">
<source>Requests</source> <source>Requests</source>
<target>Requests</target> <target>Requests</target>
@ -675,7 +791,8 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<trans-unit id="Share" xml:space="preserve"> <trans-unit id="Share" xml:space="preserve">
<source>Share</source> <source>Share</source>
<target>Share</target> <target>Share</target>
<note>Button to share an image.</note> <note>Button to share an image.
Button to share the link to a profile.</note>
</trans-unit> </trans-unit>
<trans-unit id="Show" xml:space="preserve"> <trans-unit id="Show" xml:space="preserve">
<source>Show</source> <source>Show</source>
@ -697,6 +814,16 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Strike</target> <target>Strike</target>
<note>Dropdown option label for Lightning wallet, Strike.</note> <note>Dropdown option label for Lightning wallet, Strike.</note>
</trans-unit> </trans-unit>
<trans-unit id="Thanks!" xml:space="preserve">
<source>Thanks!</source>
<target>Thanks!</target>
<note>Button to close out of alert that informs that the action to block a user was successful.</note>
</trans-unit>
<trans-unit id="They are impersonating someone" xml:space="preserve">
<source>They are impersonating someone</source>
<target>They are impersonating someone</target>
<note>Button for user to report that the account is impersonating someone.</note>
</trans-unit>
<trans-unit id="This is a public key, you will not be able to make posts or interact in any way. This is used for viewing accounts from their perspective." xml:space="preserve"> <trans-unit id="This is a public key, you will not be able to make posts or interact in any way. This is used for viewing accounts from their perspective." xml:space="preserve">
<source>This is a public key, you will not be able to make posts or interact in any way. This is used for viewing accounts from their perspective.</source> <source>This is a public key, you will not be able to make posts or interact in any way. This is used for viewing accounts from their perspective.</source>
<target>This is a public key, you will not be able to make posts or interact in any way. This is used for viewing accounts from their perspective.</target> <target>This is a public key, you will not be able to make posts or interact in any way. This is used for viewing accounts from their perspective.</target>
@ -748,6 +875,16 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Unfollows</target> <target>Unfollows</target>
<note>Text to indicate that the button next to it is in a state that will unfollow a profile when tapped.</note> <note>Text to indicate that the button next to it is in a state that will unfollow a profile when tapped.</note>
</trans-unit> </trans-unit>
<trans-unit id="User blocked" xml:space="preserve">
<source>User blocked</source>
<target>User blocked</target>
<note>Alert message to indicate</note>
</trans-unit>
<trans-unit id="User has been blocked" xml:space="preserve">
<source>User has been blocked</source>
<target>User has been blocked</target>
<note>Alert message that informs a user was blocked.</note>
</trans-unit>
<trans-unit id="Username" xml:space="preserve"> <trans-unit id="Username" xml:space="preserve">
<source>Username</source> <source>Username</source>
<target>Username</target> <target>Username</target>
@ -784,11 +921,26 @@ Part of a larger sentence to describe how many profiles a user is following.</no
<target>Welcome, %@!</target> <target>Welcome, %@!</target>
<note>Text to welcome user.</note> <note>Text to welcome user.</note>
</trans-unit> </trans-unit>
<trans-unit id="What do you want to report?" xml:space="preserve">
<source>What do you want to report?</source>
<target>What do you want to report?</target>
<note>Header text to prompt user what issue they want to report.</note>
</trans-unit>
<trans-unit id="Yes, Overwrite" xml:space="preserve">
<source>Yes, Overwrite</source>
<target>Yes, Overwrite</target>
<note>Text of button that confirms to overwrite the existing mutelist.</note>
</trans-unit>
<trans-unit id="Your Name" xml:space="preserve"> <trans-unit id="Your Name" xml:space="preserve">
<source>Your Name</source> <source>Your Name</source>
<target>Your Name</target> <target>Your Name</target>
<note>Label for Your Name section of user profile form.</note> <note>Label for Your Name section of user profile form.</note>
</trans-unit> </trans-unit>
<trans-unit id="Your report will be sent to the relays you are connected to" xml:space="preserve">
<source>Your report will be sent to the relays you are connected to</source>
<target>Your report will be sent to the relays you are connected to</target>
<note>Footer text to inform user what will happen when the report is submitted.</note>
</trans-unit>
<trans-unit id="Zebedee" xml:space="preserve"> <trans-unit id="Zebedee" xml:space="preserve">
<source>Zebedee</source> <source>Zebedee</source>
<target>Zebedee</target> <target>Zebedee</target>

BIN
damus Localizations/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings

Binary file not shown.

39
damus/ContentView.swift

@ -434,21 +434,26 @@ struct ContentView: View {
.onReceive(handle_notify(.new_mutes)) { notif in .onReceive(handle_notify(.new_mutes)) { notif in
home.filter_muted() home.filter_muted()
} }
.alert("User blocked", isPresented: $user_blocked_confirm, actions: { .alert(NSLocalizedString("User blocked", comment: "Alert message to indicate "), isPresented: $user_blocked_confirm, actions: {
Button("Thanks!") { 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 user_blocked_confirm = false
} }
}, message: { }, message: {
if let pubkey = self.blocking { if let pubkey = self.blocking {
let profile = damus_state!.profiles.lookup(id: pubkey) let profile = damus_state!.profiles.lookup(id: pubkey)
let name = Profile.displayName(profile: profile, pubkey: 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 { } 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: { .alert(NSLocalizedString("Create new mutelist", comment: "Title of alert prompting the user to create a new mutelist."), isPresented: $confirm_overwrite_mutelist, actions: {
Button("Yes, Overwrite") { 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 { guard let ds = damus_state else {
return return
} }
@ -472,16 +477,14 @@ struct ContentView: View {
confirm_block = false confirm_block = false
user_blocked_confirm = true user_blocked_confirm = true
} }
Button("Cancel") {
confirm_overwrite_mutelist = false
confirm_block = false
}
}, message: { }, message: {
Text("No block list found, create a new one? This will overwrite any previous block lists.") 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("Block User", isPresented: $confirm_block, actions: { .alert(NSLocalizedString("Block User", comment: "Title of alert for blocking a user."), isPresented: $confirm_block, actions: {
Button("Block") { Button(NSLocalizedString("Cancel", comment: "Alert button to cancel out of alert for blocking a user."), role: .cancel) {
confirm_block = false
}
Button(NSLocalizedString("Block", comment: "Alert button to block a user."), role: .destructive) {
guard let ds = damus_state else { guard let ds = damus_state else {
return return
} }
@ -503,17 +506,13 @@ struct ContentView: View {
ds.pool.send(.event(ev)) ds.pool.send(.event(ev))
} }
} }
Button("Cancel") {
confirm_block = false
}
}, message: { }, message: {
if let pubkey = blocking { if let pubkey = blocking {
let profile = damus_state?.profiles.lookup(id: pubkey) let profile = damus_state?.profiles.lookup(id: pubkey)
let name = Profile.displayName(profile: profile, pubkey: 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 { } 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.")
} }
}) })
} }

4
damus/Views/ConfigView.swift

@ -139,10 +139,10 @@ struct ConfigView: View {
.navigationTitle(NSLocalizedString("Settings", comment: "Navigation title for Settings view.")) .navigationTitle(NSLocalizedString("Settings", comment: "Navigation title for Settings view."))
.navigationBarTitleDisplayMode(.large) .navigationBarTitleDisplayMode(.large)
.alert(NSLocalizedString("Logout", comment: "Alert for logging out the user."), isPresented: $confirm_logout) { .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 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, ()) notify(.logout, ())
} }
} message: { } message: {

6
damus/Views/EULAView.swift

@ -16,7 +16,7 @@ struct EULAView: View {
DamusGradient() DamusGradient()
ScrollView { 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()) .font(.title.bold())
.foregroundColor(.white) .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) { NavigationLink(destination: CreateAccountView(), isActive: $creating_account) {
EmptyView() EmptyView()
} }
DamusWhiteButton("Accept") { DamusWhiteButton(NSLocalizedString("Accept", comment: "Button to accept the end user license agreement before being allowed into the app.")) {
creating_account = true 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() dismiss()
} }
} }

4
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") 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)) let target: ReportTarget = .note(ReportNoteTarget(pubkey: event.pubkey, note_id: event.id))
notify(.report, target) notify(.report, target)
} label: { } label: {
Label(NSLocalizedString("Report", comment: "Context menu option for reporting content."), systemImage: "exclamationmark.bubble") Label(NSLocalizedString("Report", comment: "Context menu option for reporting content."), systemImage: "exclamationmark.bubble")
} }
Button { Button(role: .destructive) {
notify(.block, event.pubkey) notify(.block, event.pubkey)
} label: { } label: {
Label(NSLocalizedString("Block", comment: "Context menu option for blocking users."), systemImage: "exclamationmark.octagon") Label(NSLocalizedString("Block", comment: "Context menu option for blocking users."), systemImage: "exclamationmark.octagon")

2
damus/Views/Muting/MutelistView.swift

@ -43,7 +43,7 @@ struct MutelistView: View {
RemoveAction(pubkey: pubkey) RemoveAction(pubkey: pubkey)
} }
} }
.navigationTitle("Blocked Users") .navigationTitle(NSLocalizedString("Blocked Users", comment: "Navigation title of view to see list of blocked users."))
} }
} }

8
damus/Views/ProfileView.swift

@ -374,17 +374,17 @@ struct ProfileView: View {
} }
} }
} }
.confirmationDialog("Actions", isPresented: $action_sheet_presented) { .confirmationDialog(NSLocalizedString("Actions", comment: "Title for confirmation dialog to either share, report, or block a profile."), isPresented: $action_sheet_presented) {
Button("Share") { Button(NSLocalizedString("Share", comment: "Button to share the link to a profile.")) {
show_share_sheet = true show_share_sheet = true
} }
Button("Report") { Button(NSLocalizedString("Report", comment: "Button to report a profile."), role: .destructive) {
let target: ReportTarget = .user(profile.pubkey) let target: ReportTarget = .user(profile.pubkey)
notify(.report, target) notify(.report, target)
} }
Button("Block") { Button(NSLocalizedString("Block", comment: "Button to block a profile."), role: .destructive) {
notify(.block, profile.pubkey) notify(.block, profile.pubkey)
} }
} }

22
damus/Views/ReportView.swift

@ -25,16 +25,16 @@ struct ReportView: View {
var Success: some View { var Success: some View {
VStack(alignment: .center, spacing: 20) { 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) .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) Text(report_id)
Button("Copy Report ID") { Button(NSLocalizedString("Copy Report ID", comment: "Button to copy report ID.")) {
UIPasteboard.general.string = report_id UIPasteboard.general.string = report_id
let g = UIImpactFeedbackGenerator(style: .medium) let g = UIImpactFeedbackGenerator(style: .medium)
g.impactOccurred() g.impactOccurred()
@ -59,33 +59,33 @@ struct ReportView: View {
var MainForm: some View { var MainForm: some View {
VStack { VStack {
Text("Report") Text("Report", comment: "Label indicating that the current view is for the user to report content.")
.font(.headline) .font(.headline)
.padding() .padding()
Form { Form {
Section(content: { 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) 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) 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) do_send_report(type: .illegal)
} }
if case .user = target { 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) do_send_report(type: .impersonation)
} }
} }
}, header: { }, 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: { }, 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.")
}) })
} }
} }

4
damus/Views/SideMenuView.swift

@ -148,10 +148,10 @@ struct SideMenuView: View {
isSidebarVisible.toggle() isSidebarVisible.toggle()
} }
.alert("Logout", isPresented: $confirm_logout) { .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 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, ()) notify(.logout, ())
} }
} message: { } message: {

Loading…
Cancel
Save