Fix localization issues, and export and import translations

This commit is contained in:
2023-03-16 22:55:54 -04:00
parent eabbb12195
commit f367df2225
27 changed files with 715 additions and 56 deletions

View File

@@ -18,11 +18,11 @@ struct EventMenuContext: View {
var body: some View {
HStack {
Menu {
MenuItems(event: event, keypair: keypair, target_pubkey: target_pubkey, bookmarks: bookmarks)
} label: {
Label(NSLocalizedString("", comment: "Context menu"), systemImage: "ellipsis")
Label("", systemImage: "ellipsis")
.foregroundColor(Color.gray)
}
}

View File

@@ -49,7 +49,7 @@ func reply_desc(profiles: Profiles, event: NostrEvent, locale: Locale = Locale.c
if othersCount == 0 {
return String(format: NSLocalizedString("Replying to %@ & %@", bundle: bundle, comment: "Label to indicate that the user is replying to 2 users."), locale: locale, uniqueNames[0], uniqueNames[1])
} else {
return String(format: bundle.localizedString(forKey: "replying_to_two_and_others", value: nil, table: nil), locale: locale, othersCount, uniqueNames[0], uniqueNames[1])
return String(format: localizedStringFormat(key: "replying_to_two_and_others", locale: locale), locale: locale, othersCount, uniqueNames[0], uniqueNames[1])
}
}

View File

@@ -40,7 +40,7 @@ struct TextEvent: View {
let pk = is_anon ? "anon" : pubkey
EventProfileName(pubkey: pk, profile: profile, damus: damus, show_friend_confirmed: true, size: .normal)
Text("")
Text(verbatim: "")
.font(.footnote)
.foregroundColor(.gray)
Text(verbatim: "\(format_relative_time(event.created_at))")