Re: [PATCH] Fix translation of strings in foreach lists.
- From
Christian Stimming <stimming@tuhh.de>
- Date
- Jul 24, 2007, 15:20 UTC
- Message-ID
- <20070724172028.mdfuj6fpeokw0800@webmail.tu-harburg.de>
- In-Reply-To
- <20070724150136.GM32566@spearce.org>
Quoting "Shawn O. Pearce" <spearce@spearce.org>:
Show 9 quoted lines
>> >I not sure if it's worth changing, but you don't necessarily need >> >those [append]'s in there. >> >> Thanks for the info. It is basically up to Shawn to decide which style >> he likes more. > > "[mc Foo]\n\n$err" > > is much shorter. So I'd prefer that over [append [mc Foo] "\n\n$err"].
Err, but the usual case is that the argument to [mc] is more than one word, and (additionally) that argument has to be quoted by double-quotes (as opposed to braces) because otherwise xgettext doesn't extract the message correctly. Hence, the only possibility here were
"[mc "Some Text"]\n\n$err"
Is this valid Tcl? Being a newcomer to this language I have to says the quotes here look rather strange :-)
> Its not like you've saved a dq-eval either, as you still have to do one > for the \n\n. But either way is valid Tcl, and works, and the append > version is not so bad that I'd reject a patch that used it.
Ok, thanks.
Christian