Enable Base Localization by default (#955)

* Update PBXProjGenerator to include 'Base' developmentRegion and file system derived knownRegions in the output knownRegions

* Update CHANGELOG.md

* Run tests to update fixtures
This commit is contained in:
Liam Nichols
2020-10-02 18:23:38 +10:00
committed by GitHub
parent 5ea9b4eec4
commit d959bdfddd
6 changed files with 8 additions and 3 deletions
+3 -3
View File
@@ -95,13 +95,14 @@ public class PBXProjGenerator {
)
)
let developmentRegion = project.options.developmentLanguage ?? "en"
let pbxProject = addObject(
PBXProject(
name: project.name,
buildConfigurationList: buildConfigList,
compatibilityVersion: project.compatibilityVersion,
mainGroup: mainGroup,
developmentRegion: project.options.developmentLanguage ?? "en"
developmentRegion: developmentRegion
)
)
@@ -291,8 +292,7 @@ public class PBXProjGenerator {
projectAttributes["knownAssetTags"] = assetTags
}
let knownRegions = sourceGenerator.knownRegions.sorted()
pbxProject.knownRegions = knownRegions.isEmpty ? ["en"] : knownRegions
pbxProject.knownRegions = sourceGenerator.knownRegions.union(["Base", developmentRegion]).sorted()
pbxProject.packages = packageReferences.sorted { $0.key < $1.key }.map { $1 }