diff --git a/damus/Components/SupporterBadge.swift b/damus/Components/SupporterBadge.swift
index f6241bec..1af67eee 100644
--- a/damus/Components/SupporterBadge.swift
+++ b/damus/Components/SupporterBadge.swift
@@ -46,7 +46,7 @@ struct SupporterBadge_Previews: PreviewProvider {
HStack(alignment: .center) {
SupporterBadge(percent: p)
.frame(width: 50)
- Text("\(p)")
+ Text(verbatim: p.formatted())
.frame(width: 50)
}
}
diff --git a/damus/Views/Relays/RelayDetailView.swift b/damus/Views/Relays/RelayDetailView.swift
index 5814a539..6a7b6c91 100644
--- a/damus/Views/Relays/RelayDetailView.swift
+++ b/damus/Views/Relays/RelayDetailView.swift
@@ -24,7 +24,11 @@ struct RelayDetailView: View {
}
func FieldText(_ str: String?) -> some View {
- Text(str ?? "No data available")
+ if let s = str {
+ return Text(verbatim: s)
+ } else {
+ return Text("No data available", comment: "Text indicating that there is no data available to show for specific metadata about a relay server.")
+ }
}
var body: some View {
diff --git a/damus/Views/Wallet/ConnectWalletView.swift b/damus/Views/Wallet/ConnectWalletView.swift
index de16540c..a926935b 100644
--- a/damus/Views/Wallet/ConnectWalletView.swift
+++ b/damus/Views/Wallet/ConnectWalletView.swift
@@ -17,7 +17,7 @@ struct ConnectWalletView: View {
var body: some View {
MainContent
- .navigationTitle("Attach a Wallet")
+ .navigationTitle(NSLocalizedString("Attach a Wallet", comment: "Navigation title for attaching Nostr Wallet Connect lightning wallet."))
.navigationBarTitleDisplayMode(.large)
.padding()
.onChange(of: wallet_scan_result) { res in
@@ -39,7 +39,7 @@ struct ConnectWalletView: View {
func AreYouSure(nwc: WalletConnectURL) -> some View {
VStack {
- Text("Are you sure you want to attach this wallet?")
+ Text("Are you sure you want to attach this wallet?", comment: "Prompt to ask user if they want to attach their Nostr Wallet Connect lightning wallet.")
.font(.title)
Text(nwc.relay.id)
@@ -52,11 +52,11 @@ struct ConnectWalletView: View {
.foregroundColor(.gray)
}
- BigButton("Attach") {
+ BigButton(NSLocalizedString("Attach", comment: "Text for button to attach Nostr Wallet Connect lightning wallet.")) {
model.connect(nwc)
}
- BigButton("Cancel") {
+ BigButton(NSLocalizedString("Cancel", comment: "Text for button to cancel out of connecting Nostr Wallet Connect lightning ewallet.")) {
model.cancel()
}
}
@@ -72,7 +72,7 @@ struct ConnectWalletView: View {
openURL(URL(string:"https://nwc.getalby.com/apps/new?c=Damus")!)
}
- BigButton("Attach Wallet") {
+ BigButton(NSLocalizedString("Attach Wallet", comment: "Text for button to attach Nostr Wallet Connect lightning wallet.")) {
scanning = true
}
@@ -89,7 +89,7 @@ struct ConnectWalletView: View {
case .new(let nwc):
AreYouSure(nwc: nwc)
case .existing:
- Text("Shouldn't happen")
+ Text(verbatim: "Shouldn't happen")
case .none:
ConnectWallet
}
diff --git a/damus/Views/Wallet/WalletView.swift b/damus/Views/Wallet/WalletView.swift
index f5bc9eab..21fd6b47 100644
--- a/damus/Views/Wallet/WalletView.swift
+++ b/damus/Views/Wallet/WalletView.swift
@@ -24,18 +24,18 @@ struct WalletView: View {
Spacer()
- Text("\(nwc.relay.id)")
+ Text(verbatim: nwc.relay.id)
if let lud16 = nwc.lud16 {
- Text("\(lud16)")
+ Text(verbatim: lud16)
}
- BigButton("Disconnect Wallet") {
+ BigButton(NSLocalizedString("Disconnect Wallet", comment: "Text for button to disconnect from Nostr Wallet Connect lightning wallet.")) {
self.model.disconnect()
}
}
- .navigationTitle("Wallet")
+ .navigationTitle(NSLocalizedString("Wallet", comment: "Navigation title for Wallet view"))
.navigationBarTitleDisplayMode(.large)
.padding()
}
@@ -83,16 +83,16 @@ struct WalletView: View {
Image("logo-nobg")
.resizable()
.frame(width: 50, height: 50)
- Text("Support Damus")
+ Text("Support Damus", comment: "Text calling for the user to support Damus through zaps")
.font(.title.bold())
.foregroundColor(.white)
}
- Text("Help build the future of decentralized communication on the web.")
+ Text("Help build the future of decentralized communication on the web.", comment: "Text indicating the goal of developing Damus which the user can help with.")
.fixedSize(horizontal: false, vertical: true)
.foregroundColor(.white)
- Text("An additional percentage of each zap will be sent to support Damus development ")
+ Text("An additional percentage of each zap will be sent to support Damus development", comment: "Text indicating that they can contribute zaps to support Damus development.")
.fixedSize(horizontal: false, vertical: true)
.foregroundColor(.white)
@@ -102,7 +102,7 @@ struct WalletView: View {
Slider(value: binding,
in: WalletView.min_donation...WalletView.max_donation,
label: { })
- Text("\(Int(binding.wrappedValue))%")
+ Text("\(Int(binding.wrappedValue))%", comment: "Percentage of additional zap that should be sent to support Damus development.")
.font(.title.bold())
.foregroundColor(.white)
.frame(width: 80)
@@ -119,12 +119,12 @@ struct WalletView: View {
.frame(width: 120)
}
- Text("Zap")
+ Text("Zap", comment: "Text underneath the number of sats indicating that it's the amount used for zaps.")
.foregroundColor(.white)
}
Spacer()
- Text("+")
+ Text(verbatim: "+")
.font(.title)
.foregroundColor(.white)
Spacer()
@@ -137,23 +137,13 @@ struct WalletView: View {
.frame(width: 120)
}
- Text(percent == 0 ? "🩶" : "💜")
+ Text(verbatim: percent == 0 ? "🩶" : "💜")
.foregroundColor(.white)
}
Spacer()
}
EventProfile(damus_state: damus_state, pubkey: damus_state.pubkey, profile: damus_state.profiles.lookup(id: damus_state.pubkey), size: .small)
-
- /*
- Slider(value: donation_binding(),
- in: WalletView.min...WalletView.max,
- step: 1,
- minimumValueLabel: { Text("\(WalletView.min)") },
- maximumValueLabel: { Text("\(WalletView.max)") },
- label: { Text("label") }
- )
- */
}
.padding(25)
}
diff --git a/damus/Views/Zaps/CustomizeZapView.swift b/damus/Views/Zaps/CustomizeZapView.swift
index e06a667f..543465ae 100644
--- a/damus/Views/Zaps/CustomizeZapView.swift
+++ b/damus/Views/Zaps/CustomizeZapView.swift
@@ -136,7 +136,7 @@ struct CustomizeZapView: View {
VStack(alignment: .center, spacing: 0) {
TextField("", text: $custom_amount)
.placeholder(when: custom_amount.isEmpty, alignment: .center) {
- Text(String("0"))
+ Text(verbatim: 0.formatted())
}
.accentColor(.clear)
.font(.system(size: 72, weight: .heavy))
diff --git a/damus/cs.lproj/Localizable.strings b/damus/cs.lproj/Localizable.strings
index 56327364..6d5ca1b0 100644
Binary files a/damus/cs.lproj/Localizable.strings and b/damus/cs.lproj/Localizable.strings differ
diff --git a/damus/de.lproj/Localizable.strings b/damus/de.lproj/Localizable.strings
index fac44eb6..9beeb069 100644
Binary files a/damus/de.lproj/Localizable.strings and b/damus/de.lproj/Localizable.strings differ
diff --git a/damus/el-GR.lproj/Localizable.strings b/damus/el-GR.lproj/Localizable.strings
index 749448b9..ccd6d465 100644
Binary files a/damus/el-GR.lproj/Localizable.strings and b/damus/el-GR.lproj/Localizable.strings differ
diff --git a/damus/en-US.xcloc/Localized Contents/en-US.xliff b/damus/en-US.xcloc/Localized Contents/en-US.xliff
index 1fe7bc9b..1222dc7e 100644
--- a/damus/en-US.xcloc/Localized Contents/en-US.xliff
+++ b/damus/en-US.xcloc/Localized Contents/en-US.xliff
@@ -42,11 +42,6 @@