The following commit has been merged in the sid branch:
commit cac9ac66948552462ffb94f106b9cb7550525de3
Author: Guillem Jover <guil...@debian.org>
Date:   Wed Aug 25 08:15:40 2010 +0200

    Add gettext messages for plural forms
    
    Some of the singular forms are not currently used, but we keep them for
    consistency, and to avoid confusing translators.
    
    Closes: #594218

diff --git a/debian/changelog b/debian/changelog
index 732e8de..856a540 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ dpkg (1.15.8.5) UNRELEASED; urgency=low
   * Clarify effect of “dpkg --purge” on homedir files in dpkg(1).
     Thanks to The Fungi <fu...@yuggoth.org>. Closes: #593628
   * Add gettext plurals infrastructure support.
+  * Add gettext messages for plural forms. Closes: #594218
 
   [ Raphaël Hertzog ]
   * Fix dpkg-genchanges to not split the short description in the middle of a
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index b095a81..9ca729b 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -376,7 +376,10 @@ void do_build(const char *const *argv) {
       ohshite(_("error opening conffiles file"));
     }
     if (warns)
-      warning(_("ignoring %d warnings about the control file(s)\n"), warns);
+      warning(P_("ignoring %d warning about the control file(s)\n",
+                 "ignoring %d warnings about the control file(s)\n", warns),
+              warns);
+
   }
   m_output(stdout, _("<standard output>"));
   
diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c
index d56d6f9..56cf823 100644
--- a/dpkg-deb/info.c
+++ b/dpkg-deb/info.c
@@ -117,10 +117,9 @@ static void info_spew(const char *debar, const char 
*directory,
   }
   varbuf_destroy(&controlfile);
 
-  if (re==1)
-    ohshit(_("One requested control component is missing"));
-  else if (re>1)
-    ohshit(_("%d requested control components are missing"), re);
+  if (re > 0)
+    ohshit(P_("%d requested control component is missing",
+              "%d requested control components are missing", re), re);
 }
 
 static void info_list(const char *debar, const char *directory) {
diff --git a/dpkg-split/join.c b/dpkg-split/join.c
index ad9fb06..ff38e88 100644
--- a/dpkg-split/join.c
+++ b/dpkg-split/join.c
@@ -42,7 +42,9 @@ void reassemble(struct partinfo **partlist, const char 
*outputfile) {
   unsigned int i;
   size_t nr,buffersize;
 
-  printf(_("Putting package %s together from %d parts: "),
+  printf(P_("Putting package %s together from %d part: ",
+            "Putting package %s together from %d parts: ",
+            partlist[0]->maxpartn),
          partlist[0]->package,partlist[0]->maxpartn);
   
   buffersize= partlist[0]->maxpartlen;
diff --git a/scripts/Dpkg/Source/Package/V2.pm 
b/scripts/Dpkg/Source/Package/V2.pm
index 6c852ac..8f6618e 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -414,9 +414,12 @@ sub do_build {
     };
     find({ wanted => $check_binary, preprocess => $filter_ignore,
            no_chdir => 1 }, File::Spec->catdir($dir, "debian"));
-    error(_g("detected %d unwanted binary file(s) " .
-        "(add them in debian/source/include-binaries to allow their " .
-        "inclusion)."), $unwanted_binaries) if $unwanted_binaries;
+    error(P_("detected %d unwanted binary file (add it in " .
+             "debian/source/include-binaries to allow its inclusion).",
+             "detected %d unwanted binary files (add them in " .
+             "debian/source/include-binaries to allow their inclusion).",
+             $unwanted_binaries), $unwanted_binaries)
+         if $unwanted_binaries;
 
     # Create a patch
     my $autopatch = File::Spec->catfile($dir, "debian", "patches",
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 554cae6..9bc2e17 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -376,8 +376,10 @@ foreach my $file (keys %exec) {
            }
        }
     }
-    warning(_g("%d other similar warnings have been skipped (use -v to see " .
-           "them all)."), $nb_skipped_warnings) if $nb_skipped_warnings;
+    warning(P_("%d similar warning has been skipped (use -v to see it).",
+               "%d other similar warnings have been skipped (use -v to see " .
+               "them all).", $nb_skipped_warnings), $nb_skipped_warnings)
+        if $nb_skipped_warnings;
     foreach my $soname (@sonames) {
        # Adjust minimal version of dependencies with information
        # extracted from build-dependencies
diff --git a/src/enquiry.c b/src/enquiry.c
index 1f46b22..8d23d41 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -254,7 +254,9 @@ void unpackchk(const char *const *argv) {
       putchar('\n');
     }
   } else {
-    printf(_(" %d packages, from the following sections:"),totalcount);
+    printf(P_(" %d package, from the following section:",
+              " %d packages, from the following sections:", totalcount),
+           totalcount);
     width= 0;
     for (se= sectionentries; se; se= se->next) {
       sprintf(buf,"%d",se->count);
diff --git a/src/filesdb.c b/src/filesdb.c
index 73f53e3..5565216 100644
--- a/src/filesdb.c
+++ b/src/filesdb.c
@@ -443,7 +443,9 @@ void ensure_allinstfiles_available(void) {
 
   if (saidread==1) {
     progress_done(&progress);
-    printf(_("%d files and directories currently installed.)\n"),nfiles);
+    printf(P_("%d file or directory currently installed.)\n",
+              "%d files and directories currently installed.)\n", nfiles),
+           nfiles);
     saidread=2;
   }
 }
diff --git a/src/help.c b/src/help.c
index a56cd0a..1fd1b6a 100644
--- a/src/help.c
+++ b/src/help.c
@@ -133,10 +133,13 @@ void checkpath(void) {
   varbuf_destroy(&filename);
 
   if (warned)
-    forcibleerr(fc_badpath, _("%d expected program(s) not found in PATH "
-                "or not executable.\nNB: root's PATH should usually contain "
-                "/usr/local/sbin, /usr/sbin and /sbin."),
-                warned);
+    forcibleerr(fc_badpath,
+                P_("%d expected program not found in PATH or not executable.\n"
+                   "NB: root's PATH should usually contain "
+                   "/usr/local/sbin, /usr/sbin and /sbin.",
+                   "%d expected programs not found in PATH or not 
executable.\n"
+                   "NB: root's PATH should usually contain "
+                   "/usr/local/sbin, /usr/sbin and /sbin.", warned), warned);
 }
 
 bool
diff --git a/src/update.c b/src/update.c
index a5eec72..fa42781 100644
--- a/src/update.c
+++ b/src/update.c
@@ -93,7 +93,8 @@ void updateavailable(const char *const *argv) {
   }
 
   if (cipaction->arg != act_avclear)
-    printf(_("Information about %d package(s) was updated.\n"),count);
+    printf(P_("Information about %d package was updated.\n",
+              "Information about %d packages was updated.\n", count), count);
 }
 
 void forgetold(const char *const *argv) {
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index aa36f69..7c609ea 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -1428,10 +1428,13 @@ alternative_select_choice(struct alternative *a)
 
        for (;;) {
                const char *mark;
+               int n_choices;
 
-               pr(_("There are %d choices for the alternative %s (providing "
-                    "%s)."), alternative_choices_count(a), a->master_name,
-                    a->master_link);
+               n_choices = alternative_choices_count(a);
+
+               pr(P_("There is %d choice for the alternative %s (providing 
%s).",
+                     "There are %d choices for the alternative %s (providing 
%s).",
+                     n_choices), n_choices, a->master_name, a->master_link);
                printf("\n");
                len = 15;
                for (fs = a->choices; fs; fs = fs->next)

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to