vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Sun Feb 11 16:49:21 2018 +0200| [a26e7a1a8a5a1613c4f5d748e35f0ed45ff9c740] | committer: Rémi Denis-Courmont
Revert "textdomain: compute path at run-time (refs #1478)" This reverts commit 914fa9dd697d28caa01304b3477bfeb064cfaeb9. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a26e7a1a8a5a1613c4f5d748e35f0ed45ff9c740 --- src/modules/textdomain.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/textdomain.c b/src/modules/textdomain.c index e6e54d7afd..ed9206edd0 100644 --- a/src/modules/textdomain.c +++ b/src/modules/textdomain.c @@ -27,13 +27,24 @@ #ifdef ENABLE_NLS # include <libintl.h> -# include <vlc_charset.h> +# if defined (__APPLE__) || defined (_WIN32) || defined(__OS2__) +# include <vlc_charset.h> +# endif #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; @@ -54,6 +65,7 @@ int vlc_bindtextdomain (const char *domain) } LocaleFree(lpath); free (upath); +# endif /* LibVLC wants all messages in UTF-8. * Unfortunately, we cannot ask UTF-8 for strerror_r(), strsignal_r() _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits