damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit dcf328e7acb5b3d35fdfcacb6d7be17d6269c1b2
parent c10fcc52e3bd87577dc39d75c1ced98d63055551
Author: Terry Yiu <963907+tyiu@users.noreply.github.com>
Date:   Fri,  6 Jan 2023 21:40:06 -0500

Fix localization bugs

Diffstat:
Mdamus/Views/EditMetadataView.swift | 4++--
Mdamus/Views/EventView.swift | 6+++---
Mdamus/en.lproj/Localizable.stringsdict | 4++--
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/damus/Views/EditMetadataView.swift b/damus/Views/EditMetadataView.swift @@ -160,9 +160,9 @@ struct EditMetadataView: View { Text("NIP-05 Verification") }, footer: { if let parts = nip05_parts { - Text(String.localizedStringWithFormat("'%@' at '%@' will be used for verification", parts.username, parts.host)) + Text("'\(parts.username)' at '\(parts.host)' will be used for verification", comment: "Description of how the nip05 identifier would be used for verification.") } else { - Text(String.localizedStringWithFormat("'%@' is an invalid nip05 identifier. It should look like an email.", nip05)) + Text("'\(nip05)' is an invalid nip05 identifier. It should look like an email.", comment: "Description of why the nip05 identifier is invalid.") } }) diff --git a/damus/Views/EventView.swift b/damus/Views/EventView.swift @@ -380,13 +380,13 @@ func reply_desc(profiles: Profiles, event: NostrEvent) -> String { if names.count == 2 { if n > 2 { let othersCount = n - pubkeys.count - return String(format: NSLocalizedString("replying_to_two_and_others", comment: "Label to indicate that the user is replying to 2 users and others."), othersCount, names[0], names[1]) + return String(format: NSLocalizedString("replying_to_two_and_others", comment: "Label to indicate that the user is replying to 2 users and others."), names[0], names[1], othersCount) } - return String.localizedStringWithFormat("Replying to %@ & %@", names[0], names[1]) + return String(format: NSLocalizedString("Replying to %@ & %@", comment: "Label to indicate that the user is replying to 2 users."), names[0], names[1]) } let othersCount = n - pubkeys.count - return String(format: NSLocalizedString("replying_to_one_and_others", comment: "Label to indicate that the user is replying to 1 user and others."), othersCount, names[0]) + return String(format: NSLocalizedString("replying_to_one_and_others", comment: "Label to indicate that the user is replying to 1 user and others."), names[0], othersCount) } diff --git a/damus/en.lproj/Localizable.stringsdict b/damus/en.lproj/Localizable.stringsdict @@ -5,7 +5,7 @@ <key>replying_to_one_and_others</key> <dict> <key>NSStringLocalizedFormatKey</key> - <string>Replying to %2$@%#@others@</string> + <string>Replying to %@%#@others@</string> <key>others</key> <dict> <key>NSStringFormatSpecTypeKey</key> @@ -23,7 +23,7 @@ <key>replying_to_two_and_others</key> <dict> <key>NSStringLocalizedFormatKey</key> - <string>Replying to %2$@, %3$@%#@others@</string> + <string>Replying to %@, %@%#@others@</string> <key>others</key> <dict> <key>NSStringFormatSpecTypeKey</key>