mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Add useBaseInternationalization to SpecOptions (#961)
* Add 'useBaseInternationalization' setting to SpecOptions (default value of true) * Update PBXProjGenerator to only include Base into knownRegions if it was either detected on the filesystem or if the project spec options opt into it * Update ProjectSpec.md to include useBaseInternationalization * Update AnotherProject to demonstrate Base Internationalization opt out * Update CHANGELOG.md
This commit is contained in:
@@ -292,7 +292,12 @@ public class PBXProjGenerator {
|
||||
projectAttributes["knownAssetTags"] = assetTags
|
||||
}
|
||||
|
||||
pbxProject.knownRegions = sourceGenerator.knownRegions.union(["Base", developmentRegion]).sorted()
|
||||
var knownRegions = Set(sourceGenerator.knownRegions)
|
||||
knownRegions.insert(developmentRegion)
|
||||
if project.options.useBaseInternationalization {
|
||||
knownRegions.insert("Base")
|
||||
}
|
||||
pbxProject.knownRegions = knownRegions.sorted()
|
||||
|
||||
pbxProject.packages = packageReferences.sorted { $0.key < $1.key }.map { $1 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user