Files
letro-ios/ElementX/Sources/AppDelegate.swift
ismailgulek 4adabaea71 Localizations Setup (#6)
* Move assets into ElementX folder

* Add first version of localizer script

* Add generated strings & tests & fallback mechanism

* Rename strings file to Localizable

* Rename Assets to Resources

* Calculate preferred languages only when needed, remove share extension check

* Add comments in the localizer script

* Add GH workflow to push issues to the [ElementX board](https://github.com/orgs/vector-im/projects/43)

* Closes #16 - Add license file

* New version of localizer script, handle pluralization

* Move assets into ElementX folder

* Add first version of localizer script

* Add generated strings & tests & fallback mechanism

* Rename strings file to Localizable

* Rename Assets to Resources

* Calculate preferred languages only when needed, remove share extension check

* Add comments in the localizer script

* New version of localizer script, handle pluralization

* Revert login button text

* Add multiple dialect pluralization, fix string formatting

Co-authored-by: manuroe <manu@matrix.org>
Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-04-26 22:48:17 +03:00

55 lines
1.4 KiB
Swift

//
// AppDelegate.swift
// ElementX
//
// Created by Stefan Ceriu on 11.02.2022.
//
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
private var appCoordinator: AppCoordinator!
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
// fixme: Use `Bundle.elementLanguage = ".."` when we have the functionality
// use `en` as fallback language
Bundle.elementFallbackLanguage = "en"
return true
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
if isRunningUnitTests {
return true
}
if isRunningUITests {
// Bootstrap a different version of the application
return true
}
appCoordinator = AppCoordinator()
appCoordinator.start()
return true
}
private var isRunningUnitTests: Bool {
#if DEBUG
ProcessInfo.processInfo.environment["IS_RUNNING_UNIT_TESTS"] == "1"
#else
false
#endif
}
private var isRunningUITests: Bool {
#if DEBUG
ProcessInfo.processInfo.environment["IS_RUNNING_UI_TESTS"] == "1"
#else
false
#endif
}
}