From: Bruno Haible Date: Thu, 20 Oct 2005 17:55:53 +0000 (+0000) Subject: Use MSGFMT_015 and XGETTEXT_015 when the POT file contains msgctxt. X-Git-Tag: v0.15~350 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3c43f6b79d51356aa69bcedf1251a99bb788530;p=thirdparty%2Fgettext.git Use MSGFMT_015 and XGETTEXT_015 when the POT file contains msgctxt. --- diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index 10edffb13..f23e9fc4b 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,8 @@ +2005-10-18 Bruno Haible + + * po.m4 (AM_PO_SUBDIRS): Also define MSGFMT_015, GMSGFMT_015, + XGETTEXT_015. + 2005-10-18 Bruno Haible * po.m4 (AM_PO_SUBDIRS): Remove redundant checks. diff --git a/gettext-runtime/m4/po.m4 b/gettext-runtime/m4/po.m4 index eb6f6e2c3..ac47bbc76 100644 --- a/gettext-runtime/m4/po.m4 +++ b/gettext-runtime/m4/po.m4 @@ -1,4 +1,4 @@ -# po.m4 serial 9 (gettext-0.15) +# po.m4 serial 10 (gettext-0.15) dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -39,6 +39,22 @@ AC_DEFUN([AM_PO_SUBDIRS], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. @@ -49,6 +65,15 @@ AC_DEFUN([AM_PO_SUBDIRS], dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) diff --git a/gettext-runtime/po/ChangeLog b/gettext-runtime/po/ChangeLog index 834683f00..5366bba89 100644 --- a/gettext-runtime/po/ChangeLog +++ b/gettext-runtime/po/ChangeLog @@ -1,3 +1,9 @@ +2005-10-18 Bruno Haible + + * Makevars (USE_MSGCTXT): New macro. + * Makefile.in.in (GMSGFMT, MSGFMT, XGETTEXT): Define according to the + value of $(USE_MSGCTXT). + 2005-07-26 Bruno Haible * Makefile.in.in (datarootdir): New variable. diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 77330edfb..f22cf9043 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -33,9 +33,18 @@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ +GMSGFMT_ = @GMSGFMT@ +GMSGFMT_no = @GMSGFMT@ +GMSGFMT_yes = @GMSGFMT_015@ +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) +MSGFMT_ = @MSGFMT@ +MSGFMT_no = @MSGFMT@ +MSGFMT_yes = @MSGFMT_015@ +MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) +XGETTEXT_ = @XGETTEXT@ +XGETTEXT_no = @XGETTEXT@ +XGETTEXT_yes = @XGETTEXT_015@ +XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit diff --git a/gettext-runtime/po/Makevars b/gettext-runtime/po/Makevars index 7b66638bf..6fa6b94f2 100644 --- a/gettext-runtime/po/Makevars +++ b/gettext-runtime/po/Makevars @@ -42,3 +42,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/examples/ChangeLog b/gettext-tools/examples/ChangeLog index 7b14cbd11..5409e4a58 100644 --- a/gettext-tools/examples/ChangeLog +++ b/gettext-tools/examples/ChangeLog @@ -1,3 +1,13 @@ +2005-10-18 Bruno Haible + + * hello-c/po/Makevars (USE_MSGCTXT): New macro. + * hello-c-gnome/po/Makevars (USE_MSGCTXT): New macro. + * hello-c++/po/Makevars (USE_MSGCTXT): New macro. + * hello-c++-gnome/po/Makevars (USE_MSGCTXT): New macro. + * hello-c++-kde/po/Makevars (USE_MSGCTXT): New macro. + * hello-objc/po/Makevars (USE_MSGCTXT): New macro. + * hello-objc-gnome/po/Makevars (USE_MSGCTXT): New macro. + 2005-09-19 Bruno Haible * hello-*/autogen.sh: Also install m4/progtest.m4. diff --git a/gettext-tools/examples/hello-c++-gnome/po/Makevars b/gettext-tools/examples/hello-c++-gnome/po/Makevars index e20fc8caa..9cdeb3acd 100644 --- a/gettext-tools/examples/hello-c++-gnome/po/Makevars +++ b/gettext-tools/examples/hello-c++-gnome/po/Makevars @@ -53,3 +53,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/examples/hello-c++-kde/po/Makevars b/gettext-tools/examples/hello-c++-kde/po/Makevars index adcf4e7c4..5cbe58c50 100644 --- a/gettext-tools/examples/hello-c++-kde/po/Makevars +++ b/gettext-tools/examples/hello-c++-kde/po/Makevars @@ -49,3 +49,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/examples/hello-c++/po/Makevars b/gettext-tools/examples/hello-c++/po/Makevars index 7c3b897a8..9a63ebf56 100644 --- a/gettext-tools/examples/hello-c++/po/Makevars +++ b/gettext-tools/examples/hello-c++/po/Makevars @@ -42,3 +42,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/examples/hello-c-gnome/po/Makevars b/gettext-tools/examples/hello-c-gnome/po/Makevars index e20fc8caa..9cdeb3acd 100644 --- a/gettext-tools/examples/hello-c-gnome/po/Makevars +++ b/gettext-tools/examples/hello-c-gnome/po/Makevars @@ -53,3 +53,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/examples/hello-c/po/Makevars b/gettext-tools/examples/hello-c/po/Makevars index 03bfa22f1..3f34e1739 100644 --- a/gettext-tools/examples/hello-c/po/Makevars +++ b/gettext-tools/examples/hello-c/po/Makevars @@ -41,3 +41,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/examples/hello-objc-gnome/po/Makevars b/gettext-tools/examples/hello-objc-gnome/po/Makevars index e20fc8caa..9cdeb3acd 100644 --- a/gettext-tools/examples/hello-objc-gnome/po/Makevars +++ b/gettext-tools/examples/hello-objc-gnome/po/Makevars @@ -53,3 +53,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/examples/hello-objc/po/Makevars b/gettext-tools/examples/hello-objc/po/Makevars index 03bfa22f1..3f34e1739 100644 --- a/gettext-tools/examples/hello-objc/po/Makevars +++ b/gettext-tools/examples/hello-objc/po/Makevars @@ -41,3 +41,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no diff --git a/gettext-tools/po/ChangeLog b/gettext-tools/po/ChangeLog index dba3c7e4f..9e77d56ba 100644 --- a/gettext-tools/po/ChangeLog +++ b/gettext-tools/po/ChangeLog @@ -1,3 +1,9 @@ +2005-10-18 Bruno Haible + + * Makevars (USE_MSGCTXT): New macro. + * Makefile.in.in (GMSGFMT, MSGFMT, XGETTEXT): Define according to the + value of $(USE_MSGCTXT). + 2005-07-26 Bruno Haible * Makefile.in.in (datarootdir): New variable. diff --git a/gettext-tools/po/Makefile.in.in b/gettext-tools/po/Makefile.in.in index 77330edfb..f22cf9043 100644 --- a/gettext-tools/po/Makefile.in.in +++ b/gettext-tools/po/Makefile.in.in @@ -33,9 +33,18 @@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ +GMSGFMT_ = @GMSGFMT@ +GMSGFMT_no = @GMSGFMT@ +GMSGFMT_yes = @GMSGFMT_015@ +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) +MSGFMT_ = @MSGFMT@ +MSGFMT_no = @MSGFMT@ +MSGFMT_yes = @MSGFMT_015@ +MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) +XGETTEXT_ = @XGETTEXT@ +XGETTEXT_no = @XGETTEXT@ +XGETTEXT_yes = @XGETTEXT_015@ +XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit diff --git a/gettext-tools/po/Makevars b/gettext-tools/po/Makevars index 9ab201f9c..71d710115 100644 --- a/gettext-tools/po/Makevars +++ b/gettext-tools/po/Makevars @@ -46,3 +46,9 @@ MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no