m4-patches
[Top][All Lists]
Advanced

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

Re: new module 'propername'


From: Eric Blake
Subject: Re: new module 'propername'
Date: Mon, 19 May 2008 06:27:11 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 5/18/2008 7:38 AM:
| This module was already presented in
|   http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00055.html
|
| After fixing this issues mentioned by Ben Pfaff and Paul Eggert, I'm
moving it
| from GNU gettext into gnulib. I'll also update the GNU gettext
documentation to
| refer to it.

I'm trying to use it in m4, but am failing to see the desired changes to
the m4.pot file after rerunning xgettext with the modified
XGETTEXT_OPTIONS.  It seems like xgettext doesn't understand coreutils'
and m4's usage pattern:

#include "propername.h"

#define AUTHORS                                                 \
~  proper_name_utf8 ("Rene' Seindal", "Ren\xc3\xa9 Seindal"),       \
~  proper_name ("Gary V. Vaughan"),                           \
~  proper_name ("Eric Blake")

...
~  version_etc (stdout, PACKAGE, PACKAGE_NAME, VERSION, AUTHORS, NULL);


$ xgettext --version | head -n1
xgettext (GNU gettext-tools) 0.16.1

But even though the .pot file isn't changing, the use of proper_name is
doing something useful:

pre-patch:
$ m4 --version | grep Written
Written by Rene' Seindal, Gary V. Vaughan, and Eric Blake.

post-patch:
$ m4 --version | grep Written
Written by René Seindal, Gary V. Vaughan, and Eric Blake.

Any hints?

At any rate, I've committed this to the m4 master branch, if it helps you
look into the matter.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgxch8ACgkQ84KuGfSFAYDsRQCgjs2aqvtI/b5tSGl7iXsCQoVi
EDEAnAsAnsvuil/MXnGXFuZTZUWOqmNA
=3lh/
-----END PGP SIGNATURE-----
From 19c823f477a093cf19c9d79886e73eb0c0e2edd4 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 19 May 2008 06:19:07 -0600
Subject: [PATCH] 
=?utf-8?q?Fix=20spelling=20of=20Ren=C3=A9=20Seindal's=20name=20in=20--version=20output.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

* ltdl/m4/gnulib-cache.m4: Import propername module.
* src/main.c (AUTHORS): Rewrite in terms of proper_name.
* po/Makevars (XGETTEXT_OPTIONS): Detect new functions.
* HACKING: Mention new prerequisite of gperf.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog               |    8 ++++++++
 HACKING                 |    1 +
 ltdl/m4/gnulib-cache.m4 |    4 ++--
 po/Makevars             |    2 ++
 src/main.c              |    6 +++++-
 5 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1210238..75b6cef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-19  Eric Blake  <address@hidden>
+
+       Fix spelling of René Seindal's name in --version output.
+       * ltdl/m4/gnulib-cache.m4: Import propername module.
+       * src/main.c (AUTHORS): Rewrite in terms of proper_name.
+       * po/Makevars (XGETTEXT_OPTIONS): Detect new functions.
+       * HACKING: Mention new prerequisite of gperf.
+
 2008-05-18  Eric Blake  <address@hidden>
 
        Allow freezing the trace status of macros.
diff --git a/HACKING b/HACKING
index 19b5de9..2bf2f6a 100644
--- a/HACKING
+++ b/HACKING
@@ -68,6 +68,7 @@ and is not part of a release distribution.
   - Automake 1.10.1 or later
   - Libtool 2.2 or later
   - Gettext 0.16 or later
+  - Gperf 3.0 or later
   - Help2man 1.29 or later
   - LZMA Utils 4.32 or later (from <http://tukaani.org/lzma/>)
   - Texinfo 4.8 or later
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index 0e122ac..7350e21 100644
--- a/ltdl/m4/gnulib-cache.m4
+++ b/ltdl/m4/gnulib-cache.m4
@@ -15,11 +15,11 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --aux-dir=build-aux 
--with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset 
binary-io clean-temp cloexec close-stream closein config-h configmake dirname 
error exit fdl fflush filenamecat flexmember fopen-safer fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack 
progname quote regex regexprops-generic sprintf-posix stdbool stdlib-safer 
strnlen strtod strtol tempname unlocked-io vasnprintf-posix verror xalloc 
xalloc-die xprintf-posix xstrndup xvasprintf-posix
+#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --aux-dir=build-aux 
--with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset 
binary-io clean-temp cloexec close-stream closein config-h configmake dirname 
error exit fdl fflush filenamecat flexmember fopen-safer fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack 
progname propername quote regex regexprops-generic sprintf-posix stdbool 
stdlib-safer strnlen strtod strtol tempname unlocked-io vasnprintf-posix verror 
xalloc xalloc-die xprintf-posix xstrndup xvasprintf-posix
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
-gl_MODULES([assert autobuild avltree-oset binary-io clean-temp cloexec 
close-stream closein config-h configmake dirname error exit fdl fflush 
filenamecat flexmember fopen-safer fseeko gendocs gettext git-version-gen 
gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack progname quote 
regex regexprops-generic sprintf-posix stdbool stdlib-safer strnlen strtod 
strtol tempname unlocked-io vasnprintf-posix verror xalloc xalloc-die 
xprintf-posix xstrndup xvasprintf-posix])
+gl_MODULES([assert autobuild avltree-oset binary-io clean-temp cloexec 
close-stream closein config-h configmake dirname error exit fdl fflush 
filenamecat flexmember fopen-safer fseeko gendocs gettext git-version-gen 
gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack progname 
propername quote regex regexprops-generic sprintf-posix stdbool stdlib-safer 
strnlen strtod strtol tempname unlocked-io vasnprintf-posix verror xalloc 
xalloc-die xprintf-posix xstrndup xvasprintf-posix])
 gl_AVOID([])
 gl_SOURCE_BASE([gnu])
 gl_M4_BASE([ltdl/m4])
diff --git a/po/Makevars b/po/Makevars
index d952fe8..74f3bac 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -31,6 +31,8 @@ XGETTEXT_OPTIONS = \
   --from-code=UTF-8 \
   --keyword=_ --flag=_:1:pass-c-format \
   --keyword=N_ --flag=N_:1:pass-c-format \
+  --keyword=proper_name:1,"This is a proper name. See the gettext manual, 
section Names." \
+  --keyword=proper_name_utf8:1,"This is a proper name. See the gettext manual, 
section Names." \
   --flag=error:3:c-format --flag=error_at_line:5:c-format \
   --flag=verror:3:c-format --flag=verror_at_line:5:c-format \
   --flag=asprintf:2:c-format --flag=vasprintf:2:c-format \
diff --git a/src/main.c b/src/main.c
index e500046..7690147 100644
--- a/src/main.c
+++ b/src/main.c
@@ -29,11 +29,15 @@
 #include "closein.h"
 #include "configmake.h"
 #include "getopt.h"
+#include "propername.h"
 #include "quotearg.h"
 #include "version-etc.h"
 #include "xstrtol.h"
 
-#define AUTHORS _("Rene' Seindal"), "Gary V. Vaughan", "Eric Blake"
+#define AUTHORS                                                        \
+  proper_name_utf8 ("Rene' Seindal", "Ren\xc3\xa9 Seindal"),   \
+  proper_name ("Gary V. Vaughan"),                             \
+  proper_name ("Eric Blake")
 
 typedef struct deferred
 {
-- 
1.5.5.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]