.navigationBarTitle(selected_timeline==.home?NSLocalizedString("Home",comment:"Navigation bar title for Home view where posts and replies appear from those who the user is following."):NSLocalizedString("Global",comment:"Navigation bar title for Global view where posts from all connected relay servers appear."),displayMode:.inline)
CarouselItem(image:Image("digital-nomad"),text:Text("Welcome to the social network \(Text("you").italic()) control.")),
CarouselItem(image:Image("digital-nomad"),text:Text("Welcome to the social network \(Text("you",comment:"You, in this context, is the person who controls their own social network. You is used in the context of a larger sentence that welcomes the reader to the social network that they control themself.").italic()) control.",comment:"Welcoming message to the reader. The variable is 'you', the reader.")),
CarouselItem(image:Image("encrypted-message"),
text:Text("\(Text("Encrypted").bold()). End-to-End encrypted private messaging. Keep Big Tech out of your DMs")),
text:Text("\(Text("Encrypted",comment:"Heading indicating that this application keeps private messaging end-to-end encrypted.").bold()). End-to-End encrypted private messaging. Keep Big Tech out of your DMs",comment:"Explanation of what is done to keep private data encrypted. There is a heading that precedes this explanation which is a variable to this string.")),
CarouselItem(image:Image("undercover"),
text:Text("\(Text("Private").bold()). Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.")),
text:Text("\(Text("Private",comment:"Heading indicating that this application keeps personally identifiable information private. A sentence describing what is done to keep data private comes after this heading.").bold()). Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.",comment:"Explanation of what is done to keep personally identifiable information private. There is a heading that precedes this explanation which is a variable to this string.")),
CarouselItem(image:Image("bitcoin-p2p"),
text:Text("\(Text("Earn Money").bold()). Tip your friend's posts and stack sats with Bitcoin⚡️, the native currency of the internet."))
text:Text("\(Text("Earn Money",comment:"Heading indicating that this application allows users to earn money.").bold()). Tip your friend's posts and stack sats with Bitcoin⚡️, the native currency of the internet.",comment:"Explanation of what can be done by users to earn money. There is a heading that precedes this explanation which is a variable to this string."))
Section(NSLocalizedString("Wallet Selector",comment:"Section title for selection of wallet.")){
Toggle(NSLocalizedString("Show wallet selector",comment:"Toggle to show or hide selection of wallet."),isOn:$user_settings.show_wallet_selector).toggleStyle(.switch)
Picker(NSLocalizedString("Select default wallet",comment:"Prompt selection of user's default wallet"),
selection:$user_settings.default_wallet){
ForEach(Wallet.allCases,id:\.self){walletin
Text(wallet.model.displayName)
@ -114,32 +114,32 @@ struct ConfigView: View {
}
}
Section("Clear Cache"){
Button("Clear"){
Section(NSLocalizedString("Clear Cache",comment:"Section title for clearing cached data.")){
Button(NSLocalizedString("Clear",comment:"Button for clearing cached data.")){
Section(NSLocalizedString("Reset",comment:"Section title for resetting the user")){
Button(NSLocalizedString("Logout",comment:"Button to logout the user.")){
confirm_logout=true
}
}
}
}
.navigationTitle("Settings")
.navigationTitle(NSLocalizedString("Settings",comment:"Navigation title for Settings view."))
.navigationBarTitleDisplayMode(.large)
.alert("Logout",isPresented:$confirm_logout){
Button("Cancel"){
.alert(NSLocalizedString("Logout",comment:"Alert for logging out the user."),isPresented:$confirm_logout){
Button(NSLocalizedString("Cancel",comment:"Cancel out of logging out the user.")){
confirm_logout=false
}
Button("Logout"){
Button(NSLocalizedString("Logout",comment:"Button for logging out the user.")){
notify(.logout,())
}
}message:{
Text("Make sure your nsec account key is saved before you logout or you will lose access to this account")
Text("Make sure your nsec account key is saved before you logout or you will lose access to this account",comment:"Reminder message in alert to get customer to verify that their private security account key is saved saved before logging out.")
.navigationTitle(NSLocalizedString("Encrypted DMs",comment:"Navigation title for view of encrypted DMs, where DM is an English abbreviation for Direct Message."))
Section(NSLocalizedString("Bitcoin Lightning Tips",comment:"Label for Bitcoin Lightning Tips section of user profile form.")){
TextField(NSLocalizedString("Lightning Address or LNURL",comment:"Placeholder text for entry of Lightning Address or LNURL."),text:$ln)
.autocorrectionDisabled(true)
.textInputAutocapitalization(.never)
}
Section(content:{
TextField("jb55@jb55.com",text:$nip05)
TextField(NSLocalizedString("jb55@jb55.com",comment:"Placeholder example text for identifier used for NIP-05 verification."),text:$nip05)
.autocorrectionDisabled(true)
.textInputAutocapitalization(.never)
},header:{
Text("NIP-05 Verification")
Text("NIP-05 Verification",comment:"Label for NIP-05 Verification section of user profile form.")
},footer:{
ifletparts=nip05_parts{
Text("'\(parts.username)' at '\(parts.host)' will be used for verification",comment:"Description of how the nip05 identifier would be used for verification.")
Text(String(format:NSLocalizedString("collapsed_event_view_other_notes",comment:"Text to indicate that the thread was collapsed and that there are other notes to view if tapped."),c.count))
.padding([.top,.bottom],8)
.font(.footnote)
.foregroundColor(.gray)
@ -114,7 +114,7 @@ struct EventDetailView: View {
scroll_after_load(thread:thread,proxy:proxy)
}
}
.navigationBarTitle("Thread")
.navigationBarTitle(NSLocalizedString("Thread",comment:"Navigation bar title for note thread."))
Text("Boosted",comment:"Text indicating that the post was boosted (i.e. re-shared).")
.font(.footnote.weight(.bold))
.foregroundColor(Color.gray)
}
@ -308,7 +308,7 @@ extension View {
Button{
UIPasteboard.general.string=bech32_pubkey
}label:{
Label("Copy Account ID",systemImage:"doc.on.doc")
Label(NSLocalizedString("Copy Account ID",comment:"Context menu option for copying the ID of the account that created the note."),systemImage:"doc.on.doc")
Label(NSLocalizedString("Broadcast",comment:"Context menu option for broadcasting the user's note to all of the user's connected relay servers."),systemImage:"globe")
Text("Unfollowing",comment:"Text to indicate that the button next to it is in a state that indicates that it is in the process of unfollowing a profile.")
.navigationBarTitle(NSLocalizedString("\(Profile.displayName(profile:profile,pubkey:whos))'s Followers",comment:"Navigation bar title for view that shows who is following a user."))
.onAppear{
followers.subscribe()
}
@ -91,7 +91,7 @@ struct FollowingView: View {
.onDisappear{
following.unsubscribe()
}
.navigationBarTitle("\(who) following")
.navigationBarTitle(NSLocalizedString("\(who) following",comment:"Navigation bar title for view that shows who a user is following."))
Text("Login",comment:"Title of view to log into an account.")
.foregroundColor(.white)
.font(.title)
.padding()
Text("Enter your account key to login:")
Text("Enter your account key to login:",comment:"Prompt for user to enter an account key to login.")
.foregroundColor(.white)
.padding()
KeyInput("nsec1...",key:$key)
KeyInput(NSLocalizedString("nsec1...",comment:"Prompt for user to enter in an account key to login. This text shows the characters the key could start with if it was a private key."),key:$key)
letparsed=parse_key(key)
ifparsed?.is_hex??false{
Text("This is an old-style nostr key. We're not sure if it's a pubkey or private key. Please toggle the button below if this a public key.")
Text("This is an old-style nostr key. We're not sure if it's a pubkey or private key. Please toggle the button below if this a public key.",comment:"Warning that the inputted account key for login is an old-style and asking user to verify if it is a public key.")
.font(.subheadline.bold())
.foregroundColor(.white)
PubkeySwitch(isOn:$is_pubkey)
@ -150,15 +150,15 @@ struct LoginView: View {
}
ifparsed?.is_pub??false{
Text("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.")
Text("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.",comment:"Warning that the inputted account key is a public key and the result of what happens because of it.")
.foregroundColor(.white)
.padding()
}
ifletp=parsed{
DamusWhiteButton("Login"){
DamusWhiteButton(NSLocalizedString("Login",comment:"Button to log into account.")){
if!process_login(p,is_pubkey:self.is_pubkey){
self.error="Invalid key"
self.error=NSLocalizedString("Invalid key",comment:"Error message indicating that an invalid account key was entered for login.")
}
}
}
@ -175,7 +175,7 @@ struct PubkeySwitch: View {
varbody:someView{
HStack{
Toggle(isOn:$isOn){
Text("Public Key?")
Text("Public Key?",comment:"Prompt to ask user if the key they entered is a public key.")
Text("\(Text("\(profile.following)",comment:"Number of profiles a user is following.").font(.subheadline.weight(.medium)))\(Text("Following",comment:"Part of a larger sentence to describe how many profiles a user is following.").font(.subheadline).foregroundColor(.gray))",comment:"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'.")
Text("\(Text("\(relays.keys.count)",comment:"Number of relay servers a user is connected.").font(.subheadline.weight(.medium)))\(Text("Relays",comment:"Part of a larger sentence to describe how many relay servers a user is connected.").font(.subheadline).foregroundColor(.gray))",comment:"Sentence composed of 2 variables to describe how many relay servers a user is connected. In source English, the first variable is the number of relay servers, and the second variable is 'Relays'.")
}
.buttonStyle(PlainButtonStyle())
}
@ -307,13 +299,12 @@ struct ProfileView: View {
HStack{
iffollowers.count_display=="?"{
Image(systemName:"square.and.arrow.down")
Text("Followers",comment:"Label describing followers of a user.")
.font(.subheadline)
.foregroundColor(.gray)
}else{
Text("\(followers.count_display)")
.font(.subheadline.weight(.medium))
Text("\(Text("\(followers.count_display)",comment:"Number of people following a user.").font(.subheadline.weight(.medium)))\(Text("Followers",comment:"Part of a larger sentence to describe how many people are following a user.").font(.subheadline).foregroundColor(.gray))",comment:"Sentence composed of 2 variables to describe how many people are following a user. In source English, the first variable is the number of followers, and the second variable is 'Followers'.")
}
Text("Followers")
.font(.subheadline)
.foregroundColor(.gray)
}
}
@ -405,7 +396,7 @@ struct KeyView: View {
isCopied=false
}
}label:{
Label("Public Key",systemImage:"key.fill")
Label(NSLocalizedString("Public Key",comment:"Label indicating that the text is a user's public account key."),systemImage:"key.fill")
.font(.custom("key",size:12.0))
.labelStyle(IconOnlyLabelStyle())
.foregroundStyle(hex_to_rgb(pubkey))
@ -428,7 +419,7 @@ struct KeyView: View {
}
}label:{
Label{
Text("Public key")
Text("Public key",comment:"Label indicating that the text is a user's public account key.")
}icon:{
Image("ic-copy")
.contentShape(Rectangle())
@ -441,7 +432,7 @@ struct KeyView: View {
HStack{
Image("ic-tick")
.frame(width:20,height:20)
Text("Copied")
Text(NSLocalizedString("Copied",comment:"Label indicating that a user's key was copied."))
Text("Welcome, \(account.rendered_name)!",comment:"Text to welcome user.")
.font(.title.bold())
.foregroundColor(.white)
.padding(.bottom,10)
Text("Before we get started, you'll need to save your account info, otherwise you won't be able to login in the future if you ever uninstall Damus.")
Text("Before we get started, you'll need to save your account info, otherwise you won't be able to login in the future if you ever uninstall Damus.",comment:"Reminder to user that they should save their account information.")
.foregroundColor(.white)
.padding(.bottom,10)
Text("Public Key")
Text("Public Key",comment:"Label to indicate that text below is the user's public key used by others to uniquely refer to the user.")
.font(.title2.bold())
.foregroundColor(.white)
.padding(.bottom,10)
Text("This is your account ID, you can give this to your friends so that they can follow you. Click to copy.")
Text("This is your account ID, you can give this to your friends so that they can follow you. Click to copy.",comment:"Label to describe that a public key is the user's account ID and what they can do with it.")
.foregroundColor(.white)
.padding(.bottom,10)
@ -43,12 +43,12 @@ struct SaveKeysView: View {
.padding(.bottom,10)
ifpub_copied{
Text("Private Key")
Text("Private Key",comment:"Label to indicate that the text below is the user's private key used by only the user themself as a secret to login to access their account.")
.font(.title2.bold())
.foregroundColor(.white)
.padding(.bottom,10)
Text("This is your secret account key. You need this to access your account. Don't share this with anyone! Save it in a password manager and keep it safe!")
Text("This is your secret account key. You need this to access your account. Don't share this with anyone! Save it in a password manager and keep it safe!",comment:"Label to describe that a private key is the user's secret account key and what they should do with it.")
}.navigationBarTitle(Text("Pay the lightning invoice"),displayMode:.inline).navigationBarItems(trailing:Button(action:{
}.navigationBarTitle(Text("Pay the Lightning invoice",comment:"Navigation bar title for view to pay Lightning invoice."),displayMode:.inline).navigationBarItems(trailing:Button(action:{
self.showingSelectWallet=false
}){
Text("Done").bold()
Text("Done",comment:"Button to dismiss wallet selection view for paying Lightning invoice.").bold()