Render multiple translators in Credits (#701)
This commit is contained in:
parent
df2fc54044
commit
6d479a7059
|
@ -31,18 +31,18 @@
|
|||
"message": "© Copyright 2015-2024 Jason A. Donenfeld. All Rights Reserved. \"WireGuard\" and the \"WireGuard\" logo are registered trademarks of Jason A. Donenfeld."
|
||||
}],
|
||||
"translations": {
|
||||
"de": "Christian Lederer, Theodor Tietze",
|
||||
"el": "Konstantinos Koukoulakis",
|
||||
"en-US": "Davide De Rosa",
|
||||
"es": "Davide De Rosa, Elena Vivó",
|
||||
"fr-FR": "Julien Laniel",
|
||||
"it": "Davide De Rosa",
|
||||
"nl": "Norbert de Vreede",
|
||||
"pl": "Piotr Książek",
|
||||
"pt-BR": "Helder Santana",
|
||||
"ru": "Alexander Korobynikov",
|
||||
"sv": "Henry Gross-Hellsen",
|
||||
"uk": "Dmitry Chirkin",
|
||||
"zh-Hans": "OnlyThen"
|
||||
"de": ["Christian Lederer", "Theodor Tietze"],
|
||||
"el": ["Konstantinos Koukoulakis"],
|
||||
"en-US": ["Davide De Rosa"],
|
||||
"es": ["Davide De Rosa", "Elena Vivó"],
|
||||
"fr-FR": ["Julien Laniel"],
|
||||
"it": ["Davide De Rosa"],
|
||||
"nl": ["Norbert de Vreede"],
|
||||
"pl": ["Piotr Książek"],
|
||||
"pt-BR": ["Helder Santana"],
|
||||
"ru": ["Alexander Korobynikov"],
|
||||
"sv": ["Henry Gross-Hellsen"],
|
||||
"uk": ["Dmitry Chirkin"],
|
||||
"zh-Hans": ["OnlyThen"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public struct Credits: Decodable {
|
|||
|
||||
public let notices: [Notice]
|
||||
|
||||
public let translations: [String: String]
|
||||
public let translations: [String: [String]]
|
||||
}
|
||||
|
||||
public struct GenericCreditsView: View {
|
||||
|
@ -180,9 +180,13 @@ private extension GenericCreditsView {
|
|||
HStack {
|
||||
Text(code.localizedAsCountryCode)
|
||||
Spacer()
|
||||
credits.translations[code].map { author in
|
||||
Text(author)
|
||||
.padding()
|
||||
credits.translations[code].map { authors in
|
||||
VStack(spacing: 4) {
|
||||
ForEach(authors, id: \.self) {
|
||||
Text($0)
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue