On Jun 5, 2009, at 3:38 AM, Eric Slosser wrote:
On Jun 4, 2009, at 8:46 PM, Jonathan Hess wrote:
On Jun 4, 2009, at 6:28 AM, Eric Slosser wrote:
(Sorry if this is OT, I couldn't find a better apple-hosted list...)
How does one use AppleGlot and XIBs?
I have an app, "My.app", that was previously localized. I'm
working on version 2.0.
My app is starting to use XIB files. These get compiled into NIBs
in My.app.
The AppleGlot docs seem to say I should put My.app 2.0 into
_NewBase, and My.app 1.0 into _OldLoc.
When I do that, the nibs that came from xibs are ignored
(my.app.wg doesn't contain any of the strings from those nibs).
If I put NewDialog.xib into my.app, I see its strings in the .wg.
It seems like I be putting the source code form of the
"<language>.lproj" folders into _OldBase, but none of the docs say
that.
Can someone point me at a discussion of how to use AppleGlot in
the presence of XIB files?
And (if it's not covered by default): What to do when the previous
shipped app had a non-compiled Foo.nib, and the about-to-ship app
has Foo.xib in the souces, and thus a compiled Foo.nib in the
built app.
Hey Eric -
I believe the file names in _OldBase, _NewBase, and _OldLoc need to
match. It sounds like your files in _OldBase and _OldLoc are
probably .nib files, but you're files in _NewBase are .xib files.
You can upgrade the files in _OldBase and _OldLoc to .xib files
with something like this:
cd _OldLoc
find . -name "*.nib" -type d -exec ibtool --upgrade {} \;
cd _OldBase
find . -name "*.nib" -type d -exec ibtool --upgrade {} \;
Thanks for the suggestion, Jon. All the places have .nib files,
but the ones in _Newbase are compiled .nibs.
But as yours is the best suggestion I got, I'll try upgrading the
nibs in _OldBase and _OldLoc to .xibs and copying .xibs into the
built product in _Newbase.
It sounds like you are localizing the built product, rather than the
source. If that's the case, you can enable IBC_FLATTEN_NIBS = YES in
your build settings. The build settings UI presents IBC_FLATTEN_NIBS
as "Flatten Compiled XIB Files" in the "Interface Builder XIB
Compiler" section. Turning that option on will cause the built NIB
files to still be editable by IB and ibtool, which will allow
AppleGlot to process them.
You should not ship NIB files built this way. If you do, they will
work, but they're also much larger than the completely stripped NIB
files that you get when this build setting is turned on.
Good Luck -
Jon Hess
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com