Add es-419 and finish adding support for the translations

Added Latin American Spanish (probably not the best translation)

Made everything reference the swiftgen stuff rather than having strings
This commit is contained in:
bogotesr
2022-12-24 21:06:28 -07:00
committed by Joe Mattiello
parent 6257fdcd61
commit 2c07009b04
15 changed files with 499 additions and 81 deletions

View File

@@ -20,18 +20,18 @@ enum AppAction: Int, CaseIterable {
var title: String {
switch self {
case .install: return "Install"
case .open: return "Open"
case .refresh: return "Refresh"
case .activate: return "Activate"
case .deactivate: return "Deactivate"
case .remove: return "Remove"
case .enableJIT: return "Enable JIT"
case .backup: return "Back Up"
case .exportBackup: return "Export Backup"
case .restoreBackup: return "Restore Backup"
case .chooseCustomIcon: return "Change Icon"
case .resetCustomIcon: return "Reset Icon"
case .install: return L10n.AppAction.install
case .open: return L10n.AppAction.open
case .refresh: return L10n.AppAction.refresh
case .activate: return L10n.AppAction.activate
case .deactivate: return L10n.AppAction.deactivate
case .remove: return L10n.AppAction.remove
case .enableJIT: return L10n.AppAction.enableJIT
case .backup: return L10n.AppAction.backup
case .exportBackup: return L10n.AppAction.exportBackup
case .restoreBackup: return L10n.AppAction.restoreBackup
case .chooseCustomIcon: return L10n.AppAction.chooseCustomIcon
case .resetCustomIcon: return L10n.AppAction.resetIcon
}
}

View File

@@ -68,7 +68,7 @@ struct MyAppsView: View {
LazyVStack(spacing: 16) {
if let progress = SideloadingManager.shared.progress {
VStack {
Text("Sideloading in progress...")
Text(L10n.MyAppsView.sideloading)
.padding()
ProgressView(progress)
@@ -84,14 +84,14 @@ struct MyAppsView: View {
}
HStack {
Text("Active")
Text(L10n.MyAppsView.active)
.font(.title2)
.bold()
Spacer()
SwiftUI.Button {
} label: {
Text("Refresh All")
Text(L10n.MyAppsView.refreshAll)
}
}
@@ -111,14 +111,14 @@ struct MyAppsView: View {
VStack {
if DatabaseManager.shared.activeTeam()?.type == .free {
Text("\(remainingAppIDs) App IDs Remaining")
Text("\(remainingAppIDs) \(L10n.MyAppsView.appIDsRemaining)")
.foregroundColor(.secondary)
}
SwiftUI.Button {
self.isShowingAppIDsView = true
} label: {
Text("View App IDs")
Text(L10n.MyAppsView.viewAppIDs)
}
.sheet(isPresented: self.$isShowingAppIDsView) {
NavigationView {
@@ -130,7 +130,7 @@ struct MyAppsView: View {
.padding(.horizontal)
}
.background(Color(UIColor.systemGroupedBackground).ignoresSafeArea())
.navigationTitle("My Apps")
.navigationTitle(L10n.MyAppsView.myApps)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
SwiftUI.Button {
@@ -239,7 +239,7 @@ extension MyAppsView {
NotificationManager.shared.reportError(error: failure.value)
} else {
// TODO: Localize
let title = "Failed to refresh \(failures.count) apps."
let title = "\(L10n.MyAppsView.failedToRefresh) \(failures.count) \(L10n.MyAppsView.apps)"
let error = failures.first?.value as NSError?
let message = error?.localizedFailure ?? error?.localizedFailureReason ?? error?.localizedDescription