From d01e7c059540cc4986a1fd269638631767c46599 Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:35:43 -0500 Subject: [PATCH] Fix localization bugs and export localizations Changelog-Fixes: Fix some localization bugs Closes: #320 --- .../Localized Contents/en-US.xliff | 229 +++++++++++++++--- .../damus/en-US.lproj/Localizable.strings | Bin 19790 -> 22588 bytes .../damus/en-US.lproj/Localizable.stringsdict | 102 +++++++- .../Localized Contents/es-419.xliff | 187 +++++++++++--- .../damus/en-US.lproj/Localizable.strings | Bin 19790 -> 22588 bytes .../damus/en-US.lproj/Localizable.stringsdict | 102 +++++++- damus/Models/FollowersModel.swift | 6 +- damus/Views/ActionBar/EventActionBar.swift | 4 +- damus/Views/ActionBar/EventDetailBar.swift | 15 +- damus/Views/ConfigView.swift | 2 +- damus/Views/ProfileView.swift | 7 +- damus/Views/PubkeyView.swift | 2 +- damus/Views/ReactionsView.swift | 2 +- damus/Views/ReplyQuoteView.swift | 2 +- damus/Views/SaveKeysView.swift | 2 +- damus/Views/SetupView.swift | 2 +- damus/Views/SideMenuView.swift | 14 +- damus/en-US.lproj/Localizable.stringsdict | 102 +++++++- damus/es-419.lproj/Localizable.stringsdict | 6 +- 19 files changed, 664 insertions(+), 122 deletions(-) diff --git a/damus Localizations/en-US.xcloc/Localized Contents/en-US.xliff b/damus Localizations/en-US.xcloc/Localized Contents/en-US.xliff index 4f629f5..fc098ab 100644 --- a/damus Localizations/en-US.xcloc/Localized Contents/en-US.xliff +++ b/damus Localizations/en-US.xcloc/Localized Contents/en-US.xliff @@ -35,12 +35,14 @@ %@ %@ - Number of people following a user. + Amount of time that has passed since reply quote event occurred. +Abbreviated version of a nostr public key. %@ %@ %@ %@ - 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'. + Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'. +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'. %@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction. @@ -60,18 +62,14 @@ %lld %lld - Number of profiles a user is following. + Number of reposts. +Number of profiles a user is following. %lld/%lld %lld/%lld Fraction of how many of the user's relay servers that are operational. - - &nbsp; - &nbsp; - No comment provided by engineer. - '%@' at '%@' will be used for verification '%@' at '%@' will be used for verification @@ -148,10 +146,15 @@ Any Any amount of sats - - Are you sure you want to boost this post? - Are you sure you want to boost this post? - Alert message to ask if user wants to boost a post. + + Are you sure you want to repost this? + Are you sure you want to repost this? + Alert message to ask if user wants to repost a post. + + 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. @@ -178,17 +181,6 @@ Blue Wallet Dropdown option label for Lightning wallet, Blue Wallet. - - Boost - Boost - Button to confirm boosting a post. - Title of alert for confirming to boost a post. - - - Boosted - Boosted - Text indicating that the post was boosted (i.e. re-shared). - Breez Breez @@ -203,6 +195,7 @@ Cancel Cancel 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. Cancel out of logging out the user. @@ -342,11 +335,6 @@ Edit Button to edit user's profile. - - Edit Profile - Edit Profile - Title of navigation view for Edit Profile. - Encrypted Encrypted @@ -428,6 +416,11 @@ Part of a larger sentence to describe how many profiles a user is following.LNLink Dropdown option label for Lightning wallet, LNLink. + + Left Handed + Left Handed + Moves the post button to the left side of the screen + Let's go! Let's go! @@ -451,7 +444,8 @@ Part of a larger sentence to describe how many profiles a user is following. Login Login - Button to log into account. + Button to log into account. + Button to log into an account. Logout @@ -530,6 +524,11 @@ Part of a larger sentence to describe how many profiles a user is following.PrivateKey Title of the secure field that holds the user's private key. + + Profile + Profile + Sidebar menu label for Profile view. + Profile Picture Profile Picture @@ -555,6 +554,11 @@ Part of a larger sentence to describe how many profiles a user is following.Public key Label indicating that the text is a user's public account key. + + Reactions + Reactions + Navigation bar title for Reactions view. + Recommended Relays Recommended Relays @@ -568,8 +572,7 @@ Part of a larger sentence to describe how many profiles a user is following. Relays Relays - Header text for relay server list for configuration. -Part of a larger sentence to describe how many relay servers a user is connected. + Sidebar menu label for Relay servers view Reply to self @@ -586,11 +589,27 @@ Part of a larger sentence to describe how many relay servers a user is connected Replying to: Indicating that the user is replying to the following listed people. + + Repost + Repost + Button to confirm reposting a post. + Title of alert for confirming to repost a post. + + + Reposted + Reposted + Text indicating that the post was reposted (i.e. re-shared). + Reset Reset Section title for resetting the user + + Retry + Retry + Button to retry completing account creation after an error occurred. + River River @@ -644,7 +663,8 @@ Part of a larger sentence to describe how many relay servers a user is connected Settings Settings - Navigation title for Settings view. + Navigation title for Settings view. + Sidebar menu label for accessing the app settings Share @@ -661,6 +681,11 @@ Part of a larger sentence to describe how many relay servers a user is connected Show wallet selector Toggle to show or hide selection of wallet. + + Sign out + Sign out + Sidebar menu label to sign out of the account. + Strike Strike @@ -723,6 +748,11 @@ Part of a larger sentence to describe how many relay servers a user is connected Label for Username section of user profile form. Label to prompt username entry. + + Wallet + Wallet + Sidebar menu label for Wallet view. + Wallet Of Satoshi Wallet Of Satoshi @@ -768,6 +798,11 @@ Part of a larger sentence to describe how many relay servers a user is connected collapsed_event_view_other_notes Text to indicate that the thread was collapsed and that there are other notes to view if tapped. (Key in .stringsdict) + + followers_count + followers_count + Part of a larger sentence to describe how many people are following a user. (Key in .stringsdict) + https://example.com/pic.jpg https://example.com/pic.jpg @@ -803,6 +838,16 @@ Part of a larger sentence to describe how many relay servers a user is connected optional Label indicating that a form input is optional. + + reactions_count + reactions_count + Part of a larger sentence to describe how many reactions there are on a post. (Key in .stringsdict) + + + relays_count + relays_count + Part of a larger sentence to describe how many relay servers a user is connected. (Key in .stringsdict) + replying_to_one_and_others replying_to_one_and_others @@ -813,11 +858,26 @@ Part of a larger sentence to describe how many relay servers a user is connected replying_to_two_and_others Label to indicate that the user is replying to 2 users and others. (Key in .stringsdict) + + reposts_count + reposts_count + Part of a larger sentence to describe how many reposts there are. (Key in .stringsdict) + satoshi satoshi Example username of Bitcoin creator(s), Satoshi Nakamoto. + + tips_count + tips_count + Part of a larger sentence to describe how many tip payments there are on a post. (Key in .stringsdict) + + + u{00A0} + u{00A0} + Non-breaking space character to fill in blank space next to event action button icons. + wss://some.relay.com wss://some.relay.com @@ -828,11 +888,6 @@ Part of a larger sentence to describe how many relay servers a user is connected you 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. - - 馃 - 馃 - Button with emoji to like an event. - @@ -860,6 +915,66 @@ Part of a larger sentence to describe how many relay servers a user is connected 路路路 %#@NOTES@ 路路路 Text to indicate that the thread was collapsed and that there are other notes to view if tapped. + + Follower + Follower + Part of a larger sentence to describe how many people are following a user. + + + Followers + Followers + Part of a larger sentence to describe how many people are following a user. + + + Followers + Followers + Part of a larger sentence to describe how many people are following a user. + + + %#@FOLLOWERS@ + %#@FOLLOWERS@ + Part of a larger sentence to describe how many people are following a user. + + + %#@REACTIONS@ + %#@REACTIONS@ + Part of a larger sentence to describe how many reactions there are on a post. + + + Reaction + Reaction + Part of a larger sentence to describe how many reactions there are on a post. + + + Reactions + Reactions + Part of a larger sentence to describe how many reactions there are on a post. + + + Reactions + Reactions + Part of a larger sentence to describe how many reactions there are on a post. + + + %#@RELAYS@ + %#@RELAYS@ + Part of a larger sentence to describe how many relay servers a user is connected. + + + Relay + Relay + Part of a larger sentence to describe how many relay servers a user is connected. + + + Relays + Relays + Part of a larger sentence to describe how many relay servers a user is connected. + + + Relays + Relays + Part of a larger sentence to describe how many relay servers a user is connected. + Replying to %@%#@OTHERS@ Replying to %@%#@OTHERS@ @@ -900,6 +1015,46 @@ Part of a larger sentence to describe how many relay servers a user is connected Label to indicate that the user is replying to 2 users and others. + + %#@REPOSTS@ + %#@REPOSTS@ + Part of a larger sentence to describe how many reposts there are. + + + Repost + Repost + Part of a larger sentence to describe how many reposts there are. + + + Reposts + Reposts + Part of a larger sentence to describe how many reposts there are. + + + Reposts + Reposts + Part of a larger sentence to describe how many reposts there are. + + + %#@TIPS@ + %#@TIPS@ + Part of a larger sentence to describe how many tip payments there are on a post. + + + Tip + Tip + Part of a larger sentence to describe how many tip payments there are on a post. + + + Tips + Tips + Part of a larger sentence to describe how many tip payments there are on a post. + + + Tips + Tips + Part of a larger sentence to describe how many tip payments there are on a post. + diff --git a/damus Localizations/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings b/damus Localizations/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings index a3b3546a37c60d0aa89b7641403ab45f1dee2aef..38e15f8aabddcc78d76f6ad1b56c5b8d738fb279 100644 GIT binary patch delta 2205 zcmcgtOHUI~6uv_NwN%~+mDdz72vQ&*kXSX8r~$1;P$MBk5oiknZJjA7F^EeakzkH7 z(ZtZT3niH?Au%zm42k{#6L)Uhy7oJ_({`#YJIrKe?me%2p5NVlt88s5o7*Gxz5PB#&@p$pBfTW5uc)?2N z(7n126I67)?-ag? zd`)AmgQ6i%lafAzyxa$$V+e_5tRkR?@tv1^K8f`MpmBvDO{=y86jP3REHubyuzVY~ z!$=*Uor*bw9Iezi>2X~t#V(8*zQ*5q^_QW@#nh#~Xu1q^lD_7btwu$h&aMR{ zT}L1slnO~sMM5GTq#qnEf1=>Nq~4$mmo=v?j%MR~&@Oh-K~KwSjj@)CHkxoZ(37@8 zC1kv8bLCfFGrgFUh2doKxr^lTRMJjYF|B*cskOV1ZmD+C)EaIgW2b8%huW2{q7evN zdY7JiosECdkc3n=O&%g#*{cLaMzjb)+JMsLL&=gce|8bB5MI5jlfaijW2WtA1Wj4|zEK_lkcKfOfwJ%_!wX!OT6*!WR5Hwd#hpU={PE1L9i$rMHQSl!d zByoCbZaE|dCH(u-@Rk`V@$9W(kx8@#y+1XEM3mRFjVMerQZd#nm`KIQkNbuEEzLI= z8sa#}n5N3L23bbyFtnzCP#U|3;kQ<6BxyT6mGV5=@CA)=&)NKXJIwI2$J8Imv zE4DaG_!48cO(%tJyz!Rhc(NFPY3>=uXTA~RHzWgHP)5V}8l|HA6OF8Ip;<5@$)Qi~ z1ta&|X=R@~fg_8+S-#qrP5g^m0izhvm`#Dd2^h_BwQToBlFMCS^q+6D?F9@4H*q#! aQOGpC@K(~A{Rn*-a?qANV0<2Ymiq_C4Z*1Z delta 279 zcmdn9f$`id#tr+JCm&!F+PsgYf@SjuP6y`639fvT4~TG0p69^BoWzhndA&nAn3i@_ zlyqXq2f|{85(Xs(1qNFnR$>5)O+LscyxD+Pi)r%~{s_UzG7>_Jd6O@CiprKTWHO{O zlmk_!0d*DuX;+36pjZiz6)?G8Ly{BDpPX-s%xgE5oqWMlYjOf3*JcMr1ty>~H70Mc zmD@Z^MT!mP%FRvMUd)>X^!eC;(mb0tn0hfyE-+KsyvA}GBUFRgW(C_cW{~LQ45z5g m4bIcpCVN?MZSL~oVA^cpJB4xcI)5GJ$saf)Hg5{ + collapsed_event_view_other_notes + + NSStringLocalizedFormatKey + 路路路 %#@NOTES@ 路路路 + NOTES + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + 0 other notes + one + 1 other note + other + %d other notes + + + followers_count + + NSStringLocalizedFormatKey + %#@FOLLOWERS@ + FOLLOWERS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Followers + one + Follower + other + Followers + + + reactions_count + + NSStringLocalizedFormatKey + %#@REACTIONS@ + REACTIONS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Reactions + one + Reaction + other + Reactions + + + relays_count + + NSStringLocalizedFormatKey + %#@RELAYS@ + RELAYS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Relays + one + Relay + other + Relays + + replying_to_one_and_others NSStringLocalizedFormatKey @@ -38,22 +110,40 @@ & %d others - collapsed_event_view_other_notes + reposts_count NSStringLocalizedFormatKey - 路路路 %#@NOTES@ 路路路 - NOTES + %#@REPOSTS@ + REPOSTS NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d zero - 0 other notes + Reposts one - 1 other note + Repost other - %d other notes + Reposts + + + tips_count + + NSStringLocalizedFormatKey + %#@TIPS@ + TIPS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Tips + one + Tip + other + Tips diff --git a/damus Localizations/es-419.xcloc/Localized Contents/es-419.xliff b/damus Localizations/es-419.xcloc/Localized Contents/es-419.xliff index e59b41d..bb55718 100644 --- a/damus Localizations/es-419.xcloc/Localized Contents/es-419.xliff +++ b/damus Localizations/es-419.xcloc/Localized Contents/es-419.xliff @@ -30,11 +30,13 @@ %@ - Number of people following a user. + Amount of time that has passed since reply quote event occurred. +Abbreviated version of a nostr public key. %@ %@ - 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'. + Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'. +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'. %@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction. @@ -50,16 +52,13 @@ %lld - Number of profiles a user is following. + Number of reposts. +Number of profiles a user is following. %lld/%lld Fraction of how many of the user's relay servers that are operational. - - &nbsp; - No comment provided by engineer. - '%@' at '%@' will be used for verification Description of how the nip05 identifier would be used for verification. @@ -121,9 +120,13 @@ Any Any amount of sats - - Are you sure you want to boost this post? - Alert message to ask if user wants to boost a post. + + Are you sure you want to repost this? + Alert message to ask if user wants to repost a post. + + 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. @@ -145,15 +148,6 @@ Blue Wallet Dropdown option label for Lightning wallet, Blue Wallet. - - Boost - Button to confirm boosting a post. - Title of alert for confirming to boost a post. - - - Boosted - Text indicating that the post was boosted (i.e. re-shared). - Breez Dropdown option label for Lightning wallet, Breez. @@ -165,6 +159,7 @@ Cancel 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. Cancel out of logging out the user. @@ -277,10 +272,6 @@ Edit Button to edit user's profile. - - Edit Profile - Title of navigation view for Edit Profile. - Encrypted Heading indicating that this application keeps private messaging end-to-end encrypted. @@ -346,6 +337,10 @@ Part of a larger sentence to describe how many profiles a user is following.LNLink Dropdown option label for Lightning wallet, LNLink. + + Left Handed + Moves the post button to the left side of the screen + Let's go! Button to complete account creation and start using the app. @@ -364,7 +359,8 @@ Part of a larger sentence to describe how many profiles a user is following. Login - Button to log into account. + Button to log into account. + Button to log into an account. Logout @@ -428,6 +424,10 @@ Part of a larger sentence to describe how many profiles a user is following.PrivateKey Title of the secure field that holds the user's private key. + + Profile + Sidebar menu label for Profile view. + Profile Picture Label for Profile Picture section of user profile form. @@ -448,6 +448,10 @@ Part of a larger sentence to describe how many profiles a user is following.Public key Label indicating that the text is a user's public account key. + + Reactions + Navigation bar title for Reactions view. + Recommended Relays Section title for recommend relay servers that could be added as part of configuration @@ -458,8 +462,7 @@ Part of a larger sentence to describe how many profiles a user is following. Relays - Header text for relay server list for configuration. -Part of a larger sentence to describe how many relay servers a user is connected. + Sidebar menu label for Relay servers view Reply to self @@ -473,10 +476,23 @@ Part of a larger sentence to describe how many relay servers a user is connected Replying to: Indicating that the user is replying to the following listed people. + + Repost + Button to confirm reposting a post. + Title of alert for confirming to repost a post. + + + Reposted + Text indicating that the post was reposted (i.e. re-shared). + Reset Section title for resetting the user + + Retry + Button to retry completing account creation after an error occurred. + River Dropdown option label for Lightning wallet, River @@ -519,7 +535,8 @@ Part of a larger sentence to describe how many relay servers a user is connected Settings - Navigation title for Settings view. + Navigation title for Settings view. + Sidebar menu label for accessing the app settings Share @@ -533,6 +550,10 @@ Part of a larger sentence to describe how many relay servers a user is connected Show wallet selector Toggle to show or hide selection of wallet. + + Sign out + Sidebar menu label to sign out of the account. + Strike Dropdown option label for Lightning wallet, Strike. @@ -583,6 +604,10 @@ Part of a larger sentence to describe how many relay servers a user is connected Label for Username section of user profile form. Label to prompt username entry. + + Wallet + Sidebar menu label for Wallet view. + Wallet Of Satoshi Dropdown option label for Lightning wallet, Wallet Of Satoshi. @@ -619,6 +644,10 @@ Part of a larger sentence to describe how many relay servers a user is connected collapsed_event_view_other_notes Text to indicate that the thread was collapsed and that there are other notes to view if tapped. (Key in .stringsdict) + + followers_count + Part of a larger sentence to describe how many people are following a user. (Key in .stringsdict) + https://example.com/pic.jpg Placeholder example text for profile picture URL. @@ -647,6 +676,14 @@ Part of a larger sentence to describe how many relay servers a user is connected optional Label indicating that a form input is optional. + + reactions_count + Part of a larger sentence to describe how many reactions there are on a post. (Key in .stringsdict) + + + relays_count + Part of a larger sentence to describe how many relay servers a user is connected. (Key in .stringsdict) + replying_to_one_and_others Label to indicate that the user is replying to 1 user and others. (Key in .stringsdict) @@ -655,10 +692,22 @@ Part of a larger sentence to describe how many relay servers a user is connected replying_to_two_and_others Label to indicate that the user is replying to 2 users and others. (Key in .stringsdict) + + reposts_count + Part of a larger sentence to describe how many reposts there are. (Key in .stringsdict) + satoshi Example username of Bitcoin creator(s), Satoshi Nakamoto. + + tips_count + Part of a larger sentence to describe how many tip payments there are on a post. (Key in .stringsdict) + + + u{00A0} + Non-breaking space character to fill in blank space next to event action button icons. + wss://some.relay.com Placeholder example for relay server address. @@ -667,10 +716,6 @@ Part of a larger sentence to describe how many relay servers a user is connected you 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. - - 馃 - Button with emoji to like an event. - @@ -698,6 +743,54 @@ Part of a larger sentence to describe how many relay servers a user is connected 路路路 %#@NOTES@ 路路路 Text to indicate that the thread was collapsed and that there are other notes to view if tapped. + + Follower + Part of a larger sentence to describe how many people are following a user. + + + Followers + Part of a larger sentence to describe how many people are following a user. + + + Followers + Part of a larger sentence to describe how many people are following a user. + + + %#@FOLLOWERS@ + Part of a larger sentence to describe how many people are following a user. + + + %#@REACTIONS@ + Part of a larger sentence to describe how many reactions there are on a post. + + + Reaction + Part of a larger sentence to describe how many reactions there are on a post. + + + Reactions + Part of a larger sentence to describe how many reactions there are on a post. + + + Reactions + Part of a larger sentence to describe how many reactions there are on a post. + + + %#@RELAYS@ + Part of a larger sentence to describe how many relay servers a user is connected. + + + Relay + Part of a larger sentence to describe how many relay servers a user is connected. + + + Relays + Part of a larger sentence to describe how many relay servers a user is connected. + + + Relays + Part of a larger sentence to describe how many relay servers a user is connected. + Replying to %@%#@OTHERS@ Replying to %@%#@OTHERS@ @@ -738,6 +831,38 @@ Part of a larger sentence to describe how many relay servers a user is connected Label to indicate that the user is replying to 2 users and others. + + %#@REPOSTS@ + Part of a larger sentence to describe how many reposts there are. + + + Repost + Part of a larger sentence to describe how many reposts there are. + + + Reposts + Part of a larger sentence to describe how many reposts there are. + + + Reposts + Part of a larger sentence to describe how many reposts there are. + + + %#@TIPS@ + Part of a larger sentence to describe how many tip payments there are on a post. + + + Tip + Part of a larger sentence to describe how many tip payments there are on a post. + + + Tips + Part of a larger sentence to describe how many tip payments there are on a post. + + + Tips + Part of a larger sentence to describe how many tip payments there are on a post. + diff --git a/damus Localizations/es-419.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings b/damus Localizations/es-419.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings index a3b3546a37c60d0aa89b7641403ab45f1dee2aef..38e15f8aabddcc78d76f6ad1b56c5b8d738fb279 100644 GIT binary patch delta 2205 zcmcgtOHUI~6uv_NwN%~+mDdz72vQ&*kXSX8r~$1;P$MBk5oiknZJjA7F^EeakzkH7 z(ZtZT3niH?Au%zm42k{#6L)Uhy7oJ_({`#YJIrKe?me%2p5NVlt88s5o7*Gxz5PB#&@p$pBfTW5uc)?2N z(7n126I67)?-ag? zd`)AmgQ6i%lafAzyxa$$V+e_5tRkR?@tv1^K8f`MpmBvDO{=y86jP3REHubyuzVY~ z!$=*Uor*bw9Iezi>2X~t#V(8*zQ*5q^_QW@#nh#~Xu1q^lD_7btwu$h&aMR{ zT}L1slnO~sMM5GTq#qnEf1=>Nq~4$mmo=v?j%MR~&@Oh-K~KwSjj@)CHkxoZ(37@8 zC1kv8bLCfFGrgFUh2doKxr^lTRMJjYF|B*cskOV1ZmD+C)EaIgW2b8%huW2{q7evN zdY7JiosECdkc3n=O&%g#*{cLaMzjb)+JMsLL&=gce|8bB5MI5jlfaijW2WtA1Wj4|zEK_lkcKfOfwJ%_!wX!OT6*!WR5Hwd#hpU={PE1L9i$rMHQSl!d zByoCbZaE|dCH(u-@Rk`V@$9W(kx8@#y+1XEM3mRFjVMerQZd#nm`KIQkNbuEEzLI= z8sa#}n5N3L23bbyFtnzCP#U|3;kQ<6BxyT6mGV5=@CA)=&)NKXJIwI2$J8Imv zE4DaG_!48cO(%tJyz!Rhc(NFPY3>=uXTA~RHzWgHP)5V}8l|HA6OF8Ip;<5@$)Qi~ z1ta&|X=R@~fg_8+S-#qrP5g^m0izhvm`#Dd2^h_BwQToBlFMCS^q+6D?F9@4H*q#! aQOGpC@K(~A{Rn*-a?qANV0<2Ymiq_C4Z*1Z delta 279 zcmdn9f$`id#tr+JCm&!F+PsgYf@SjuP6y`639fvT4~TG0p69^BoWzhndA&nAn3i@_ zlyqXq2f|{85(Xs(1qNFnR$>5)O+LscyxD+Pi)r%~{s_UzG7>_Jd6O@CiprKTWHO{O zlmk_!0d*DuX;+36pjZiz6)?G8Ly{BDpPX-s%xgE5oqWMlYjOf3*JcMr1ty>~H70Mc zmD@Z^MT!mP%FRvMUd)>X^!eC;(mb0tn0hfyE-+KsyvA}GBUFRgW(C_cW{~LQ45z5g m4bIcpCVN?MZSL~oVA^cpJB4xcI)5GJ$saf)Hg5{ + collapsed_event_view_other_notes + + NSStringLocalizedFormatKey + 路路路 %#@NOTES@ 路路路 + NOTES + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + 0 other notes + one + 1 other note + other + %d other notes + + + followers_count + + NSStringLocalizedFormatKey + %#@FOLLOWERS@ + FOLLOWERS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Followers + one + Follower + other + Followers + + + reactions_count + + NSStringLocalizedFormatKey + %#@REACTIONS@ + REACTIONS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Reactions + one + Reaction + other + Reactions + + + relays_count + + NSStringLocalizedFormatKey + %#@RELAYS@ + RELAYS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Relays + one + Relay + other + Relays + + replying_to_one_and_others NSStringLocalizedFormatKey @@ -38,22 +110,40 @@ & %d others - collapsed_event_view_other_notes + reposts_count NSStringLocalizedFormatKey - 路路路 %#@NOTES@ 路路路 - NOTES + %#@REPOSTS@ + REPOSTS NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d zero - 0 other notes + Reposts one - 1 other note + Repost other - %d other notes + Reposts + + + tips_count + + NSStringLocalizedFormatKey + %#@TIPS@ + TIPS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Tips + one + Tip + other + Tips diff --git a/damus/Models/FollowersModel.swift b/damus/Models/FollowersModel.swift index 8856e6c..aa32b26 100644 --- a/damus/Models/FollowersModel.swift +++ b/damus/Models/FollowersModel.swift @@ -18,11 +18,11 @@ class FollowersModel: ObservableObject { let sub_id: String = UUID().description let profiles_id: String = UUID().description - var count_display: String { + var count: Int? { guard let contacts = self.contacts else { - return "?" + return nil } - return "\(contacts.count)"; + return contacts.count } init(damus_state: DamusState, target: String) { diff --git a/damus/Views/ActionBar/EventActionBar.swift b/damus/Views/ActionBar/EventActionBar.swift index 767bf96..8a91390 100644 --- a/damus/Views/ActionBar/EventActionBar.swift +++ b/damus/Views/ActionBar/EventActionBar.swift @@ -98,7 +98,7 @@ struct EventActionBar: View { } } .alert(NSLocalizedString("Repost", comment: "Title of alert for confirming to repost a post."), isPresented: $confirm_boost) { - Button("Cancel") { + Button(NSLocalizedString("Cancel", comment: "Button to cancel out of reposting a post.")) { confirm_boost = false } Button(NSLocalizedString("Repost", comment: "Button to confirm reposting a post.")) { @@ -149,7 +149,7 @@ struct EventActionBar: View { func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) -> some View { Button(action: action) { - Label(" ", systemImage: img) + Label(NSLocalizedString("\u{00A0}", comment: "Non-breaking space character to fill in blank space next to event action button icons."), systemImage: img) .font(.footnote.weight(.medium)) .foregroundColor(col == nil ? Color.gray : col!) } diff --git a/damus/Views/ActionBar/EventDetailBar.swift b/damus/Views/ActionBar/EventDetailBar.swift index f59ea54..2681a3d 100644 --- a/damus/Views/ActionBar/EventDetailBar.swift +++ b/damus/Views/ActionBar/EventDetailBar.swift @@ -15,27 +15,18 @@ struct EventDetailBar: View { var body: some View { HStack { if bar.boosts > 0 { - Text("\(bar.boosts)") - .font(.body.bold()) - Text("Reposts") - .foregroundColor(.gray) + Text("\(Text("\(bar.boosts)", comment: "Number of reposts.").font(.body.bold())) \(Text(String(format: NSLocalizedString("reposts_count", comment: "Part of a larger sentence to describe how many reposts there are."), bar.boosts)).foregroundColor(.gray))", comment: "Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.") } if bar.likes > 0 { NavigationLink(destination: ReactionsView(damus_state: state, model: ReactionsModel(state: state, target: target))) { - Text("\(bar.likes)") - .font(.body.bold()) - Text("Reactions") - .foregroundColor(.gray) + Text("\(Text("\(bar.likes)", comment: "Number of reactions on a post.").font(.body.bold())) \(Text(String(format: NSLocalizedString("reactions_count", comment: "Part of a larger sentence to describe how many reactions there are on a post."), bar.likes)).foregroundColor(.gray))", comment: "Sentence composed of 2 variables to describe how many reactions there are on a post. In source English, the first variable is the number of reactions, and the second variable is 'Reaction' or 'Reactions'.") } .buttonStyle(PlainButtonStyle()) } if bar.tips > 0 { - Text("\(bar.tips)") - .font(.body.bold()) - Text("Tips") - .foregroundColor(.gray) + Text("\(Text("\(bar.tips)", comment: "Number of tip payments on a post.").font(.body.bold())) \(Text(String(format: NSLocalizedString("tips_count", comment: "Part of a larger sentence to describe how many tip payments there are on a post."), bar.boosts)).foregroundColor(.gray))", comment: "Sentence composed of 2 variables to describe how many tip payments there are on a post. In source English, the first variable is the number of tip payments, and the second variable is 'Tip' or 'Tips'.") } } } diff --git a/damus/Views/ConfigView.swift b/damus/Views/ConfigView.swift index 2ae2b31..9031590 100644 --- a/damus/Views/ConfigView.swift +++ b/damus/Views/ConfigView.swift @@ -142,7 +142,7 @@ struct ConfigView: View { Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user.")) { confirm_logout = false } - Button(NSLocalizedString("Logout", comment: "Button for logging out the user.")) { + Button(NSLocalizedString("Logout", comment: "Button for logging out the user.")) { notify(.logout, ()) } } message: { diff --git a/damus/Views/ProfileView.swift b/damus/Views/ProfileView.swift index 88a076c..314dd47 100644 --- a/damus/Views/ProfileView.swift +++ b/damus/Views/ProfileView.swift @@ -282,7 +282,7 @@ struct ProfileView: View { if let relays = profile.relays { NavigationLink(destination: UserRelaysView(state: damus_state, pubkey: profile.pubkey, relays: Array(relays.keys).sorted())) { - 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'.") + Text("\(Text("\(relays.keys.count)", comment: "Number of relay servers a user is connected.").font(.subheadline.weight(.medium))) \(Text(String(format: NSLocalizedString("relays_count", comment: "Part of a larger sentence to describe how many relay servers a user is connected."), relays.keys.count)).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 'Relay' or 'Relays'.") } .buttonStyle(PlainButtonStyle()) } @@ -296,13 +296,14 @@ struct ProfileView: View { var FollowersCount: some View { HStack { - if followers.count_display == "?" { + if followers.count == nil { Image(systemName: "square.and.arrow.down") Text("Followers", comment: "Label describing followers of a user.") .font(.subheadline) .foregroundColor(.gray) } else { - 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'.") + let followerCount = followers.count! + Text("\(Text("\(followerCount)", comment: "Number of people following a user.").font(.subheadline.weight(.medium))) \(Text(String(format: NSLocalizedString("followers_count", comment: "Part of a larger sentence to describe how many people are following a user."), followerCount)).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 'Follower' or 'Followers'.") } } } diff --git a/damus/Views/PubkeyView.swift b/damus/Views/PubkeyView.swift index 7cee1f1..47fcb95 100644 --- a/damus/Views/PubkeyView.swift +++ b/damus/Views/PubkeyView.swift @@ -14,7 +14,7 @@ struct PubkeyView: View { var body: some View { let color: Color = id_to_color(pubkey) ZStack { - Text("\(abbrev_pubkey(pubkey))") + Text("\(abbrev_pubkey(pubkey))", comment: "Abbreviated version of a nostr public key.") .foregroundColor(color) } } diff --git a/damus/Views/ReactionsView.swift b/damus/Views/ReactionsView.swift index a4850fd..3b1f4f9 100644 --- a/damus/Views/ReactionsView.swift +++ b/damus/Views/ReactionsView.swift @@ -20,7 +20,7 @@ struct ReactionsView: View { } .padding() } - .navigationBarTitle("Reactions") + .navigationBarTitle(NSLocalizedString("Reactions", comment: "Navigation bar title for Reactions view.")) .onAppear { model.subscribe() } diff --git a/damus/Views/ReplyQuoteView.swift b/damus/Views/ReplyQuoteView.swift index b982d8c..8e52d02 100644 --- a/damus/Views/ReplyQuoteView.swift +++ b/damus/Views/ReplyQuoteView.swift @@ -28,7 +28,7 @@ struct ReplyQuoteView: View { ProfilePicView(pubkey: event.pubkey, size: 16, highlight: .reply, profiles: profiles) Text(Profile.displayName(profile: profiles.lookup(id: event.pubkey), pubkey: event.pubkey)) .foregroundColor(.accentColor) - Text("\(format_relative_time(event.created_at))") + Text("\(format_relative_time(event.created_at))", comment: "Amount of time that has passed since reply quote event occurred.") .foregroundColor(.gray) } diff --git a/damus/Views/SaveKeysView.swift b/damus/Views/SaveKeysView.swift index 29b6642..ded8fd9 100644 --- a/damus/Views/SaveKeysView.swift +++ b/damus/Views/SaveKeysView.swift @@ -63,7 +63,7 @@ struct SaveKeysView: View { } else if let err = error { Text("Error: \(err)", comment: "Error message indicating why saving keys failed.") .foregroundColor(.red) - DamusWhiteButton("Retry") { + DamusWhiteButton(NSLocalizedString("Retry", comment: "Button to retry completing account creation after an error occurred.")) { complete_account_creation(account) } } else { diff --git a/damus/Views/SetupView.swift b/damus/Views/SetupView.swift index ec8087f..8911793 100644 --- a/damus/Views/SetupView.swift +++ b/damus/Views/SetupView.swift @@ -64,7 +64,7 @@ struct SetupView: View { self.state = .create_account } - Button("Login") { + Button(NSLocalizedString("Login", comment: "Button to log into an account.")) { self.state = .login } .padding([.top, .bottom], 20) diff --git a/damus/Views/SideMenuView.swift b/damus/Views/SideMenuView.swift index 504cca0..94215e3 100644 --- a/damus/Views/SideMenuView.swift +++ b/damus/Views/SideMenuView.swift @@ -92,7 +92,7 @@ struct SideMenuView: View { let profile_model = ProfileModel(pubkey: damus_state.pubkey, damus: damus_state) NavigationLink(destination: ProfileView(damus_state: damus_state, profile: profile_model, followers: followers)) { - Label("Profile", systemImage: "person") + Label(NSLocalizedString("Profile", comment: "Sidebar menu label for Profile view."), systemImage: "person") .font(.title2) .foregroundColor(textColor()) } @@ -102,7 +102,7 @@ struct SideMenuView: View { /* NavigationLink(destination: EmptyView()) { - Label("Relays", systemImage: "xserve") + Label(NSLocalizedString("Relays", comment: "Sidebar menu label for Relay servers view"), systemImage: "xserve") .font(.title2) .foregroundColor(textColor()) } @@ -113,7 +113,7 @@ struct SideMenuView: View { /* NavigationLink(destination: EmptyView()) { - Label("Wallet", systemImage: "bolt") + Label(NSLocalizedString("Wallet", comment: "Sidebar menu label for Wallet view."), systemImage: "bolt") .font(.title2) .foregroundColor(textColor()) } @@ -137,7 +137,7 @@ struct SideMenuView: View { //ConfigView(state: damus_state) confirm_logout = true }, label: { - Label("Sign out", systemImage: "pip.exit") + Label(NSLocalizedString("Sign out", comment: "Sidebar menu label to sign out of the account."), systemImage: "pip.exit") .font(.title3) .foregroundColor(textColor()) }) @@ -153,14 +153,14 @@ struct SideMenuView: View { isSidebarVisible.toggle() } .alert("Logout", isPresented: $confirm_logout) { - Button("Cancel") { + 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.") } Spacer() diff --git a/damus/en-US.lproj/Localizable.stringsdict b/damus/en-US.lproj/Localizable.stringsdict index d09d2ff..7289c3c 100644 --- a/damus/en-US.lproj/Localizable.stringsdict +++ b/damus/en-US.lproj/Localizable.stringsdict @@ -2,6 +2,78 @@ + collapsed_event_view_other_notes + + NSStringLocalizedFormatKey + 路路路 %#@NOTES@ 路路路 + NOTES + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + 0 other notes + one + 1 other note + other + %d other notes + + + followers_count + + NSStringLocalizedFormatKey + %#@FOLLOWERS@ + FOLLOWERS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Followers + one + Follower + other + Followers + + + reactions_count + + NSStringLocalizedFormatKey + %#@REACTIONS@ + REACTIONS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Reactions + one + Reaction + other + Reactions + + + relays_count + + NSStringLocalizedFormatKey + %#@RELAYS@ + RELAYS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Relays + one + Relay + other + Relays + + replying_to_one_and_others NSStringLocalizedFormatKey @@ -38,22 +110,40 @@ & %d others - collapsed_event_view_other_notes + reposts_count NSStringLocalizedFormatKey - 路路路 %#@NOTES@ 路路路 - NOTES + %#@REPOSTS@ + REPOSTS NSStringFormatSpecTypeKey NSStringPluralRuleType NSStringFormatValueTypeKey d zero - 0 other notes + Reposts one - 1 other note + Repost other - %d other notes + Reposts + + + tips_count + + NSStringLocalizedFormatKey + %#@TIPS@ + TIPS + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + zero + Tips + one + Tip + other + Tips diff --git a/damus/es-419.lproj/Localizable.stringsdict b/damus/es-419.lproj/Localizable.stringsdict index c3a3669..d09d2ff 100644 --- a/damus/es-419.lproj/Localizable.stringsdict +++ b/damus/es-419.lproj/Localizable.stringsdict @@ -49,11 +49,11 @@ NSStringFormatValueTypeKey d zero - 0 notes + 0 other notes one - 1 note + 1 other note other - %d notes + %d other notes