Skip to content

Commit

Permalink
Ignore storyboard localization files. Fixes #17 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaandedeoglu authored Jan 27, 2020
1 parent b1b95b7 commit 8395628
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"repositoryURL": "https://github.com/apple/swift-tools-support-core.git",
"state": {
"branch": "master",
"revision": "693aba4c4c9dcc4767cc853a0dd38bf90ad8c258",
"revision": "f9e7ad4d3dd25d698c53a723ca67cd145418e821",
"version": null
}
},
Expand All @@ -42,8 +42,8 @@
"repositoryURL": "https://github.com/tuist/xcodeproj.git",
"state": {
"branch": null,
"revision": "23f7e12a7e0db29b4f16052692d99f9fbe41fa15",
"version": "7.5.0"
"revision": "02e4ee305baf0ba23af7522210250d8275200122",
"version": "7.6.0"
}
}
]
Expand Down
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import PackageDescription

let package = Package(
name: "Shark",
products: [
.executable(name: "Shark", targets: ["Shark"]),
],
dependencies: [
.package(url: "https://github.com/tuist/xcodeproj.git", .upToNextMajor(from: "7.5.0")),
.package(url: "https://github.com/apple/swift-tools-support-core.git", .branch("master"))
Expand Down
3 changes: 2 additions & 1 deletion Sources/Shark/LocalizationEnumBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ enum LocalizationBuilderError: Error {

enum LocalizationEnumBuilder {
static func localizationsEnumString(forFilesAtPaths paths: [String], topLevelName: String) throws -> String? {
let termsDictionaries = try paths.compactMap({ path -> [String: String] in
let termsDictionaries = try paths.compactMap({ path -> [String: String]? in
guard FileManager.default.fileExists(atPath: path) else { return nil }
guard let termsDictionary = NSDictionary(contentsOfFile: path) as? [String: String] else {
throw LocalizationBuilderError.invalidLocalizableStringsFile(path: path)
}
Expand Down

0 comments on commit 8395628

Please sign in to comment.