[vlc-commits] commit: Do not translate "" for good this time ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu Aug 19 22:28:02 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 19 23:27:26 2010 +0300| [5716471a9582a80b0e5bf760de8d9e3e371ddaec] | committer: Rémi Denis-Courmont 

Do not translate "" for good this time

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

 src/extras/libc.c     |    2 ++
 src/modules/modules.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/extras/libc.c b/src/extras/libc.c
index 1636018..d9aad6b 100644
--- a/src/extras/libc.c
+++ b/src/extras/libc.c
@@ -189,6 +189,8 @@ int vlc_wclosedir( void *_p_dir )
 char *vlc_gettext( const char *msgid )
 {
 #ifdef ENABLE_NLS
+    if( unlikely(!*msgid))
+        return (char *)"";
     return dgettext( PACKAGE_NAME, msgid );
 #else
     return (char *)msgid;
diff --git a/src/modules/modules.c b/src/modules/modules.c
index f6f0e75..62d9ddd 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -301,6 +301,8 @@ const char *module_gettext (const module_t *m, const char *str)
 {
 #ifdef ENABLE_NLS
     const char *domain = m->domain ? m->domain : PACKAGE_NAME;
+    if (unlikely(!*str))
+        return "";
     return dgettext (domain, str);
 #else
     (void)m;



More information about the vlc-commits mailing list