From: Jakub Narebski <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] i18n: add infrastructure for translating Git with gettext
Date: Fri, 11 Nov 2011 02:27:21 -0800 (PST) [thread overview]
Message-ID: <m31utfnedi.fsf@localhost.localdomain> (raw)
In-Reply-To: <1320970164-31694-2-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> = Perl
>
> Perl code that wants to be localized should use the new Git::I18n
> module. It imports a __ function into the caller's package by
> default.
>
> Instead of using the high level Locale::TextDomain interface I've
> opted to use the low-level (equivalent to the C interface)
> Locale::Messages module, which Locale::TextDomain itself uses.
Nice of you using libintl-perl instead of old Locale::MakeText
(with gettext compatibility layer).
> See <AANLkTilYD_NyIZMyj9dHtVk-ylVBfvyxpCC7982LWnVd@mail.gmail.com> for
> a further elaboration on this topic.
http://thread.gmane.org/gmane.comp.version-control.git/148446/focus=148478
> = Shell
>
> Shell code that's to be localized should use the git-sh-i18n
> library. It's basically just a wrapper for the system's gettext.sh.
>
> If gettext.sh isn't available we'll fall back on gettext(1) if it's
> available. The latter is available without the former on Solaris,
> which has its own non-GNU gettext implementation. We also need to
> emulate eval_gettext() there.
>
> If neither are present we'll use a dumb printf(1) fall-through
> wrapper.
>
> I originally tried to detect if the system supported `echo -n' but
> I found this to be a waste of time. My benchmarks on Linux, Solaris
> and FreeBSD reveal that printf(1) is fast enough, especially since
> we aren't calling gettext() from within any tight loops, and
> unlikely to ever do so.
Didn't we decide that the only sane way to handle eval_gettext
is to provide minimal implemetation in the form of external command?
Thanks for working on this.
--
Jakub Narębski
next prev parent reply other threads:[~2011-11-11 10:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 0:09 [RFC/PATCH] i18n back from the dead Ævar Arnfjörð Bjarmason
2011-11-11 0:09 ` [RFC/PATCH] i18n: add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2011-11-11 10:27 ` Jakub Narebski [this message]
2011-11-11 10:34 ` Ævar Arnfjörð Bjarmason
2011-11-17 23:17 ` Junio C Hamano
2011-11-18 12:29 ` Ævar Arnfjörð Bjarmason
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=m31utfnedi.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/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.