[vlc-commits] config: use ngettext()

Rémi Denis-Courmont git at videolan.org
Mon Apr 16 17:22:10 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 16 18:22:01 2012 +0300| [ac33e84fd48bc37a2c7dbc502a166cca583ce689] | committer: Rémi Denis-Courmont

config: use ngettext()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac33e84fd48bc37a2c7dbc502a166cca583ce689
---

 src/config/help.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/config/help.c b/src/config/help.c
index 9b73029..f0d7d99 100644
--- a/src/config/help.c
+++ b/src/config/help.c
@@ -267,7 +267,7 @@ static void Usage (vlc_object_t *p_this, char const *psz_search)
     bool b_color       = var_InheritBool( p_this, "color" );
     bool b_has_advanced = false;
     bool b_found       = false;
-    int  i_only_advanced = 0; /* Number of modules ignored because they
+    unsigned i_only_advanced = 0; /* Number of modules ignored because they
                                * only have advanced options */
     bool b_strict = psz_search && *psz_search == '=';
     if( b_strict ) psz_search++;
@@ -688,15 +688,15 @@ static void Usage (vlc_object_t *p_this, char const *psz_search)
     if( i_only_advanced > 0 )
     {
         if( b_color )
-        {
             utf8_fprintf( stdout, "\n" WHITE "%s" GRAY " ", _( "Note:" ) );
-            utf8_fprintf( stdout, _( "%d module(s) were not displayed because they only have advanced options.\n" ), i_only_advanced );
-        }
         else
-        {
             utf8_fprintf( stdout, "\n%s ", _( "Note:" ) );
-            utf8_fprintf( stdout, _( "%d module(s) were not displayed because they only have advanced options.\n" ), i_only_advanced );
-        }
+
+        utf8_fprintf( stdout, vlc_ngettext("%u module was not displayed "
+                                     "because it only has advanced options.\n",
+                                           "%u modules were not displayed "
+                                  "because they only have advanced options.\n",
+                      i_only_advanced );
     }
     else if( !b_found )
     {



More information about the vlc-commits mailing list