[vlc-commits] textdomain: compute path at run-time (refs #1478)

Rémi Denis-Courmont git at videolan.org
Sun Feb 11 09:23:06 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 11 10:21:46 2018 +0200| [914fa9dd697d28caa01304b3477bfeb064cfaeb9] | committer: Rémi Denis-Courmont

textdomain: compute path at run-time (refs #1478)

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

 src/modules/textdomain.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/src/modules/textdomain.c b/src/modules/textdomain.c
index 1fd79f9e32..6dddee82e7 100644
--- a/src/modules/textdomain.c
+++ b/src/modules/textdomain.c
@@ -27,24 +27,13 @@
 
 #ifdef ENABLE_NLS
 # include <libintl.h>
-# if defined (__APPLE__) || defined (_WIN32) || defined(__OS2__)
-#  include <vlc_charset.h>
-# endif
+# include <vlc_charset.h>
 #endif
 
 int vlc_bindtextdomain (const char *domain)
 {
 #if defined (ENABLE_NLS)
     /* Specify where to find the locales for current domain */
-# if !defined (__APPLE__) && !defined (_WIN32) && !defined(__OS2__)
-    static const char path[] = LOCALEDIR;
-
-    if (bindtextdomain (domain, path) == NULL)
-    {
-        fprintf (stderr, "%s: text domain not found in %s\n", domain, path);
-        return -1;
-    }
-# else
     char *datadir = config_GetDataDir();
     if (unlikely(datadir == NULL))
         return -1;
@@ -65,7 +54,6 @@ int vlc_bindtextdomain (const char *domain)
     }
     free (lpath);
     free (upath);
-# endif
 
     /* LibVLC wants all messages in UTF-8.
      * Unfortunately, we cannot ask UTF-8 for strerror_r(), strsignal_r()



More information about the vlc-commits mailing list