Localize strings in code

This commit is contained in:
Danny Moesch 2019-01-14 20:57:45 +01:00 committed by Mingshen Sun
parent 2d5ca58bd9
commit 1b4040135e
36 changed files with 626 additions and 334 deletions

View file

@ -140,7 +140,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
* The store could not be migrated to the current model version.
Check the error message to determine what the actual problem was.
*/
fatalError("Unresolved error \(error), \(error.userInfo)")
fatalError("UnresolvedError".localize("\(error), \(error.userInfo)"))
}
})
return container
@ -157,7 +157,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
fatalError("UnresolvedError".localize("\(nserror), \(nserror.userInfo)"))
}
}
}