Localizations

This commit is contained in:
Arkadiusz Fal
2022-09-04 17:28:30 +02:00
parent 2d51f6adff
commit b66e177114
33 changed files with 2180 additions and 122 deletions

View File

@@ -41,7 +41,7 @@ struct LocationsSettings: View {
}
@ViewBuilder var settings: some View {
Section(header: SettingsHeader(text: "Public Locations"), footer: countryFooter) {
Section(header: SettingsHeader(text: "Public Locations".localized()), footer: countryFooter) {
Picker("Country", selection: $countryOfPublicInstances) {
Text("Don't use public locations").tag(String?.none)
ForEach(countries, id: \.self) { country in
@@ -65,7 +65,7 @@ struct LocationsSettings: View {
.disabled(countryOfPublicInstances.isNil)
}
Section(header: SettingsHeader(text: "Custom Locations")) {
Section(header: SettingsHeader(text: "Custom Locations".localized())) {
#if os(macOS)
InstancesSettings()
.environmentObject(model)
@@ -80,8 +80,8 @@ struct LocationsSettings: View {
@ViewBuilder var countryFooter: some View {
if let account = accounts.current {
let locationType = account.isPublic ? (account.country ?? "Unknown") : "Custom"
let description = account.isPublic ? account.url : account.instance?.description ?? "unknown"
let locationType = account.isPublic ? (account.country ?? "Unknown") : "Custom".localized()
let description = account.isPublic ? account.url : account.instance?.description ?? "unknown".localized()
Text("Current: \(locationType)\n\(description)")
.foregroundColor(.secondary)
@@ -99,7 +99,7 @@ struct LocationsSettings: View {
}
}
.onFailure { _ in
model.presentAlert(title: "Could not load locations manifest")
model.presentAlert(title: "Could not load locations manifest".localized())
}
}