mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Localizations
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user