Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support to change app/content language.
R.swift dependency was removed. Closes #188
- Loading branch information
1 parent
312d0b6
commit d21b69a
Showing
57 changed files
with
754 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
import CouchTrackerCore | ||
import CouchTrackerDebug | ||
|
||
final class AppFlowiOSModuleDataSource: AppFlowModuleDataSource { | ||
private typealias Strings = CouchTrackerCoreStrings | ||
var modulePages: [ModulePage] | ||
|
||
init() { | ||
init(buildConfig: BuildConfig) { | ||
let moviesView = MoviesManagerModule.setupModule() | ||
let moviesPage = ModulePage(page: moviesView, title: R.string.localizable.movies()) | ||
let moviesPage = ModulePage(page: moviesView, title: Strings.movies()) | ||
|
||
let showsView = ShowsManagerModule.setupModule() | ||
let showsPage = ModulePage(page: showsView, title: R.string.localizable.shows()) | ||
let showsPage = ModulePage(page: showsView, title: Strings.shows()) | ||
|
||
let appConfigsView = AppStateModule.setupModule() | ||
let appConfigsPage = ModulePage(page: appConfigsView, title: R.string.localizable.settings()) | ||
let appConfigsPage = ModulePage(page: appConfigsView, title: Strings.settings()) | ||
|
||
modulePages = [moviesPage, showsPage, appConfigsPage] | ||
if buildConfig.debug { | ||
let debugPage = ModulePage(page: DebugMenuModule.setupModule(), title: "Debug") | ||
modulePages = [moviesPage, showsPage, appConfigsPage, debugPage] | ||
} else { | ||
modulePages = [moviesPage, showsPage, appConfigsPage] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import CouchTrackerCore | ||
|
||
extension Bundle { | ||
// swiftlint:disable force_unwrapping | ||
public static let couchTrackerApp = Bundle(identifier: "io.github.pietrocaselani.CouchTrackerApp")! | ||
// swiftlint:enable force_unwrapping | ||
} | ||
|
||
public final class CouchTrackerAppBundleProvider: BundleProvider { | ||
public static let instance = CouchTrackerAppBundleProvider() | ||
public var bundle = Bundle.couchTrackerApp | ||
|
||
private init() {} | ||
} | ||
|
||
public func couchTrackerAppImage(named name: String, | ||
bundleProvider: BundleProvider = CouchTrackerAppBundleProvider.instance, | ||
compatibleWith traits: UITraitCollection? = nil) -> UIImage? { | ||
return UIImage(named: name, in: bundleProvider.bundle, compatibleWith: traits) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public enum Images { | ||
// swiftlint:disable force_unwrapping | ||
public static func filter() -> UIImage { | ||
return couchTrackerAppImage(named: "Filter")! | ||
} | ||
|
||
public static func direction() -> UIImage { | ||
return couchTrackerAppImage(named: "Direction")! | ||
} | ||
|
||
public static func posterPlacehoder() -> UIImage { | ||
return couchTrackerAppImage(named: "PosterPlacehoder")! | ||
} | ||
|
||
public static func backdropPlaceholder() -> UIImage { | ||
return couchTrackerAppImage(named: "BackdropPlaceholder")! | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.