{"thread":{"id":"9261","subject":"Re: git-gui: i18n introductory document (2nd draft)","startedAt":"2007-07-27T17:58:27Z","lastAt":"2007-07-27T17:58:27Z","messageCount":1,"participants":["Brett Schwarz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48808","messageId":"940142.14871.qm@web38911.mail.mud.yahoo.com","threadId":"9261","inReplyTo":null,"subject":"Re: git-gui: i18n introductory document (2nd draft)","fromName":"Brett Schwarz","fromEmail":"brett_schwarz@yahoo.com","sentAt":"2007-07-27T17:58:27Z","receivedAt":"2007-07-27T17:58:27Z","isPatch":false,"sender":{"key":"brett_schwarz@yahoo.com","avatar":null},"body":"> ----- Original Message ----\n> From: Christian Stimming <Christian.Stimming@ibeo-as.com>\n> To: Junio C Hamano <gitster@pobox.com>\n> Cc: git@vger.kernel.org; Irina Riesen <irina.riesen@gmail.com>; Johannes Schindelin <johannes.schindelin@gmx.de>; Nanako Shiraishi <nanako3@bluebottle.com>; Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>; Shawn O. Pearce <spearce@spearce.org>; Xudong Guan <xudong.guan@gmail.com>; stimming@tuhh.de\n> Sent: Friday, July 27, 2007 8:21:58 AM\n> Subject: Re: git-gui: i18n introductory document (2nd draft)\n>\n> Junio C Hamano <gitster@pobox.com> schrieb am 27.07.2007 01:31:06:\n> > I have tried to address issues raised in Christian's comments on\n> > the first draft that was circulated privately.\n>\n\n<snip>\n\n>\n> > + - Often the messages being translated are format strings given to\n> > +   \"printf()\"-like functions.  Make sure \"%s\", \"%d\", and \"%%\" in your\n> > +   translated messages match the original.\n> > +\n> > +   When you have to change the order of words, you can add \"<number>$\"\n> > +   between '%' and the conversion ('s', 'd', etc.) to say \"<number>-th\n> > +   parameter to the format string is used at this point\".  For example,\n> > +   if the original message is like this:\n> > +\n> > +   \"Length is %d, Weight is %d\"\n> > +\n> > +   and if for whatever reason your translation needs to say weight first\n> > +   and then length, you can say something like:\n\n> > +\n> > +   \"WEIGHT IS %2$d, LENGTH IS %1$d\"\n\nSince we are using quotes for the strings, and Tcl will do a round of substitutions\n and will think those $d's are variables, you might want to change that to:\n\n        \"WEIGHT IS %2\\$d, LENGTH IS %1\\$d\"\n\nYou also may want to add a note about why the backslash\n\n> > +\n> > +   [NEEDSWORK: this whole \"parameter permutation\" part needs to be\n> > +   verified if it works with Tcl at all]\n>\n\nbschwarz@desk1:~$ tclsh\n% package require msgcat\n1.3.4\n% namespace import ::msgcat::*\n% mcset en_us_brett \"L is %d, W is %d\" \"WEIGHT IS %2\\$d, LENGTH IS %1\\$d\" \nWEIGHT IS %2$d, LENGTH IS %1$d\n% mcset en_us \"L is %d, W is %d\" \"Length is %d, Weight is %d\"\nLength is %d, Weight is %d\n% mclocale en_us\nen_us\n% set length 74\n74\n% set weight 220\n220\n% mc \"L is %d, W is %d\" $length $weight\nLength is 74, Weight is 220\n% mclocale en_us_brett\nen_us_brett\n% mc \"L is %d, W is %d\" $length $weight\nWEIGHT IS 220, LENGTH IS 74\n% \n\nSeems to work...\n\nRegards,\n     --brett\n\n\n\n\n       \n____________________________________________________________________________________\nGet the free Yahoo! toolbar and rest assured with the added security of spyware protection.\nhttp://new.toolbar.yahoo.com/toolbar/features/norton/index.php\n"}]}