Fixed improper localization file renaming. (.xib, .strings -> .storyboard)#104
Fixed improper localization file renaming. (.xib, .strings -> .storyboard)#104SpencerMichaels wants to merge 3 commits intovenmo:masterfrom SpencerMichaels:localization-fix
Conversation
|
Could you add a test case for this? You can use the https://github.com/venmo/synx/tree/master/spec/dummy/dummy.xcodeproj to add the case where this breaks, then add to https://github.com/venmo/synx/blob/master/spec/synx/expected_file_structure.yml and https://github.com/venmo/synx/blob/master/spec/synx/expected_group_structure.yml. Ultimately, these tests will end up making your assertion by using those yml files https://github.com/venmo/synx/blob/master/spec/synx/project_spec.rb#L103-L109 I tried, but I don't know a lot about localization files or how to reproduce this, sadly. |
|
Sorry for taking so long! I just updated this PR with what should be a working test. Unfortunately I think there's an unrelated error in Travis relating to Is this a problem on your end? |
|
I pulled your commits over here and tried upgrading the ruby version from 2.1.1 to 2.2.5 on travis... let's see how that goes :) |
In issue #68 it's been noted that with XCode 5's new method of handling localization,
synxwill rename.stringsand.xibfiles to the.storyboardextension of their parent. Someone attempted a fix (see #77) but seemingly didn't account for some edge cases since other folders were absent after running that version. This is my attempt at fixing both issues — forPBXVariantGroups, it takes only the file extension from the original path, and constructs the rest of the new path in the same way as before. This certainly fixes #68, and I believe it doesn't interfere with anything else as #77 did.(By the way, I'm not familiar with Ruby's standard libraries, so there is probably a more concise way to do the string manipulation that I did here — if there's a better way I'd be glad to update my code.)