On Apr 13, 2006, at 1:20 PM, Ondra Cada wrote: Isaac, Scott,
On 13.4.2006, at 21:52, Scott Tooker wrote:
Currently Xcode doesn't preprocess InfoPlist.strings file (a known issue).
I've never tried myself, but I believe one could pretty easily add a script build phase which would preprocess the Info.plist any way one wants to, and put the result into ${BUILT_PRODUCTS_DIR} (overwriting thus the standard Info), or am I overlooking something important here?
Yes, the point is that Info-plist.strings files are different from Info.plist files, so all the preprocessing and build expansions that work on plist files themselves don't work on the strings files that Cocoa uses to pull localized values. The main differences:
1) Strings files are distributed in lproj folders; there may be more than one of them in a project. 2) In many cases, language-specific strings files are added after the fact. Variable substitution requires all language localizations to be added at build time, which is not how a lot of shops (including Apple's) operate. 3) Strings files are UTF-16, and the vast majority of text processors (such as the C preprocessor) only work on 8-bit (ASCII, UTF-8, and MacRoman) formats.
So while we see the value of substitution in strings files, it's not currently implemented, and not easy to implement with known methods.
Chris |