summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-05-19 16:14:13 +0200
committerJim Meyering <meyering@redhat.com>2008-05-26 08:37:08 +0200
commit7855cbfcac867621c18d1fc85abe5332f6aae1ec (patch)
tree26eb36b6769761b261ea8c7419c5ce4cea9d5a60
parent29290d04856214345f966ccd8016aa0aaf758662 (diff)
downloadcoreutils-7855cbfcac867621c18d1fc85abe5332f6aae1ec.tar.xz
use gnulib's proper_name_utf8 function, but *not* proper_name
* bootstrap.conf (gnulib_modules): Add propername. (XGETTEXT_OPTIONS): Add options to tell xgettext about the functions. * src/cat.c, src/cp.c, src/df.c, src/du.c, src/split.c: Mark Torbjörn Granlund's name. * src/ptx.c: Mark François Pinard's name. Use "TRANSLATORS:" comment marker, rather than "Note to translators:". * src/system.h: Include propername.h. (proper_name): Define away. * src/Makefile.am (cat_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD): Initialize, so we can... (cat_LDADD, cp_LDADD, df_LDADD, du_LDADD, ptx_LDADD, split_LDADD): ...Use "+=" to append $(LIBICONV) for each program that uses proper_name_utf8.
-rw-r--r--bootstrap.conf14
-rw-r--r--src/Makefile.am14
-rw-r--r--src/cat.c6
-rw-r--r--src/cp.c4
-rw-r--r--src/df.c5
-rw-r--r--src/du.c3
-rw-r--r--src/ptx.c8
-rw-r--r--src/split.c4
-rw-r--r--src/system.h7
9 files changed, 53 insertions, 12 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index f74f7596b..7b5be8386 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -67,7 +67,11 @@ gnulib_modules="
memrchr mgetgroups
mkancesdirs mkdir mkdir-p mkstemp mktime modechange
mountlist mpsort obstack pathmax perl physmem
- posix-shell posixtm posixver putenv
+ posix-shell
+ posixtm
+ posixver
+ propername
+ putenv
quote quotearg raise readlink areadlink-with-size
randint
randperm
@@ -118,6 +122,14 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
--flag=xprintf:1:c-format\\\
'
+# Append these, since we use the propername module.
+see_manual='"This is a proper name. See the gettext manual, section Names."'
+see_manual=\'"$see_manual"\'
+XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
+ --keyword=proper_name:1,'"$see_manual"'\\\
+ --keyword=proper_name_utf8:1,'"$see_manual"'\\\
+'
+
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
# appears in configure.ac, exclude some unnecessary files.
# Without grep's -E option (not portable enough, pre-configure),
diff --git a/src/Makefile.am b/src/Makefile.am
index 668e1786e..8d1cfcfd3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,6 +75,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib
# replacement functions defined in libcoreutils.a.
LDADD = ../lib/libcoreutils.a $(LIBINTL) ../lib/libcoreutils.a
+cat_LDADD = $(LDADD)
+df_LDADD = $(LDADD)
+du_LDADD = $(LDADD)
+ptx_LDADD = $(LDADD)
+split_LDADD = $(LDADD)
+
# for eaccess in lib/euidaccess.c.
chcon_LDADD = $(LDADD) $(LIB_SELINUX)
cp_LDADD = $(LDADD) $(LIB_EACCESS) $(LIB_SELINUX)
@@ -137,6 +143,14 @@ ginstall_LDADD += $(LIB_ACL)
stat_LDADD = $(LDADD) $(LIB_SELINUX)
+# Append $(LIBICONV) to each program that uses proper_name_utf8.
+cat_LDADD += $(LIBICONV)
+cp_LDADD += $(LIBICONV)
+df_LDADD += $(LIBICONV)
+du_LDADD += $(LIBICONV)
+ptx_LDADD += $(LIBICONV)
+split_LDADD += $(LIBICONV)
+
$(PROGRAMS): ../lib/libcoreutils.a
# Get the release year from ../lib/version-etc.c.
diff --git a/src/cat.c b/src/cat.c
index d12144590..b0bed2868 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -1,5 +1,5 @@
/* cat -- concatenate files and print on the standard output.
- Copyright (C) 88, 90, 91, 1995-2007 Free Software Foundation, Inc.
+ Copyright (C) 88, 90, 91, 1995-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,7 +43,9 @@
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "cat"
-#define AUTHORS "Torbjorn Granlund", "Richard M. Stallman"
+#define AUTHORS \
+ proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
+ "Richard M. Stallman"
/* Undefine, to avoid warning about redefinition on some systems. */
#undef max
diff --git a/src/cp.c b/src/cp.c
index 3f9587139..ee5379a0e 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -52,7 +52,9 @@
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "cp"
-#define AUTHORS "Torbjorn Granlund", "David MacKenzie", "Jim Meyering"
+#define AUTHORS \
+ proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
+ "David MacKenzie", "Jim Meyering"
/* Used by do_copy, make_dir_parents_private, and re_protect
to keep a list of leading directories whose protections
diff --git a/src/df.c b/src/df.c
index f0fdcd70c..e8162f658 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1,5 +1,5 @@
/* df - summarize free disk space
- Copyright (C) 91, 1995-2007 Free Software Foundation, Inc.
+ Copyright (C) 91, 1995-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,8 @@
#define PROGRAM_NAME "df"
#define AUTHORS \
- "Torbjorn Granlund", "David MacKenzie", "Paul Eggert"
+ proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
+ "David MacKenzie", "Paul Eggert"
/* Name this program was run with. */
char *program_name;
diff --git a/src/du.c b/src/du.c
index 55aa1fefc..1c4a7361c 100644
--- a/src/du.c
+++ b/src/du.c
@@ -50,7 +50,8 @@ extern bool fts_debug;
#define PROGRAM_NAME "du"
#define AUTHORS \
- "Torbjorn Granlund", "David MacKenzie, Paul Eggert", "Jim Meyering"
+ proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
+ "David MacKenzie, Paul Eggert", "Jim Meyering"
#if DU_DEBUG
# define FTS_CROSS_CHECK(Fts) fts_cross_check (Fts)
diff --git a/src/ptx.c b/src/ptx.c
index 8f7ae95a4..174b3478b 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -34,10 +34,10 @@
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "ptx"
-/* Note to translator: Please translate "F. Pinard" to "François
- Pinard" if "ç" (c-with-cedilla) is available in the
- translation's character set and encoding. */
-#define AUTHORS _("F. Pinard")
+/* TRANSLATORS: Please translate "F. Pinard" to "François Pinard"
+ if "ç" (c-with-cedilla) is available in the translation's character
+ set and encoding. */
+#define AUTHORS proper_name_utf8 ("F. Pinard", "Fran\xc3\xa7ois Pinard")
/* Number of possible characters in a byte. */
#define CHAR_SET_SIZE 256
diff --git a/src/split.c b/src/split.c
index f84d40e41..d78b506e4 100644
--- a/src/split.c
+++ b/src/split.c
@@ -40,7 +40,9 @@
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "split"
-#define AUTHORS "Torbjorn Granlund", "Richard M. Stallman"
+#define AUTHORS \
+ proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund"), \
+ "Richard M. Stallman"
#define DEFAULT_SUFFIX_LENGTH 2
diff --git a/src/system.h b/src/system.h
index b640c01df..f7c689f8e 100644
--- a/src/system.h
+++ b/src/system.h
@@ -454,6 +454,13 @@ enum
#include "closein.h"
#include "closeout.h"
#include "version-etc.h"
+#include "propername.h"
+/* Define away proper_name (leaving proper_name_utf8, which affects far
+ fewer programs), since it's not worth the cost of adding ~17KB to
+ the x86_64 text size of every single program. This avoids a 40%
+ (almost ~2MB) increase in the on-disk space utilization for the set
+ of the 100 binaries. */
+#define proper_name(x) (x)
#define case_GETOPT_VERSION_CHAR(Program_name, Authors) \
case GETOPT_VERSION_CHAR: \