Storyboard-Strings-Extraction
Storyboard-Strings-Extraction copied to clipboard
Does this work?
I'm sorry I just can'T get this to work. Using Xcode 6, iOS8.
I tried it out like this: I have base localization already enabled for my Main_iPhone.storyboard. I added a new label to one of the view controllers. THen ran this script. Nothing happened... Nothing was added. The id of the label is not in any of the strings files.
I'm using Xcode 5 iOS7 and am having issues too. The script created .strings files in my Base.lproj folder, but not in the language specific folders like en.lproj etc...
Thanks a lot for your posts. I’m a very sorry but I am not using this script myself in any of my projects and I currently don’t have time to look into this more closely.
Ok then you maybe you should add something like "unsupported" etc in readme to save people some time :-)
I have a Base.lproj, en.lproj and ja.lproj. In the Base.lproj I have a Main.storyboard and a LaunchScreen.xib. So string are extracted and put into a new Main.strings file under the Base.lproj folder – but this file is not added to my project. I have to add it manually after running the script for the first time. But I also noticed that the ja.lproj/Main.strings is not updated – seems this script only supports the Main.storyboard? as no LaunchScreen.strings are not updated either.
Made it work at least in my environment. Did a fork + PR.
Works well here with the latest version of Xcode and the recent PR that was made. Would be cool to get rid of realpath though!
IMO Feel free to close.
FYI: I just tried with Xcode 6.3.2 in a project that already had Base, English and German localizations. After adding the script as a build task, all my localized .strings files were empty (existing translations deleted). Of course I'm using git, so no harm done ;-)
@audiocommander same here.
If this doesn't work for you, you might want to checkout BartyCrouch, a command line tool written in Swift that does something fairly similar to this script. I've written it since there didn't seem to be a maintained solution right now (as it seems this repo isn't maintained anymore). I hope this helps.
@Dschee Cool, thanks for the pointer.