[vlc-commits] config: use ngettext()

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


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

config: use ngettext()

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

 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..84f3e58 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 ), i_only_advanced );
     }
     else if( !b_found )
     {



More information about the vlc-commits mailing list