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