Merge branch 'tyiu/notifications' into tyiu/translations

This commit is contained in:
tyiu committed 2023-02-27 10:58:10 +13:00
commit 240fda2429
6 files changed
+209 -37

No files matched your search

+6 -2
View File
@@ -7,7 +7,11 @@
import Foundation
func bundleForLocale(locale: Locale) -> Bundle {
let path = Bundle.main.path(forResource: locale.identifier, ofType: "lproj")
func bundleForLocale(locale: Locale?) -> Bundle {
if locale == nil {
return Bundle.main
}
let path = Bundle.main.path(forResource: locale!.identifier, ofType: "lproj")
return path != nil ? (Bundle(path: path!) ?? Bundle.main) : Bundle.main
}