-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for generating variant groups without Base.lproj #157
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, nice one @ryohey! Looks good, just some minor comments
@@ -168,5 +170,6 @@ extension ProjectSpec.Options: JSONObjectConvertible { | |||
bundleIdPrefix = jsonDictionary.json(atKeyPath: "bundleIdPrefix") | |||
settingPresets = jsonDictionary.json(atKeyPath: "settingPresets") ?? .all | |||
createIntermediateGroups = jsonDictionary.json(atKeyPath: "createIntermediateGroups") ?? false | |||
developmentLanguage = jsonDictionary.json(atKeyPath: "developmentLanguage") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
let projectAttributes: [String: Any] = ["LastUpgradeCheck": currentXcodeVersion].merged(spec.attributes) | ||
let root = PBXProject(name: spec.name, | ||
reference: proj.rootObject, | ||
buildConfigurationList: buildConfigList.reference, | ||
compatibilityVersion: "Xcode 3.2", | ||
mainGroup: mainGroup.reference, | ||
developmentRegion: spec.options.developmentLanguage ?? "en", | ||
knownRegions: knownRegions, | ||
knownRegions: sourceGenerator.knownRegions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we sort these, otherwise might get diffs later due to how Set is used
findLocalisedDirectory(by: NSLocale.canonicalLanguageIdentifier(from: spec.options.developmentLanguage ?? "en")) | ||
}() | ||
|
||
knownRegions = Array(Set(knownRegions + localisedDirectories.map { $0.lastComponentWithoutExtension })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just make knownRegions a Set itself
@ryohey I'll fix those minor things in master |
@yonaskolb OK Thanks |
fixes #143