[PATCH/RFC v5 0/2] Add infrastructure for translating Git with gettext

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is version 5 of the patch series to make Git optionally
translatable with GNU gettext.

I split and squashed the whole thing down into just two patches. The
first commit adds all the needed core infrastructure, and the second
commit contains an initial stab at starting translation for the core
tools, along with some tests that could be added as a result.

The changes this time around are:

  * Testing testing & more testing. Including testing for xgettext
    message extraction, that .po files are generated correctly etc.

  * There's now a git-sh-i18n library for the shell, so gettext.sh
    isn't loaded as part of git-sh-setup.

  * Shell portability fixes suggested by Johannes Sixt

  * Other misc suggestions and fixes Jakub Narebski, Peter Krefting,
    and Jonathan Nieder pointed out were incorporated.

  * I did not change over to Locale::TextDomain for Perl. I wrote a
    version of Git::I18N in it and found that it was more trouble than
    it was worth

I think (this time around, really) that this series is ready for
inclusion unless some issue is raised that I've missed. But to play
devil's advocate this is what might prevent it from being included.

  * gettext is on by default. I think that's a feature, but Git won't
    build by default on e.g. Solaris unless the packager adds
    NO_GETTEXT=YesPlease to the make arguments. Of course if they use
    ./configure it'll detect if libintl.h exists and act
    appropriately.

    I think gettext on by default is a feature, it's equivalent to
    what we do for our other /*/po/ stuff. But pending discussion of
    this I haven't updated e.g. INSTALL. Comments welcome.

  * There isn't documentation on how to use this from a developer and
    maintainer standpoint. And there's no docs for translators.

    Where would the developer/maintainer docs belong? But for most of
    the things such a documentation would include I think other
    existing resources would do fine, e.g. the GNU gettext manual.

Ævar Arnfjörð Bjarmason (2):
  Add infrastructure for translating Git with gettext
  Add initial C, Shell and Perl gettext translations

 .gitignore                         |    2 +
 Makefile                           |   44 ++++++++++-
 config.mak.in                      |    1 +
 configure.ac                       |    6 ++
 gettext.c                          |   25 ++++++
 gettext.h                          |   13 +++
 git-pull.sh                        |   16 ++--
 git-send-email.perl                |    3 +-
 git-sh-i18n.sh                     |   33 ++++++++
 git.c                              |    3 +
 perl/Git/I18N.pm                   |   77 +++++++++++++++++++
 perl/Makefile                      |    3 +-
 perl/Makefile.PL                   |   14 +++-
 po/.gitignore                      |    1 +
 po/is.po                           |   71 +++++++++++++++++
 t/t0200-gettext.sh                 |  146 ++++++++++++++++++++++++++++++++++++
 t/t0200-gettext/test.c             |   10 +++
 t/t0200-gettext/test.perl          |   11 +++
 t/t0200-gettext/test.sh            |   14 ++++
 t/t0201-gettext-shell-fallbacks.sh |   40 ++++++++++
 t/test-lib.sh                      |    1 +
 wt-status.c                        |  107 +++++++++++++-------------
 22 files changed, 576 insertions(+), 65 deletions(-)
 create mode 100644 gettext.c
 create mode 100644 gettext.h
 create mode 100644 git-sh-i18n.sh
 create mode 100644 perl/Git/I18N.pm
 create mode 100644 po/.gitignore
 create mode 100644 po/is.po
 create mode 100755 t/t0200-gettext.sh
 create mode 100644 t/t0200-gettext/test.c
 create mode 100644 t/t0200-gettext/test.perl
 create mode 100644 t/t0200-gettext/test.sh
 create mode 100755 t/t0201-gettext-shell-fallbacks.sh

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]