From 01522868595d17531cb32ac0d6c3fa75696391b2 Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Mon, 27 Feb 2023 10:43:00 +1300 Subject: [PATCH] Fix missing comments on new strings --- damus/Views/Zaps/CustomizeZapView.swift | 26 ++++---- .../Localized Contents/en-US.xliff | 58 +++++++++++++++++- .../damus/en-US.lproj/Localizable.strings | Bin 61330 -> 63960 bytes 3 files changed, 70 insertions(+), 14 deletions(-) diff --git a/damus/Views/Zaps/CustomizeZapView.swift b/damus/Views/Zaps/CustomizeZapView.swift index c20a5cbd..613ad3ee 100644 --- a/damus/Views/Zaps/CustomizeZapView.swift +++ b/damus/Views/Zaps/CustomizeZapView.swift @@ -81,16 +81,16 @@ struct CustomizeZapView: View { } var ZapTypePicker: some View { - Picker("Zap Type", selection: $zap_type) { - Text("Public").tag(ZapType.pub) - Text("Anonymous").tag(ZapType.anon) - Text("Non-Zap").tag(ZapType.non_zap) + Picker(NSLocalizedString("Zap Type", comment: "Header text to indicate that the picker below it is to choose the type of zap to send."), selection: $zap_type) { + Text("Public", comment: "Picker option to indicate that a zap should be sent publicly and identify the user as who sent it.").tag(ZapType.pub) + Text("Anonymous", comment: "Picker option to indicate that a zap should be sent anonymously and not identify the user as who sent it.").tag(ZapType.anon) + Text("Non-Zap", comment: "Picker option to indicate that sats should be sent to the user's wallet as a regular Lightning payment, not as a zap.").tag(ZapType.non_zap) } .pickerStyle(.segmented) } var AmountPicker: some View { - Picker("Zap Amount", selection: $selected_amount) { + Picker(NSLocalizedString("Zap Amount", comment: "Title of picker that allows selection of predefined amounts to zap."), selection: $selected_amount) { ForEach(zap_amounts) { entry in let fmt = format_msats_abbrev(Int64(entry.amount) * 1000) HStack(alignment: .firstTextBaseline) { @@ -156,11 +156,11 @@ struct CustomizeZapView: View { Section(content: { AmountPicker }, header: { - Text("Zap Amount in sats") + Text("Zap Amount in sats", comment: "Header text to indicate that the picker below it is to choose a pre-defined amount of sats to zap.") }) Section(content: { - TextField("100000", text: $custom_amount) + TextField(String("100000"), text: $custom_amount) .keyboardType(.numberPad) .onReceive(Just(custom_amount)) { newValue in @@ -170,27 +170,27 @@ struct CustomizeZapView: View { } } }, header: { - Text("Custom Zap Amount") + Text("Custom Zap Amount", comment: "Header text to indicate that the text field below it is to enter a custom zap amount.") }) .dismissKeyboardOnTap() Section(content: { - TextField("Awesome post!", text: $comment) + TextField(NSLocalizedString("Awesome post!", comment: "Placeholder text for a comment to send as part of a zap to the user."), text: $comment) }, header: { - Text("Comment") + Text("Comment", comment: "Header text to indicate that the text field below it is a comment that will be used to send as part of a zap to the user.") }) .dismissKeyboardOnTap() Section(content: { ZapTypePicker }, header: { - Text("Zap Type") + Text("Zap Type", comment: "Header text to indicate that the picker below it is to choose the type of zap to send.") }) if zapping { - Text("Zapping...") + Text("Zapping...", comment: "Text to indicate that the app is in the process of sending a zap.") } else { - Button("Zap") { + Button(NSLocalizedString("Zap", comment: "Button to send a zap.")) { let amount = custom_amount_sats ?? selected_amount.amount send_zap(damus_state: state, event: event, lnurl: lnurl, is_custom: true, comment: comment, amount_sats: amount, zap_type: zap_type) self.zapping = true diff --git a/damus/en-US.xcloc/Localized Contents/en-US.xliff b/damus/en-US.xcloc/Localized Contents/en-US.xliff index ff0cb66b..33d900c7 100644 --- a/damus/en-US.xcloc/Localized Contents/en-US.xliff +++ b/damus/en-US.xcloc/Localized Contents/en-US.xliff @@ -32,6 +32,11 @@ + + %@ + %@ + No comment provided by engineer. + %@ %@ %@ %@ @@ -144,6 +149,11 @@ Sentence composed of 2 variables to describe how many people are following a use Admin Label to display relay contact user. + + Anonymous + Anonymous + Picker option to indicate that a zap should be sent anonymously and not identify the user as who sent it. + Any Any @@ -154,6 +164,11 @@ Sentence composed of 2 variables to describe how many people are following a use Are you sure you want to repost this? Alert message to ask if user wants to repost a post. + + Awesome post! + Awesome post! + Placeholder text for a comment to send as part of a zap to the user. + + + Comment + Comment + Header text to indicate that the text field below it is a comment that will be used to send as part of a zap to the user. + Contact Contact @@ -359,6 +379,11 @@ Sentence composed of 2 variables to describe how many people are following a use Custom Dropdown option for selecting a custom translation server. + + Custom Zap Amount + Custom Zap Amount + Header text to indicate that the text field below it is to enter a custom zap amount. + DMs DMs @@ -637,6 +662,11 @@ Sentence composed of 2 variables to describe how many people are following a use No block list found, create a new one? This will overwrite any previous block lists. Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists. + + Non-Zap + Non-Zap + Picker option to indicate that sats should be sent to the user's wallet as a regular Lightning payment, not as a zap. + None None @@ -744,6 +774,11 @@ Label for filter for seeing your posts and replies (instead of only your posts). Profile Picture Label for Profile Picture section of user profile form. + + Public + Public + Picker option to indicate that a zap should be sent publicly and identify the user as who sent it. + Public Account ID Public Account ID @@ -1162,7 +1197,28 @@ Label for filter for seeing your posts and replies (instead of only your posts). Zap Zap - Accessibility label for zap button + Accessibility label for zap button + Button to send a zap. + + + Zap Amount + Zap Amount + Title of picker that allows selection of predefined amounts to zap. + + + Zap Amount in sats + Zap Amount in sats + Header text to indicate that the picker below it is to choose a pre-defined amount of sats to zap. + + + Zap Type + Zap Type + Header text to indicate that the picker below it is to choose the type of zap to send. + + + Zapping... + Zapping... + Text to indicate that the app is in the process of sending a zap. Zaps diff --git a/damus/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings b/damus/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings index d0ceb5e9a98c43d55ec6e9c7186a5b2f1a6cea95..4a98b6e8b7fc3751c64c75878099fc9c31db615d 100644 GIT binary patch delta 1513 zcmbVMO-K}B82-w#b(N)DXSeciR+FrBw-72w$)5y46hiAzr_t8jTz3a|M7BeD=@Js^ z10qSK*9bD^*bioOi8>e^tV@TE*{QqqzTfQ5?6_-C48zR#eecinKJz>?|GjAQchRb$ zqVZW3d@qXeV53UYgeq=pF%i$aJK>ZQG+DsKz=gaZ*OIZuE6{m7jR4A6=foCoZa+LNBY$(;Ge+3-sl2Ehb zIUwzQbaeW0@KM;DJv;9!1WYLi4AobHmCW9xoS*q{WT1(0yscD9yPQ*KJwa?=3Sg)w zfTO)WEcflh*7Gvlf8#Yl__k1n(+>mqe6I%a{tA5j>NS@aj$Ot2 zs~SJg&E9fgh4F4Hg6UJ`^}1|5M%+wLghAe7);X4$WhJIidpU@;*TrqRWR`t7LRkrV zT2(D4v%mRkSz65F6DvJRiLE_eNeSe-KyUX9xbYN}o!w(t{t4K8Y(t*TLf9<-9X3X! z)lhJERL2iwOiP$rT;eA@cmE#`bIG_2(w;8glEj;1kQ~nv-dyEbic`g)NY}_zo3@M? yu*+I-gXW%OgLN$HOGZ8ew_utg7SFW*;fXV>bO7+4~2uSV^illTI%nlh7Ur zlTf=9vu1;87?V(;B$Mo|5R-786tfnc3RaUIF$$Ah^CXi#Wfqf=j2x5ftq8Mn_htgp C?kMp9