Skip to content

Commit

Permalink
Fixed logic related to order of elements in localization directory Pa…
Browse files Browse the repository at this point in the history
…th array
  • Loading branch information
takeshi-1000 committed Dec 7, 2022
1 parent bad37c9 commit bb02e01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/XcodeGenKit/PBXVariantGroupGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ class PBXVariantGroupGenerator: TargetSourceFilterable {

let localizeDirs: [Path] = children
.filter ({ $0.extension == "lproj" })
.reduce(into: [Path]()) { partialResult, path in
if path.lastComponentWithoutExtension == "Base" {
partialResult.append(path)
} else {
partialResult.insert(path, at: 0)
}
}

guard localizeDirs.count > 0 else {
return
Expand Down

0 comments on commit bb02e01

Please sign in to comment.