Skip to content

Conversation

tomlokhorst
Copy link
Collaborator

@tomlokhorst tomlokhorst commented Jul 30, 2016

Implements first part of #136 (comment)

Future work:

  • Add localized resources warnings
  • Refactor warnings so that it's not an sideeffect anymore

Update this pattern:

let groupedResourceFiles = resourceFiles.groupBySwiftIdentifiers { $0.fullname }
groupedResourceFiles.printWarningsForDuplicatesAndEmpties(source: "resource file", result: "file")

// groupedResourceFiles.uniques.map(stuff)

To the following:

let groupedResourceFiles = resourceFiles.groupBySwiftIdentifiers(
  identifier: { $0.fullname }
  source: "resource file",
  result: "file"
)

// groupedResourceFiles.map(stuff)

@tomlokhorst
Copy link
Collaborator Author

Related bug I found while testing #235:

If there are duplicate keys in localized string files, a warning is printed, but the key isn't skipped for other localizations. This should be fixed when these two PRs are merged

  • Duplicates in one locale should also skip other locales

Example where keys aren't correctly skipped:

// Localized.strings (en)
one = One;
one = One;

// Localized.strings (nl)
one = Een;

@mac-cain13 mac-cain13 merged commit 356f86e into master Aug 24, 2016
@mac-cain13 mac-cain13 deleted the swiftidentifier-refactor branch August 24, 2016 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants