[Adium-devl] Watching a first time Adium user for 5 minutes

Peter Hosey boredzo at gmail.com
Sun Jan 28 15:35:04 UTC 2007


On Jan 28, 2007, at 07:19:19, Andreas Monitzer wrote:
> On Jan 28, 2007, at 16:04, Evan Schoenberg wrote:
>> I see.  And the separator characters let us parse the arguments  
>> out and stick them back into a localized string wherever they may  
>> need to roam?
>
> Right.

No need for magic separators—this sort of thing can be done with NS/ 
CF's positional-formatter extension.

gaimString = "Gaim string for blah"

cocoaLocalizedString = NSLocalizedString(gaimString, /*comment*/  
@"blah")
= cocoaLocalizedString = \
	@"Klingon word for bar: %2$@" \
	@"Klingon word for foo: %1$@"  \
	@"Klingon word for baz: %3$@"

[NSString stringWithFormat:cocoaLocalizedString,
	@"foo",
	@"bar",
	@"baz"]

Note: It really is “1$”, not “$1”. No idea why.
___________________________________
\ Peter Hosey / boredzo at adiumx.com
PGP public key ID: C6550423 (since 2007-01-01)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070128/539fec5e/attachment.sig>


More information about the devel mailing list