Commit 74fa01a0 authored by François Grisez's avatar François Grisez

Define ENABLE_NLS instead of HAVE_INTL when internationalization is available

parent 56055005
...@@ -42,4 +42,4 @@ ...@@ -42,4 +42,4 @@
#cmakedefine HAVE_ZLIB 1 #cmakedefine HAVE_ZLIB 1
#cmakedefine HAVE_CU_GET_SUITE 1 #cmakedefine HAVE_CU_GET_SUITE 1
#cmakedefine HAVE_CU_CURSES 1 #cmakedefine HAVE_CU_CURSES 1
#cmakedefine HAVE_INTL 1 #cmakedefine ENABLE_NLS 1
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
#endif /*_WIN32_WCE*/ #endif /*_WIN32_WCE*/
#ifdef HAVE_INTL #ifdef ENABLE_NLS
#include <libintl.h> #include <libintl.h>
#ifndef _ #ifndef _
#define _(String) gettext(String) #define _(String) gettext(String)
...@@ -714,7 +714,7 @@ linphonec_init(int argc, char **argv) ...@@ -714,7 +714,7 @@ linphonec_init(int argc, char **argv)
default: default:
break; break;
} }
#ifdef HAVE_INTL #ifdef ENABLE_NLS
if (NULL == bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR)) if (NULL == bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR))
perror ("bindtextdomain failed"); perror ("bindtextdomain failed");
#ifndef __ARM__ #ifndef __ARM__
......
...@@ -96,7 +96,7 @@ void linphone_core_set_payload_type_number(LinphoneCore *lc, PayloadType *pt, in ...@@ -96,7 +96,7 @@ void linphone_core_set_payload_type_number(LinphoneCore *lc, PayloadType *pt, in
const char *linphone_core_get_payload_type_description(LinphoneCore *lc, PayloadType *pt){ const char *linphone_core_get_payload_type_description(LinphoneCore *lc, PayloadType *pt){
if (ms_filter_codec_supported(pt->mime_type)){ if (ms_filter_codec_supported(pt->mime_type)){
MSFilterDesc *desc=ms_filter_get_encoder(pt->mime_type); MSFilterDesc *desc=ms_filter_get_encoder(pt->mime_type);
#ifdef HAVE_INTL #ifdef ENABLE_NLS
return dgettext("mediastreamer",desc->text); return dgettext("mediastreamer",desc->text);
#else #else
return desc->text; return desc->text;
......
...@@ -65,7 +65,7 @@ extern "C" { ...@@ -65,7 +65,7 @@ extern "C" {
#define PACKAGE_DATA_DIR "." #define PACKAGE_DATA_DIR "."
#endif #endif
#ifdef HAVE_INTL #ifdef ENABLE_NLS
#include <libintl.h> #include <libintl.h>
#ifndef _ #ifndef _
#define _(String) dgettext(GETTEXT_PACKAGE,String) #define _(String) dgettext(GETTEXT_PACKAGE,String)
......
...@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "ldap/ldapprovider.h" #include "ldap/ldapprovider.h"
#ifdef HAVE_INTL #ifdef ENABLE_NLS
# include <libintl.h> # include <libintl.h>
# undef _ # undef _
# define _(String) dgettext (GETTEXT_PACKAGE,String) # define _(String) dgettext (GETTEXT_PACKAGE,String)
......
...@@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <libnotify/notify.h> #include <libnotify/notify.h>
#endif #endif
#ifdef HAVE_INTL #ifdef ENABLE_NLS
#include <locale.h> #include <locale.h>
#endif #endif
...@@ -2098,7 +2098,7 @@ int main(int argc, char *argv[]){ ...@@ -2098,7 +2098,7 @@ int main(int argc, char *argv[]){
g_setenv("LANGUAGE",lang,1); g_setenv("LANGUAGE",lang,1);
} }
#ifdef HAVE_INTL #ifdef ENABLE_NLS
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
...@@ -2148,7 +2148,7 @@ int main(int argc, char *argv[]){ ...@@ -2148,7 +2148,7 @@ int main(int argc, char *argv[]){
} }
} }
#if defined(__APPLE__) && defined(HAVE_INTL) #if defined(__APPLE__) && defined(ENABLE_NLS)
/*workaround for bundles. GTK is unable to find translations in the bundle (obscure bug again). /*workaround for bundles. GTK is unable to find translations in the bundle (obscure bug again).
So we help it:*/ So we help it:*/
{ {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#define _LIBGETTEXT_H 1 #define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */ /* NLS can be disabled through the configure --disable-nls option. */
#if HAVE_INTL #if ENABLE_NLS
/* Get declarations of GNU message catalog functions. */ /* Get declarations of GNU message catalog functions. */
# include <libintl.h> # include <libintl.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment