genxibstrings not properly finding files in directory.
Closed this issue · 3 comments
I am trying to call genxibstrings in a directory with a lot of .xib files in it. (I'm running it from the Project/Resources directory, since that's the directory that has all the xibs in it.)
When I do this, I get:
...$ genxibstrings
Output file: ./Localizable.strings
Input files: ["**/*.{xib,nib,storyboard}"]
Localizable.strings gets generated, but it's empty.
If I try and run ibtool directly on each of the xibs it does properly extract the values.
It seems to me that Input files should be an array of all the files and not the string "*/.{xib,nib,storyboard}".
I tried this with the default ruby installed (2) and I also installed ruby 1.9.2 (using rvm) and tried it that way too with the same results.
Any idea what's going on?
I had the same issue as you. I fixed it by modifying the genxibstrings script.
Now, not sure if something else was intended, but I changed the script to properly touch the temporary strings file.
You should also run it from the root (or whever your language.lproj files should be situated), it'll recurse properly.
Around line 42...
name = File.basename(file)
temp_file = File.join(Dir.tmpdir, name + ".strings")
FileUtils.touch(temp_file) # <-- Added this line
Thanks stephure! I had the same issue too 👍
Sorry guys! this issue was introduced with a pull request I merged without testing it. I am not having much time to actually review the pull requests, but it should be working now.