From: Keshav Kini <keshav.kini@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] i18n: move the trailing space out of translatable strings
Date: Sat, 07 Dec 2013 21:56:30 -0600 [thread overview]
Message-ID: <87vbz0f11t.fsf@gmail.com> (raw)
In-Reply-To: <CACsJy8CBC3qk7NQPR3UWhUdA+o+hXPLPXV+8fz4ctCSV1J2hcA@mail.gmail.com> (Duy Nguyen's message of "Sun, 8 Dec 2013 09:15:25 +0700")
The following message is a courtesy copy of an article
that has been posted to gmane.comp.version-control.git as well.
Duy Nguyen <pclouds@gmail.com> writes:
> On Sun, Dec 8, 2013 at 9:11 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
>> I could fix vi.po alone, but it'd be better to avoid similar mistakes
>> for all translations by moving the trailing space out of all
>> translatable strings (*). This is inline with how we handle newlines
>> (e.g. *printf_ln wrappers) but it's not widespread enough to make new
>> *printf_space wrappers.
>
> And I just realized spaces are more common in languages using latin
> alphabet but are not a rule. CJK languages do not have/need spaces so
> this might be a wrong move..
There are already other issues as well. The strings also seem to be
assuming certain word orders. For example:
> - on_what = _("HEAD detached at ");
> + on_what = _("HEAD detached at");
Both versions of this assume that the location at which HEAD was
detached should come at the end of the sentence, whereas in
rightward-headed languages such as Japanese it would be more natural to
put the location at the middle or beginning of the sentence (while it is
possible to rewrite the text a bit to force the location to come at the
end).
I think the best practice is to just have one long string per "message"
the program is supposed to display, and only display that string with %s
substituted for data, rather than printing that string and then printing
the data, or printing the data and then printing the string, or
whatever. With printf() in C, the %s can even be reordered wrt to the
calling order with a special syntax, "%m$", if necessary, as I just
learned from `man 3 printf`...
-Keshav
next prev parent reply other threads:[~2013-12-08 3:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-08 2:11 [PATCH] i18n: move the trailing space out of translatable strings Nguyễn Thái Ngọc Duy
2013-12-08 2:15 ` Duy Nguyen
2013-12-08 3:56 ` Keshav Kini [this message]
2013-12-09 19:46 ` 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=87vbz0f11t.fsf@gmail.com \
--to=keshav.kini@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.