Fix localization issues and export strings for translation

This commit is contained in:
2023-04-04 10:26:02 -04:00
parent ddf60e78b9
commit 2f4e33fc9f
4 changed files with 87 additions and 112 deletions

View File

@@ -42,42 +42,42 @@ enum Wallet: String, CaseIterable, Identifiable {
return .init(index: -1, tag: "systemdefaultwallet", displayName: NSLocalizedString("Local default", comment: "Dropdown option label for system default for Lightning wallet."),
link: "lightning:", appStoreLink: "lightning:", image: "")
case .strike:
return .init(index: 0, tag: "strike", displayName: NSLocalizedString("Strike", comment: "Dropdown option label for Lightning wallet, Strike."), link: "strike:",
return .init(index: 0, tag: "strike", displayName: "Strike", link: "strike:",
appStoreLink: "https://apps.apple.com/us/app/strike-bitcoin-payments/id1488724463", image: "strike")
case .cashapp:
return .init(index: 1, tag: "cashapp", displayName: NSLocalizedString("Cash App", comment: "Dropdown option label for Lightning wallet, Cash App."), link: "https://cash.app/launch/lightning/",
return .init(index: 1, tag: "cashapp", displayName: "Cash App", link: "https://cash.app/launch/lightning/",
appStoreLink: "https://apps.apple.com/us/app/cash-app/id711923939", image: "cashapp")
case .muun:
return .init(index: 2, tag: "muun", displayName: NSLocalizedString("Muun", comment: "Dropdown option label for Lightning wallet, Muun."), link: "muun:", appStoreLink: "https://apps.apple.com/us/app/muun-wallet/id1482037683", image: "muun")
return .init(index: 2, tag: "muun", displayName: "Muun", link: "muun:", appStoreLink: "https://apps.apple.com/us/app/muun-wallet/id1482037683", image: "muun")
case .bluewallet:
return .init(index: 3, tag: "bluewallet", displayName: NSLocalizedString("Blue Wallet", comment: "Dropdown option label for Lightning wallet, Blue Wallet."), link: "bluewallet:lightning:",
return .init(index: 3, tag: "bluewallet", displayName: "Blue Wallet", link: "bluewallet:lightning:",
appStoreLink: "https://apps.apple.com/us/app/bluewallet-bitcoin-wallet/id1376878040", image: "bluewallet")
case .walletofsatoshi:
return .init(index: 4, tag: "walletofsatoshi", displayName: NSLocalizedString("Wallet of Satoshi", comment: "Dropdown option label for Lightning wallet, Wallet of Satoshi."), link: "walletofsatoshi:lightning:",
return .init(index: 4, tag: "walletofsatoshi", displayName: "Wallet of Satoshi", link: "walletofsatoshi:lightning:",
appStoreLink: "https://apps.apple.com/us/app/wallet-of-satoshi/id1438599608", image: "walletofsatoshi")
case .zebedee:
return .init(index: 5, tag: "zebedee", displayName: NSLocalizedString("Zebedee", comment: "Dropdown option label for Lightning wallet, Zebedee."), link: "zebedee:lightning:",
return .init(index: 5, tag: "zebedee", displayName: "Zebedee", link: "zebedee:lightning:",
appStoreLink: "https://apps.apple.com/us/app/zebedee-wallet/id1484394401", image: "zebedee")
case .zeusln:
return .init(index: 6, tag: "zeusln", displayName: NSLocalizedString("Zeus LN", comment: "Dropdown option label for Lightning wallet, Zeus LN."), link: "zeusln:lightning:",
return .init(index: 6, tag: "zeusln", displayName: "Zeus LN", link: "zeusln:lightning:",
appStoreLink: "https://apps.apple.com/us/app/zeus-ln/id1456038895", image: "zeusln")
case .lnlink:
return .init(index: 7, tag: "lnlink", displayName: NSLocalizedString("LNLink", comment: "Dropdown option label for Lightning wallet, LNLink."), link: "lnlink:lightning:",
return .init(index: 7, tag: "lnlink", displayName: "LNLink", link: "lnlink:lightning:",
appStoreLink: "https://testflight.apple.com/join/aNY4yuuZ", image: "lnlink")
case .phoenix:
return .init(index: 8, tag: "phoenix", displayName: NSLocalizedString("Phoenix", comment: "Dropdown option label for Lightning wallet, Phoenix."), link: "phoenix://",
return .init(index: 8, tag: "phoenix", displayName: "Phoenix", link: "phoenix://",
appStoreLink: "https://apps.apple.com/us/app/phoenix-wallet/id1544097028", image: "phoenix")
case .breez:
return .init(index: 9, tag: "breez", displayName: NSLocalizedString("Breez", comment: "Dropdown option label for Lightning wallet, Breez."), link: "breez:",
return .init(index: 9, tag: "breez", displayName: "Breez", link: "breez:",
appStoreLink: "https://apps.apple.com/us/app/breez-lightning-client-pos/id1463604142", image: "breez")
case .bitcoinbeach:
return .init(index: 10, tag: "bitcoinbeach", displayName: NSLocalizedString("Bitcoin Beach", comment: "Dropdown option label for Lightning wallet, Bitcoin Beach."), link: "bitcoinbeach://",
return .init(index: 10, tag: "bitcoinbeach", displayName: "Bitcoin Beach", link: "bitcoinbeach://",
appStoreLink: "https://apps.apple.com/sv/app/bitcoin-beach-wallet/id1531383905", image: "bbw")
case .blixtwallet:
return .init(index: 11, tag: "blixtwallet", displayName: NSLocalizedString("Blixt Wallet", comment: "Dropdown option label for Lightning wallet, Blixt Wallet"), link: "blixtwallet:lightning:",
return .init(index: 11, tag: "blixtwallet", displayName: "Blixt Wallet", link: "blixtwallet:lightning:",
appStoreLink: "https://testflight.apple.com/join/EXvGhRzS", image: "blixt-wallet")
case .river:
return .init(index: 12, tag: "river", displayName: NSLocalizedString("River", comment: "Dropdown option label for Lightning wallet, River"), link: "river://",
return .init(index: 12, tag: "river", displayName: "River", link: "river://",
appStoreLink: "https://apps.apple.com/us/app/river-buy-mine-bitcoin/id1536176542", image: "river")
}

View File

@@ -25,12 +25,15 @@ struct ReplyView: View {
return "@" + Profile.displayName(profile: prof, pubkey: pk).username
}
.joined(separator: " ")
Text("Replying to ", comment: "Indicating that the user is replying to the following listed people.")
.foregroundColor(.gray)
.font(.footnote) +
Text(names.isEmpty ? "self" : names)
.foregroundColor(.accentColor)
.font(.footnote)
if names.isEmpty {
Text("Replying to \(Text("self", comment: "Part of a larger sentence 'Replying to self' in US English. 'self' indicates that the user is replying to themself and no one else.").foregroundColor(.accentColor).font(.footnote))", comment: "Indicating that the user is replying to the themself and no one else, where the parameter is 'self' in US English.")
.foregroundColor(.gray)
.font(.footnote)
} else {
Text("Replying to \(Text(verbatim: names).foregroundColor(.accentColor).font(.footnote))", comment: "Indicating that the user is replying to the following listed people.")
.foregroundColor(.gray)
.font(.footnote)
}
}
.onTapGesture {
participantsShown.toggle()

View File

@@ -205,21 +205,11 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>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.</target>
<note>Reminder to user that they should save their account information.</note>
</trans-unit>
<trans-unit id="Bitcoin Beach" xml:space="preserve">
<source>Bitcoin Beach</source>
<target>Bitcoin Beach</target>
<note>Dropdown option label for Lightning wallet, Bitcoin Beach.</note>
</trans-unit>
<trans-unit id="Bitcoin Lightning Tips" xml:space="preserve">
<source>Bitcoin Lightning Tips</source>
<target>Bitcoin Lightning Tips</target>
<note>Label for Bitcoin Lightning Tips section of user profile form.</note>
</trans-unit>
<trans-unit id="Blixt Wallet" xml:space="preserve">
<source>Blixt Wallet</source>
<target>Blixt Wallet</target>
<note>Dropdown option label for Lightning wallet, Blixt Wallet</note>
</trans-unit>
<trans-unit id="Block" xml:space="preserve">
<source>Block</source>
<target>Block</target>
@@ -247,11 +237,6 @@ Sentence composed of 2 variables to describe how many people are following a use
<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">
<source>Blue Wallet</source>
<target>Blue Wallet</target>
<note>Dropdown option label for Lightning wallet, Blue Wallet.</note>
</trans-unit>
<trans-unit id="Bookmarks" xml:space="preserve">
<source>Bookmarks</source>
<target>Bookmarks</target>
@@ -263,11 +248,6 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>Boosts</target>
<note>Accessibility label for boosts button</note>
</trans-unit>
<trans-unit id="Breez" xml:space="preserve">
<source>Breez</source>
<target>Breez</target>
<note>Dropdown option label for Lightning wallet, Breez.</note>
</trans-unit>
<trans-unit id="Broadcast" xml:space="preserve">
<source>Broadcast</source>
<target>Broadcast</target>
@@ -286,10 +266,10 @@ Sentence composed of 2 variables to describe how many people are following a use
Cancel deleting the user.
Cancel out of logging out the user.</note>
</trans-unit>
<trans-unit id="Cash App" xml:space="preserve">
<source>Cash App</source>
<target>Cash App</target>
<note>Dropdown option label for Lightning wallet, Cash App.</note>
<trans-unit id="Choose from Library" xml:space="preserve">
<source>Choose from Library</source>
<target>Choose from Library</target>
<note>Option to select photo from library</note>
</trans-unit>
<trans-unit id="Clear All" xml:space="preserve">
<source>Clear All</source>
@@ -349,8 +329,7 @@ Sentence composed of 2 variables to describe how many people are following a use
<trans-unit id="Copy Image" xml:space="preserve">
<source>Copy Image</source>
<target>Copy Image</target>
<note>Context menu option to copy an image into clipboard.
Context menu option to copy an image to clipboard.</note>
<note>Context menu option to copy an image into clipboard.</note>
</trans-unit>
<trans-unit id="Copy Image URL" xml:space="preserve">
<source>Copy Image URL</source>
@@ -397,6 +376,11 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>Copy invoice</target>
<note>Title of section for copying a Lightning invoice identifier.</note>
</trans-unit>
<trans-unit id="Could not find the user you're looking for" xml:space="preserve">
<source>Could not find the user you're looking for</source>
<target>Could not find the user you're looking for</target>
<note>Indicates that there are no users found.</note>
</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>
@@ -432,11 +416,17 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>Custom Zap Amount</target>
<note>Header text to indicate that the text field below it is to enter a custom zap amount.</note>
</trans-unit>
<trans-unit id="DM by %@" xml:space="preserve">
<source>DM by %@</source>
<target>DM by %@</target>
<note>DM by heading in local notification</note>
</trans-unit>
<trans-unit id="DMs" xml:space="preserve">
<source>DMs</source>
<target>DMs</target>
<note>Navigation title for DMs view, where DM is the English abbreviation for Direct Message.
Navigation title for view of DMs, where DM is an English abbreviation for Direct Message.
Setting to enable DM Local Notification
Toolbar label for DMs view, where DM is the English abbreviation for Direct Message.</note>
</trans-unit>
<trans-unit id="Damus" xml:space="preserve">
@@ -525,11 +515,6 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>Edit</target>
<note>Button to edit user's profile.</note>
</trans-unit>
<trans-unit id="Edit participants" xml:space="preserve">
<source>Edit participants</source>
<target>Edit participants</target>
<note>Text indicating that the view is used for editing which participants are replied to in a note.</note>
</trans-unit>
<trans-unit id="Encrypted" xml:space="preserve">
<source>Encrypted</source>
<target>Encrypted</target>
@@ -651,11 +636,6 @@ Sentence composed of 2 variables to describe how many people are following a use
<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">
<source>LNLink</source>
<target>LNLink</target>
<note>Dropdown option label for Lightning wallet, LNLink.</note>
</trans-unit>
<trans-unit id="Left Handed" xml:space="preserve">
<source>Left Handed</source>
<target>Left Handed</target>
@@ -686,11 +666,26 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>Like</target>
<note>Accessibility Label for Like button</note>
</trans-unit>
<trans-unit id="Liked by %@" xml:space="preserve">
<source>Liked by %@</source>
<target>Liked by %@</target>
<note>Liked by heading in local notification</note>
</trans-unit>
<trans-unit id="Likes" xml:space="preserve">
<source>Likes</source>
<target>Likes</target>
<note>Setting to enable Like Local Notification</note>
</trans-unit>
<trans-unit id="Load %lld more" xml:space="preserve">
<source>Load %lld more</source>
<target>Load %lld more</target>
<note>Button text for loading more events, where the variable is the number of events.</note>
</trans-unit>
<trans-unit id="Local Notifications" xml:space="preserve">
<source>Local Notifications</source>
<target>Local Notifications</target>
<note>Section header for damus local notifications user configuration</note>
</trans-unit>
<trans-unit id="Local authentication to access private key" xml:space="preserve">
<source>Local authentication to access private key</source>
<target>Local authentication to access private key</target>
@@ -724,20 +719,15 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>Make sure your nsec account key is saved before you logout or you will lose access to this account</target>
<note>Reminder message in alert to get customer to verify that their private security account key is saved saved before logging out.</note>
</trans-unit>
<trans-unit id="Mentioned by %@" xml:space="preserve">
<source>Mentioned by %@</source>
<target>Mentioned by %@</target>
<note>Mentioned by heading in local notification</note>
</trans-unit>
<trans-unit id="Mentions" xml:space="preserve">
<source>Mentions</source>
<target>Mentions</target>
<note>Label for filter for seeing mention notifications (replies, etc).</note>
</trans-unit>
<trans-unit id="Miscellaneous" xml:space="preserve">
<source>Miscellaneous</source>
<target>Miscellaneous</target>
<note>Section header for miscellaneous user configuration</note>
</trans-unit>
<trans-unit id="Muun" xml:space="preserve">
<source>Muun</source>
<target>Muun</target>
<note>Dropdown option label for Lightning wallet, Muun.</note>
<note>Setting to enable Mention Local Notification</note>
</trans-unit>
<trans-unit id="NIP-05 Verification" xml:space="preserve">
<source>NIP-05 Verification</source>
@@ -825,11 +815,6 @@ Sentence composed of 2 variables to describe how many people are following a use
<note>Alert for deleting the users account.
Section title for deleting the user</note>
</trans-unit>
<trans-unit id="Phoenix" xml:space="preserve">
<source>Phoenix</source>
<target>Phoenix</target>
<note>Dropdown option label for Lightning wallet, Phoenix.</note>
</trans-unit>
<trans-unit id="Plan" xml:space="preserve">
<source>Plan</source>
<target>Plan</target>
@@ -967,6 +952,11 @@ Picker option to indicate that a zap should be sent privately and not identify t
<target>Reply</target>
<note>Accessibility label for reply button</note>
</trans-unit>
<trans-unit id="Replying to" xml:space="preserve">
<source>Replying to</source>
<target>Replying to</target>
<note>Text indicating that the view is used for editing which participants are replied to in a note.</note>
</trans-unit>
<trans-unit id="Replying to %@" xml:space="preserve">
<source>Replying to %@</source>
<target>Replying to %@</target>
@@ -982,11 +972,6 @@ Picker option to indicate that a zap should be sent privately and not identify t
<target>Replying to self</target>
<note>Label to indicate that the user is replying to themself.</note>
</trans-unit>
<trans-unit id="Replying to:" xml:space="preserve">
<source>Replying to:</source>
<target>Replying to:</target>
<note>Indicating that the user is replying to the following listed people.</note>
</trans-unit>
<trans-unit id="Report" xml:space="preserve">
<source>Report</source>
<target>Report</target>
@@ -1014,10 +999,16 @@ Picker option to indicate that a zap should be sent privately and not identify t
<target>Reposted</target>
<note>Text indicating that the post was reposted (i.e. re-shared).</note>
</trans-unit>
<trans-unit id="Reposted by %@" xml:space="preserve">
<source>Reposted by %@</source>
<target>Reposted by %@</target>
<note>Reposted by heading in local notification</note>
</trans-unit>
<trans-unit id="Reposts" xml:space="preserve">
<source>Reposts</source>
<target>Reposts</target>
<note>Navigation bar title for Reposts view.</note>
<note>Navigation bar title for Reposts view.
Setting to enable Repost Local Notification</note>
</trans-unit>
<trans-unit id="Requests" xml:space="preserve">
<source>Requests</source>
@@ -1029,11 +1020,6 @@ Picker option to indicate that a zap should be sent privately and not identify t
<target>Retry</target>
<note>Button to retry completing account creation after an error occurred.</note>
</trans-unit>
<trans-unit id="River" xml:space="preserve">
<source>River</source>
<target>River</target>
<note>Dropdown option label for Lightning wallet, River</note>
</trans-unit>
<trans-unit id="Satoshi Nakamoto" xml:space="preserve">
<source>Satoshi Nakamoto</source>
<target>Satoshi Nakamoto</target>
@@ -1169,16 +1155,16 @@ Picker option to indicate that a zap should be sent privately and not identify t
<target>Software</target>
<note>Label to display relay software.</note>
</trans-unit>
<trans-unit id="Strike" xml:space="preserve">
<source>Strike</source>
<target>Strike</target>
<note>Dropdown option label for Lightning wallet, Strike.</note>
</trans-unit>
<trans-unit id="Supported NIPs" xml:space="preserve">
<source>Supported NIPs</source>
<target>Supported NIPs</target>
<note>Label to display relay's supported NIPs.</note>
</trans-unit>
<trans-unit id="Take Photo" xml:space="preserve">
<source>Take Photo</source>
<target>Take Photo</target>
<note>Option to take a photo with the camera</note>
</trans-unit>
<trans-unit id="Thanks!" xml:space="preserve">
<source>Thanks!</source>
<target>Thanks!</target>
@@ -1234,11 +1220,6 @@ Picker option to indicate that a zap should be sent privately and not identify t
<target>Translated from %@</target>
<note>Button to indicate that the note has been translated from a different language.</note>
</trans-unit>
<trans-unit id="Translating from %@..." xml:space="preserve">
<source>Translating from %@...</source>
<target>Translating from %@...</target>
<note>Button to indicate that the note is in the process of being translated from a different language.</note>
</trans-unit>
<trans-unit id="Translations" xml:space="preserve">
<source>Translations</source>
<target>Translations</target>
@@ -1318,15 +1299,10 @@ YOU WILL NO LONGER BE ABLE TO LOG INTO DAMUS USING THIS ACCOUNT KEY.
<target>Wallet</target>
<note>Sidebar menu label for Wallet view.</note>
</trans-unit>
<trans-unit id="Wallet Selector" xml:space="preserve">
<source>Wallet Selector</source>
<target>Wallet Selector</target>
<note>Section title for selection of wallet.</note>
</trans-unit>
<trans-unit id="Wallet of Satoshi" xml:space="preserve">
<source>Wallet of Satoshi</source>
<target>Wallet of Satoshi</target>
<note>Dropdown option label for Lightning wallet, Wallet of Satoshi.</note>
<trans-unit id="Wallet and others" xml:space="preserve">
<source>Wallet and others</source>
<target>Wallet and others</target>
<note>Section header for miscellaneous user configuration</note>
</trans-unit>
<trans-unit id="Website" xml:space="preserve">
<source>Website</source>
@@ -1408,17 +1384,8 @@ YOU WILL NO LONGER BE ABLE TO LOG INTO DAMUS USING THIS ACCOUNT KEY.
<trans-unit id="Zaps" xml:space="preserve">
<source>Zaps</source>
<target>Zaps</target>
<note>Navigation bar title for the Zaps view.</note>
</trans-unit>
<trans-unit id="Zebedee" xml:space="preserve">
<source>Zebedee</source>
<target>Zebedee</target>
<note>Dropdown option label for Lightning wallet, Zebedee.</note>
</trans-unit>
<trans-unit id="Zeus LN" xml:space="preserve">
<source>Zeus LN</source>
<target>Zeus LN</target>
<note>Dropdown option label for Lightning wallet, Zeus LN.</note>
<note>Navigation bar title for the Zaps view.
Setting to enable Zap Local Notification</note>
</trans-unit>
<trans-unit id="https://example.com/pic.jpg" xml:space="preserve">
<source>https://example.com/pic.jpg</source>
@@ -1535,6 +1502,11 @@ YOU WILL NO LONGER BE ABLE TO LOG INTO DAMUS USING THIS ACCOUNT KEY.
<target>satoshi</target>
<note>Example username of Bitcoin creator(s), Satoshi Nakamoto.</note>
</trans-unit>
<trans-unit id="self" xml:space="preserve">
<source>self</source>
<target>self</target>
<note>Part of a larger sentence 'Replying to self' in US English. 'self' indicates that the user is replying to themself and no one else.</note>
</trans-unit>
<trans-unit id="wss://some.relay.com" xml:space="preserve">
<source>wss://some.relay.com</source>
<target>wss://some.relay.com</target>