[vlc-commits] RC: 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:21:11 2012 +0300| [7f9cc65e983e5d8f83022f0665fa2c9974ccde32] | committer: Rémi Denis-Courmont

RC: use ngettext

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

 modules/control/rc.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 92d8ae4..e1af748 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -1330,8 +1330,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
     else if (!strcmp( psz_cmd, "goto" ) )
     {
         PL_LOCK;
-        int i_pos = atoi( newval.psz_string );
-        int i_size = p_playlist->items.i_size;
+        unsigned i_pos = atoi( newval.psz_string );
+        unsigned i_size = p_playlist->items.i_size;
 
         if( i_pos <= 0 )
             msg_rc( "%s", _("Error: `goto' needs an argument greater than zero.") );
@@ -1345,7 +1345,9 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
                     p_parent, p_item );
         }
         else
-            msg_rc( _("Playlist has only %d elements"), i_size );
+            msg_rc( vlc_ngettext("Playlist has only %u element",
+                                 "Playlsit has only %u elements", i_size),
+                     i_size );
         PL_UNLOCK;
     }
     else if( !strcmp( psz_cmd, "stop" ) )



More information about the vlc-commits mailing list