src/main.c: String fixes for translators. - enscript - GNU Enscript
 (HTM) git clone git://thinkerwim.org/enscript.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit dfe37670d2247f6bb813dfe02dbf12769fa510b6
 (DIR) parent 6f1eead89c678724e80326210d5b52c1434405a5
 (HTM) Author: Tim Retout <diocles@gnu.org>
       Date:   Sun, 10 Jul 2011 12:44:19 +0100
       
       src/main.c: String fixes for translators.
       
       Signed-off-by: Tim Retout <diocles@gnu.org>
       
       Diffstat:
         M ChangeLog                           |       4 ++++
         M src/main.c                          |      19 ++++++++++++-------
       
       2 files changed, 16 insertions(+), 7 deletions(-)
       ---
 (DIR) diff --git a/ChangeLog b/ChangeLog
       @@ -1,5 +1,9 @@
        2011-07-10  Tim Retout  <diocles@gnu.org>
        
       +        * src/main.c (main): Join ENSCRIPT_LIBRARY error string together
       +        for the benefit of translators.
       +        Use ngettext when printing number of pages/copies.
       +
                * states/hl/mail.st: Support extended mail headers.
                Savannah bug #25440.
        
 (DIR) diff --git a/src/main.c b/src/main.c
       @@ -1085,10 +1085,8 @@ _("This is probably an installation error.  Please, try to rebuild:")));
                          ERROR ((stderr, _("\tmake")));
                          ERROR ((stderr, _("\tmake check")));
                          ERROR ((stderr, _("\tmake install")));
       -                  ERROR ((stderr,
       -_("or set the environment variable `ENSCRIPT_LIBRARY' to point to your")));
       -                  ERROR ((stderr,
       -_("library directory.")));
       +                  ERROR ((stderr, _("or set the environment variable `ENSCRIPT_LIBRARY'"
       +                        " to point to your library directory.")));
                          exit (1);
                        }
        
       @@ -1755,9 +1753,16 @@ name             width\theight\tllx\tlly\turx\tury\n\
              else
                real_total_pages = total_pages;
        
       -      /* We did something, tell what.  */
       -      MESSAGE (0, (stderr, _("[ %d pages * %d copy ]"), real_total_pages,
       -                   num_copies));
       +          /* We did something, tell what.  */
       +          char message[80];
       +          snprintf(message, sizeof message, "%s%s%s%s%s",
       +                           "[ ",
       +                           ngettext("%d page", "%d pages", real_total_pages),
       +                           " * ",
       +                           ngettext("%d copy", "%d copies", num_copies),
       +                           " ]");
       +          MESSAGE (0, (stderr, message, real_total_pages, num_copies));
       +
              if (output_file == OUTPUT_FILE_NONE)
                MESSAGE (0, (stderr, _(" sent to %s\n"),
                             printer ? printer : _("printer")));