[vlc-commits] textdomain: use localedir (fixes #19894)
Rémi Denis-Courmont
git at videolan.org
Tue Mar 6 20:17:40 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 6 20:55:18 2018 +0200| [a46731104493942b1e8bc5a6c31e806ebe218e82] | committer: Rémi Denis-Courmont
textdomain: use localedir (fixes #19894)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a46731104493942b1e8bc5a6c31e806ebe218e82
---
src/modules/textdomain.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/modules/textdomain.c b/src/modules/textdomain.c
index 5d0e3ec9f2..bdeb936749 100644
--- a/src/modules/textdomain.c
+++ b/src/modules/textdomain.c
@@ -27,25 +27,14 @@
#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 *upath = config_GetSysPath(VLC_PKG_DATA_DIR, "locale");
+ char *upath = config_GetSysPath(VLC_LOCALE_DIR, NULL);
if (unlikely(upath == NULL))
return -1;
@@ -59,7 +48,6 @@ 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()
More information about the vlc-commits
mailing list