From: Brett Schwarz <brett_schwarz@yahoo.com>
To: Christian Stimming <Christian.Stimming@ibeo-as.com>,
Junio C Hamano <gitster@pobox.com>
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
Subject: Re: git-gui: i18n introductory document (2nd draft)
Date: Fri, 27 Jul 2007 10:58:27 -0700 (PDT) [thread overview]
Message-ID: <940142.14871.qm@web38911.mail.mud.yahoo.com> (raw)
> ----- Original Message ----
> From: Christian Stimming <Christian.Stimming@ibeo-as.com>
> To: Junio C Hamano <gitster@pobox.com>
> 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
> Sent: Friday, July 27, 2007 8:21:58 AM
> Subject: Re: git-gui: i18n introductory document (2nd draft)
>
> Junio C Hamano <gitster@pobox.com> schrieb am 27.07.2007 01:31:06:
> > I have tried to address issues raised in Christian's comments on
> > the first draft that was circulated privately.
>
<snip>
>
> > + - Often the messages being translated are format strings given to
> > + "printf()"-like functions. Make sure "%s", "%d", and "%%" in your
> > + translated messages match the original.
> > +
> > + When you have to change the order of words, you can add "<number>$"
> > + between '%' and the conversion ('s', 'd', etc.) to say "<number>-th
> > + parameter to the format string is used at this point". For example,
> > + if the original message is like this:
> > +
> > + "Length is %d, Weight is %d"
> > +
> > + and if for whatever reason your translation needs to say weight first
> > + and then length, you can say something like:
> > +
> > + "WEIGHT IS %2$d, LENGTH IS %1$d"
Since we are using quotes for the strings, and Tcl will do a round of substitutions
and will think those $d's are variables, you might want to change that to:
"WEIGHT IS %2\$d, LENGTH IS %1\$d"
You also may want to add a note about why the backslash
> > +
> > + [NEEDSWORK: this whole "parameter permutation" part needs to be
> > + verified if it works with Tcl at all]
>
bschwarz@desk1:~$ tclsh
% package require msgcat
1.3.4
% namespace import ::msgcat::*
% mcset en_us_brett "L is %d, W is %d" "WEIGHT IS %2\$d, LENGTH IS %1\$d"
WEIGHT IS %2$d, LENGTH IS %1$d
% mcset en_us "L is %d, W is %d" "Length is %d, Weight is %d"
Length is %d, Weight is %d
% mclocale en_us
en_us
% set length 74
74
% set weight 220
220
% mc "L is %d, W is %d" $length $weight
Length is 74, Weight is 220
% mclocale en_us_brett
en_us_brett
% mc "L is %d, W is %d" $length $weight
WEIGHT IS 220, LENGTH IS 74
%
Seems to work...
Regards,
--brett
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
next reply other threads:[~2007-07-27 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 17:58 Brett Schwarz [this message]
[not found] <7vir87adzo.fsf@assigned-by-dhcp.cox.net>
2007-07-26 23:31 ` git-gui: i18n introductory document (2nd draft) Junio C Hamano
2007-07-27 8:02 ` しらいしななこ
2007-07-27 11:13 ` VMiklos
2007-07-27 15:21 ` Christian Stimming
2007-07-27 23:18 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=940142.14871.qm@web38911.mail.mud.yahoo.com \
--to=brett_schwarz@yahoo.com \
--cc=Christian.Stimming@ibeo-as.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=irina.riesen@gmail.com \
--cc=johannes.schindelin@gmx.de \
--cc=nanako3@bluebottle.com \
--cc=paolo.ciarrocchi@gmail.com \
--cc=spearce@spearce.org \
--cc=stimming@tuhh.de \
--cc=xudong.guan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox