Skip to content

Commit 4497f01

Browse files
committed
Warn when a duplicate key is found in a .strings file.
1 parent 4b9eb4a commit 4497f01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R.swift/ResourceTypes/LocalizableStrings.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ private func parseStrings(stringsFile: String, source: String) throws -> [String
6969
}
7070
}
7171

72+
if dictionary[entry.key] != nil {
73+
warn("Skipping duplicate value in \(source) for key: \(entry.key)")
74+
}
75+
7276
dictionary[entry.key] = (params, entry.val)
7377
}
7478

0 commit comments

Comments
 (0)