git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC v8 0/2] Gettext support for Git
@ 2010-06-05 21:12 Ævar Arnfjörð Bjarmason
  2010-06-05 21:12 ` [PATCH/RFC v8 1/2] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-06-05 21:12 UTC (permalink / raw)
  To: git; +Cc: Ævar Arnfjörð Bjarmason

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

Changes since version 7:

   Incorporated a bunch of suggestions and fixes from Jonathan Nieder
   and Jakub Narebski, thanks for those. Added some changes of my own
   too.

   * Don't compile gettext.c at all when NO_GETTEXT is defined. Just
     define a stub function in gettext.h

   * Add back support (and a new test) for the no-op N_() macro. This
     is used for marking translations for later use, e.g.:
        
        const char help[] =
        	N_("See 'git help COMMAND' for more information on a specific command.");
        
        int main(void)
        {
            puts(_(help));

   * Define NEEDS_LIBINTL depending on whether gettext is in the C
     library when running the autoconf script. Tested on Debian and
     FreeBSD.

   * Add the git_setup_gettext() initialization function to all
     $(PROGRAM_OBJS). This enables translation of git-imap-send,
     git-daemon and others that don't use git.c's main function.

   * Define git_setup_gettext as returning `extern void' instead of
     `void' as suggested by Jonathan Nieder.

   * Update is.po whose comments hadn't been updated for the t/
     directory renaming done in an earlier patch version.

   * rebase the series so that the two two patches now work
     stand-alone. Some tests meant for the second patch had crept into
     the first one during earlier rebases.

Here's the diff --stat since v7:
    
     Makefile           |    4 +++-
     config.mak.in      |    1 +
     configure.ac       |    6 ++++++
     daemon.c           |    3 +++
     fast-import.c      |    3 +++
     gettext.c          |    6 +-----
     gettext.h          |    7 ++++++-
     http-backend.c     |    3 +++
     http-fetch.c       |    3 +++
     http-push.c        |    3 +++
     imap-send.c        |    3 +++
     po/is.po           |   25 +++++++++++++------------
     shell.c            |    3 +++
     show-index.c       |    3 +++
     t/t0200-gettext.sh |    6 +++++-
     t/t0200/test.c     |    4 ++++
     upload-pack.c      |    3 +++
     17 files changed, 66 insertions(+), 20 deletions(-)
    
Ævar Arnfjörð Bjarmason (2):
  Add infrastructure for translating Git with gettext
  Add initial C, Shell and Perl gettext translations

 .gitignore                   |    2 +
 INSTALL                      |    8 ++
 Makefile                     |   69 ++++++++++++++++++-
 config.mak.in                |    2 +
 configure.ac                 |   12 +++
 daemon.c                     |    3 +
 fast-import.c                |    3 +
 gettext.c                    |   21 ++++++
 gettext.h                    |   18 +++++
 git-pull.sh                  |   16 +++--
 git-send-email.perl          |    3 +-
 git-sh-i18n.sh               |   47 +++++++++++++
 git.c                        |    3 +
 http-backend.c               |    3 +
 http-fetch.c                 |    3 +
 http-push.c                  |    3 +
 imap-send.c                  |    3 +
 perl/Git/I18N.pm             |   91 +++++++++++++++++++++++++
 perl/Makefile                |    3 +-
 perl/Makefile.PL             |   14 ++++-
 po/.gitignore                |    1 +
 po/is.po                     |   70 +++++++++++++++++++
 shell.c                      |    3 +
 show-index.c                 |    3 +
 t/t0200-gettext.sh           |  154 ++++++++++++++++++++++++++++++++++++++++++
 t/t0200/test.c               |   14 ++++
 t/t0200/test.perl            |   14 ++++
 t/t0200/test.sh              |   14 ++++
 t/t0201-gettext-fallbacks.sh |   42 +++++++++++
 t/t0202-gettext-perl.sh      |   20 ++++++
 t/t0202/test.pl              |  104 ++++++++++++++++++++++++++++
 t/test-lib.sh                |    2 +
 upload-pack.c                |    3 +
 wt-status.c                  |  107 +++++++++++++++--------------
 34 files changed, 813 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/test.c
 create mode 100644 t/t0200/test.perl
 create mode 100644 t/t0200/test.sh
 create mode 100755 t/t0201-gettext-fallbacks.sh
 create mode 100755 t/t0202-gettext-perl.sh
 create mode 100644 t/t0202/test.pl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-05 21:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-05 21:12 [PATCH/RFC v8 0/2] Gettext support for Git Ævar Arnfjörð Bjarmason
2010-06-05 21:12 ` [PATCH/RFC v8 1/2] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-06-05 21:12 ` [PATCH/RFC v8 2/2] Add initial C, Shell and Perl gettext translations Ævar Arnfjörð Bjarmason
2010-06-05 21:29 ` [PATCH/RFC v8 0/2] Gettext support for Git Jakub Narebski
2010-06-05 21:35   ` Ævar Arnfjörð Bjarmason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).