summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-03-11 16:15:20 +0000
committerBruno Haible <bruno@clisp.org>2001-03-11 16:15:20 +0000
commite0d46c88d40eaf9d61209de1e0f0d47d75bf7029 (patch)
tree8ba5995df08c8cca884b63eec166894e73bd9e78
parent23f4da6ffcadfa9b0afe2ca0635150d1f4bcc65a (diff)
downloadexternal_gettext-e0d46c88d40eaf9d61209de1e0f0d47d75bf7029.zip
external_gettext-e0d46c88d40eaf9d61209de1e0f0d47d75bf7029.tar.gz
external_gettext-e0d46c88d40eaf9d61209de1e0f0d47d75bf7029.tar.bz2
Use ngettext where possible.
-rw-r--r--ChangeLog4
-rw-r--r--configure.in4
-rw-r--r--src/ChangeLog6
-rw-r--r--src/msgcmp.c4
-rw-r--r--src/msgfmt.c16
-rw-r--r--src/po-lex.c5
-rw-r--r--tests/ChangeLog6
-rwxr-xr-xtests/msgcmp-22
-rwxr-xr-xtests/msgmerge-22
9 files changed, 40 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 464024b..9bf9a76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2001-03-11 Bruno Haible <haible@clisp.cons.org>
+ * configure.in: Pass 'need-ngettext' to AM_GNU_GETTEXT.
+
+2001-03-11 Bruno Haible <haible@clisp.cons.org>
+
* configure.in (ALL_LINGUAS): Add en@quot and en@boldquot.
2001-03-10 Bruno Haible <haible@clisp.cons.org>
diff --git a/configure.in b/configure.in
index 1210e32..bd6dd50 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
-AC_REVISION($Revision: 1.16 $)
+AC_REVISION($Revision: 1.17 $)
AC_INIT(src/msgfmt.c)
AM_INIT_AUTOMAKE(gettext, 0.10.36)
RELEASE_DATE=2001-03-09 dnl in "date +%Y-%m-%d" format
@@ -71,7 +71,7 @@ gt_SETLOCALE
dnl These are the only lines required to internationalize the package.
dnl (OK, not quite, the AC_OUTPUT has also some parts.)
-AM_GNU_GETTEXT(use-libtool)
+AM_GNU_GETTEXT(use-libtool, need-ngettext)
dnl Check for Emacs and where to install .elc files.
AM_PATH_LISPDIR
diff --git a/src/ChangeLog b/src/ChangeLog
index e0bc8d1..07f1f65 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-11 Bruno Haible <haible@clisp.cons.org>
+
+ * po-lex.c (lex_close): Use ngettext and plural-form message.
+ * msgcmp.c (compare): Likewise.
+ * msgfmt.c (main): Likewise.
+
2001-03-10 Bruno Haible <haible@clisp.cons.org>
* po.c (po_callback_message): Cast %*s argument from size_t to int.
diff --git a/src/msgcmp.c b/src/msgcmp.c
index 045ded3..e6fed4d 100644
--- a/src/msgcmp.c
+++ b/src/msgcmp.c
@@ -279,7 +279,9 @@ this message is used but not defined in %s"), fn1);
/* Exit with status 1 on any error. */
if (nerrors > 0)
- error (EXIT_FAILURE, 0, _("found %d fatal errors"), nerrors);
+ error (EXIT_FAILURE, 0,
+ ngettext ("found %d fatal error", "found %d fatal errors", nerrors),
+ nerrors);
}
diff --git a/src/msgfmt.c b/src/msgfmt.c
index 675efd9..35bd4fa 100644
--- a/src/msgfmt.c
+++ b/src/msgfmt.c
@@ -356,11 +356,21 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
/* Print statistics if requested. */
if (verbose_level > 0 || do_statistics)
{
- fprintf (stderr, _("%d translated messages"), msgs_translated);
+ fprintf (stderr,
+ ngettext ("%d translated message", "%d translated messages",
+ msgs_translated),
+ msgs_translated);
if (msgs_fuzzy > 0)
- fprintf (stderr, _(", %d fuzzy translations"), msgs_fuzzy);
+ fprintf (stderr,
+ ngettext (", %d fuzzy translation", ", %d fuzzy translations",
+ msgs_fuzzy),
+ msgs_fuzzy);
if (msgs_untranslated > 0)
- fprintf (stderr, _(", %d untranslated messages"), msgs_untranslated);
+ fprintf (stderr,
+ ngettext (", %d untranslated message",
+ ", %d untranslated messages",
+ msgs_untranslated),
+ msgs_untranslated);
fputs (".\n", stderr);
}
diff --git a/src/po-lex.c b/src/po-lex.c
index 509f802..6374222 100644
--- a/src/po-lex.c
+++ b/src/po-lex.c
@@ -99,7 +99,10 @@ void
lex_close ()
{
if (error_message_count > 0)
- error (EXIT_FAILURE, 0, _("found %d fatal errors"), error_message_count);
+ error (EXIT_FAILURE, 0,
+ ngettext ("found %d fatal error", "found %d fatal errors",
+ error_message_count),
+ error_message_count);
if (fp != stdin)
fclose (fp);
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 56271dc..f43bde1 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,11 @@
2001-03-10 Bruno Haible <haible@clisp.cons.org>
+ * msgcmp-2: Expect a singular error message.
+ * msgmerge-2: Likewise.
+ * xg-test1.ok.po: Regenerated.
+
+2001-03-10 Bruno Haible <haible@clisp.cons.org>
+
* Makefile.am (LDADD): Define depending on @USE_INCLUDED_LIBINTL@.
(LDADD_yes, LDADD_no): New variables. When @USE_INCLUDED_LIBINTL@ = no,
use both ../intl/libgnuintl.a and @INTLLIBS@ instead of
diff --git a/tests/msgcmp-2 b/tests/msgcmp-2
index b0bbc91..d7a67da 100755
--- a/tests/msgcmp-2
+++ b/tests/msgcmp-2
@@ -31,7 +31,7 @@ cat <<EOF > mc-test2.ok
mc-test2.in2:1: this message is used but not defined...
mc-test2.in1:3: ...but this definition is similar
mc-test2.in1:4: warning: this message is not used
-found 1 fatal errors
+found 1 fatal error
EOF
: ${DIFF=diff}
diff --git a/tests/msgmerge-2 b/tests/msgmerge-2
index 73f8249..8a37b12 100755
--- a/tests/msgmerge-2
+++ b/tests/msgmerge-2
@@ -30,7 +30,7 @@ tmpfiles="$tmpfiles mm-test2.ok"
cat << EOF > mm-test2.ok
mm-test2.in1:3: duplicate message definition
mm-test2.in1:1: ...this is the location of the first definition
-found 1 fatal errors
+found 1 fatal error
EOF
: ${DIFF=diff}