Fix localization crash

This commit is contained in:
William Casarin
2023-02-20 12:40:34 -08:00
parent f3056653db
commit 68b57d8b99

View File

@@ -45,14 +45,14 @@ func reply_desc(profiles: Profiles, event: NostrEvent) -> String {
if othersCount == 0 {
return String(format: NSLocalizedString("Replying to %@ & %@", comment: "Label to indicate that the user is replying to 2 users."), names[0], names[1])
} else {
return String(format: Bundle.main.localizedString(forKey: "replying_to_two_and_others", value: nil, table: nil), othersCount, names[0], names[1])
return String(format: "Replying to %@, %@ & %d others", names[0], names[1], othersCount)
}
}
if othersCount == 0 {
return String(format: NSLocalizedString("Replying to %@", comment: "Label to indicate that the user is replying to 1 user."), names[0])
} else {
return String(format: Bundle.main.localizedString(forKey: "replying_to_one_and_others", value: nil, table: nil), othersCount, names[0])
return String(format: "Replying to %@ & %d others", names[0], othersCount)
}
}