wader/rgen — pull request #2 by kenley (2013-02-11 08:36:28+00:00)
Title: Support for multilingual string resources

The current version does not find Localizable.strings if the file have different variants per language. This update fixes this and now files with different variants are parsed correctly in multilingual projects.

In more detail, the problem was that in contrast with simple file references among the build resources files, multilingual files are not referred directly via a PBXFileReference but via a PBXVariantGroup, which contains the list of the different file variants as its children.

For instance, the following fileRef refers to a PBXVariantGroup (instead of a PBXFileReference, as the current code expected):

4B3DE6E2169B0FD300D0989F /* Localizable.strings in Resources */ = {
isa = PBXBuildFile;
fileRef = 4B3DE6E5169B0FD300D0989F /* Localizable.strings */; // this points to a PBXVariantGroup
};

4B3DE6E5169B0FD300D0989F /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
4B3DE6E4169B0FD300D0989F /* en */, // this points to a PBXFileReference
4B3DE6E7169B107E00D0989F /* hu */, // this points to a PBXFileReference
);
name = Localizable.strings;
sourceTree = "";
};

The fixed code recognizes PBXVariantGroup references and correctly processes them.