]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use ngettext where possible.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Mar 2001 16:15:20 +0000 (16:15 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Mar 2001 16:15:20 +0000 (16:15 +0000)
ChangeLog
configure.in
src/ChangeLog
src/msgcmp.c
src/msgfmt.c
src/po-lex.c
tests/ChangeLog
tests/msgcmp-2
tests/msgmerge-2

index 464024b7a3fa40b25db7b962a6b577b317b9191f..9bf9a76280eb8652a227b6147a063771e2d56c06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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.
index 1210e32efe0f74a47eaae099755247fe92fcb75e..bd6dd502a95036c96dea7d58101f73a9e07d195f 100644 (file)
@@ -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
index e0bc8d16842ef61906ae6e9eb02b190f65da3115..07f1f657d2f14f3654636a1d9853e4f15649b005 100644 (file)
@@ -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.
index 045ded34f609d63dd30e55b64c28731b33fe6e0c..e6fed4d003734952ad848805d00877762d9d0363 100644 (file)
@@ -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);
 }
 
 
index 675efd9588617afcd7cc032d513b27d6292a8dc8..35bd4fae4c66bda6cd3b2eb7cb535276cc2c5edd 100644 (file)
@@ -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);
     }
 
index 509f8020bcdb3f3a454d593aa1e6d11f43706f90..637422295f33900f6eb6bcd0897b518c4a6176e1 100644 (file)
@@ -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);
index 56271dc2631e022784b281039691e268a389f0b3..f43bde1c3e9f585aaa9cf79480112ed58da760d5 100644 (file)
@@ -1,3 +1,9 @@
+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@.
index b0bbc9191b792f5e53b84c5b77be3f9a7f8c5bd1..d7a67da7c370465e0558db6a660e86f5a63146af 100755 (executable)
@@ -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}
index 73f82495e84103396236844c19c5264b51f5e59c..8a37b128351d91c72ead34902d2b06ae70f3d8a5 100755 (executable)
@@ -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}