From d93a0600f33bc9a426c6a4d36eb088d181b9df6e Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:11:21 +0200 Subject: [PATCH] Fix localization issues --- damus/Views/ConfigView.swift | 2 +- damus/Views/PostView.swift | 2 +- .../Settings/AppearanceSettingsView.swift | 2 +- damus/Views/Settings/KeySettingsView.swift | 2 +- .../Settings/TranslationSettingsView.swift | 2 +- damus/Views/Settings/ZapSettingsView.swift | 8 ++-- .../Localized Contents/en-US.xliff | 44 ++++++++++++------ .../damus/en-US.lproj/Localizable.strings | Bin 80056 -> 81754 bytes 8 files changed, 40 insertions(+), 22 deletions(-) diff --git a/damus/Views/ConfigView.swift b/damus/Views/ConfigView.swift index 3625e381..67cfaedb 100644 --- a/damus/Views/ConfigView.swift +++ b/damus/Views/ConfigView.swift @@ -45,7 +45,7 @@ struct ConfigView: View { } NavigationLink(destination: NotificationSettingsView(settings: settings)) { - IconLabel(NSLocalizedString("Local Notifications", comment: "Section header for damus local notifications user configuration"), img_name: "bell.fill", color: .blue) + IconLabel(NSLocalizedString("Notifications", comment: "Section header for Damus notifications"), img_name: "bell.fill", color: .blue) } NavigationLink(destination: ZapSettingsView(pubkey: state.pubkey, settings: settings)) { diff --git a/damus/Views/PostView.swift b/damus/Views/PostView.swift index c81061b9..f3c25917 100644 --- a/damus/Views/PostView.swift +++ b/damus/Views/PostView.swift @@ -262,7 +262,7 @@ struct PostView: View { } onVideoPicked: { url in self.mediaToUpload = .video(url) } - .alert("Are you sure you want to upload this image?", isPresented: $image_upload_confirm) { + .alert(NSLocalizedString("Are you sure you want to upload this image?", comment: "Alert message asking if the user wants to upload an image."), isPresented: $image_upload_confirm) { Button(NSLocalizedString("Upload", comment: "Button to proceed with uploading."), role: .none) { if let mediaToUpload { self.handle_upload(media: mediaToUpload) diff --git a/damus/Views/Settings/AppearanceSettingsView.swift b/damus/Views/Settings/AppearanceSettingsView.swift index 90707956..ea72188b 100644 --- a/damus/Views/Settings/AppearanceSettingsView.swift +++ b/damus/Views/Settings/AppearanceSettingsView.swift @@ -50,7 +50,7 @@ struct AppearanceSettingsView: View { } - .navigationTitle("Appearance") + .navigationTitle(NSLocalizedString("Appearance", comment: "Navigation title for text and appearance settings.")) .onReceive(handle_notify(.switched_timeline)) { _ in dismiss() } diff --git a/damus/Views/Settings/KeySettingsView.swift b/damus/Views/Settings/KeySettingsView.swift index 9aadabb3..20510f27 100644 --- a/damus/Views/Settings/KeySettingsView.swift +++ b/damus/Views/Settings/KeySettingsView.swift @@ -100,7 +100,7 @@ struct KeySettingsView: View { } } - .navigationTitle("Keys") + .navigationTitle(NSLocalizedString("Keys", comment: "Navigation title for managing keys.")) .onReceive(handle_notify(.switched_timeline)) { _ in dismiss() } diff --git a/damus/Views/Settings/TranslationSettingsView.swift b/damus/Views/Settings/TranslationSettingsView.swift index 3ecd0675..44db1f7a 100644 --- a/damus/Views/Settings/TranslationSettingsView.swift +++ b/damus/Views/Settings/TranslationSettingsView.swift @@ -76,7 +76,7 @@ struct TranslationSettingsView: View { } } } - .navigationTitle("Translation") + .navigationTitle(NSLocalizedString("Translation", comment: "Navigation title for translation settings.")) .onReceive(handle_notify(.switched_timeline)) { _ in dismiss() } diff --git a/damus/Views/Settings/ZapSettingsView.swift b/damus/Views/Settings/ZapSettingsView.swift index 2f1856d9..76f98171 100644 --- a/damus/Views/Settings/ZapSettingsView.swift +++ b/damus/Views/Settings/ZapSettingsView.swift @@ -24,7 +24,7 @@ struct ZapSettingsView: View { var body: some View { Form { - Section("Wallet") { + Section(NSLocalizedString("Wallet", comment: "Title for section in zap settings that controls the Lightning wallet selection.")) { Toggle(NSLocalizedString("Show wallet selector", comment: "Toggle to show or hide selection of wallet."), isOn: $settings.show_wallet_selector).toggleStyle(.switch) Picker(NSLocalizedString("Select default wallet", comment: "Prompt selection of user's default wallet"), @@ -36,12 +36,12 @@ struct ZapSettingsView: View { } } - Section("Zaps") { + Section(NSLocalizedString("Zaps", comment: "Title for section in zap settings that controls general zap preferences.")) { Toggle(NSLocalizedString("Zap Vibration", comment: "Setting to enable vibration on zap"), isOn: $settings.zap_vibration) .toggleStyle(.switch) } - Section("Default Zap Amount in sats") { + Section(NSLocalizedString("Default Zap Amount in sats", comment: "Title for section in zap settings that controls the default zap amount in sats.")) { TextField(String("1000"), text: $default_zap_amount) .keyboardType(.numberPad) .onReceive(Just(default_zap_amount)) { newValue in @@ -52,7 +52,7 @@ struct ZapSettingsView: View { } } } - .navigationTitle("Zaps") + .navigationTitle(NSLocalizedString("Zaps", comment: "Navigation title for zap settings.")) .onReceive(handle_notify(.switched_timeline)) { _ in dismiss() } diff --git a/damus/en-US.xcloc/Localized Contents/en-US.xliff b/damus/en-US.xcloc/Localized Contents/en-US.xliff index e436d5fb..02c9d167 100644 --- a/damus/en-US.xcloc/Localized Contents/en-US.xliff +++ b/damus/en-US.xcloc/Localized Contents/en-US.xliff @@ -45,7 +45,7 @@ %@ %@ - No comment provided by engineer. + DM by heading in local notification %@ %@ @@ -188,7 +188,8 @@ Sentence composed of 2 variables to describe how many people are following a use Appearance Appearance - Section header for text and appearance settings + Navigation title for text and appearance settings. + Section header for text and appearance settings Are you lost? @@ -200,6 +201,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. + + Are you sure you want to upload this image? + Are you sure you want to upload this image? + Alert message asking if the user wants to upload an image. + Automatically translate notes Automatically translate notes @@ -251,6 +257,7 @@ Sentence composed of 2 variables to describe how many people are following a use Button to cancel out of posting a note. Button to cancel out of reposting a post. Button to cancel out of view adding user inputted relay. + Button to cancel the upload. Cancel deleting the user. Cancel out of logging out the user. @@ -404,11 +411,6 @@ Sentence composed of 2 variables to describe how many people are following a use Custom Zap Amount Header text to indicate that the text field below it is to enter a custom zap amount. - - DM by %@ - DM by %@ - DM by heading in local notification - DMs DMs @@ -435,7 +437,7 @@ Sentence composed of 2 variables to describe how many people are following a use Default Zap Amount in sats Default Zap Amount in sats - No comment provided by engineer. + Title for section in zap settings that controls the default zap amount in sats. Delete @@ -627,7 +629,8 @@ Sentence composed of 2 variables to describe how many people are following a use Keys Keys - Settings section for managing keys + Navigation title for managing keys. + Settings section for managing keys Left Handed @@ -759,6 +762,11 @@ Sentence composed of 2 variables to describe how many people are following a use NIP-05 Verification Label for NIP-05 Verification section of user profile form. + + New encrypted direct message + New encrypted direct message + Notification that the user has received a new direct message + No No @@ -802,7 +810,8 @@ Sentence composed of 2 variables to describe how many people are following a use Notifications Notifications - Toolbar label for Notifications view. + Section header for Damus notifications + Toolbar label for Notifications view. Nudity or explicit content @@ -1273,7 +1282,8 @@ Picker option to indicate that a zap should be sent privately and not identify t Translation Translation - Section header for text and appearance settings + Navigation title for translation settings. + Section header for text and appearance settings Translations @@ -1325,6 +1335,11 @@ Picker option to indicate that a zap should be sent privately and not identify t Unmute conversation Context menu option for unmuting a conversation. + + Upload + Upload + Button to proceed with uploading. + User has been muted User has been muted @@ -1372,7 +1387,8 @@ YOU WILL NO LONGER BE ABLE TO LOG INTO DAMUS USING THIS ACCOUNT KEY. Wallet Wallet - Sidebar menu label for Wallet view. + Sidebar menu label for Wallet view. + Title for section in zap settings that controls the Lightning wallet selection. Website @@ -1460,8 +1476,10 @@ YOU WILL NO LONGER BE ABLE TO LOG INTO DAMUS USING THIS ACCOUNT KEY. Zaps Zaps Navigation bar title for the Zaps view. + Navigation title for zap settings. Section header for zap settings - Setting to enable Zap Local Notification + Setting to enable Zap Local Notification + Title for section in zap settings that controls general zap preferences. https://example.com/pic.jpg 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 b506bdbc02742d72a1b85ebf925e079fdbe80857..5cea315e625dd134f5675b0b0be0551cf64e3b16 100644 GIT binary patch delta 866 zcmaiy&ubG=5Xa})Sk`3SEJ?bAG(WaMDvE7_3C6ZaB~%2hAqpO(R9I}9l*Tl48`> zC%*mZGJXx6wqfqO3$te=r&%;bCEJpXzOyep7``N8A}pYLRPG>JJ{)7+SDFwSp{Q_; zpmSu+(wc2xwQ5aJ#YqAzkl&0flAWhjBkURSnptKOIr{75odX^3YCgUiVg2@zzmxgv z2s_N>C=>D9J;kVLwf#F&t}YA4{Y>58?!Y%C52_E{#?#WMf~s%`uXYM37p)x`(6F-J zWivTcx;q6o`9YZl>?$0E5Lh7y3Db!e-CbOgncp6yxKs4~dw{h_5S5Z-$d4aLs8)Ip zj5K;HP#>YF52Mq^jQ7tMCU>|@IefY8!IL4eA&C`|L{Y%}4HqueEWCV#DZ_0K&{PNX z)734q%YRftI4!I;FK&$mR@`2;ZNWQn*RGfA-s9yk^fG{}Wf7Cx5=vh?ar1)s%-h2h zJa?-pXBsq*$C%rMuVQdvcm4Bw)F)h$YGdNFG^Z@>TZ+h&dQ7dP8f%U;l>(hVInJDX IJ;r|g2F0iE1ONa4 delta 168 zcmV;Z09XIo{sg%31hBLclb|a~vjh`pCX>LgCbRxISOSv#6tk>7Knt@hNu(N+FhvfN z5a|fB4rTHMle7|014IB#lP{1L14IB#lRxA!m+(9R6tgO8{vMMMg#?pskP5SeicA)k zBLNh%?xCg*lKcdh+8zNQvkbAEW|P3LCX@a-Lbq%f0XPV^ARz$?1(U4F3a8p80Tz?| Wxe$}kuNId~Jppi%