diff libpurple/internal.h @ 16063:fa8aeab4ca5a

Hopefully prevent libpurple causing problems for 3rd party UIs if they also use gettext for i18n. Use dgettext & dngettext in libpurple to explicitly specify the text domain to use. Currently, with no split of strings for libpurple/pidgin/finch, we are using 'pidgin' as the gettext domain everywhere. Hopefully this didn't break anything.
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 11 Apr 2007 14:46:04 +0000
parents 0946d187d55a
children 634b96915d2e
line wrap: on
line diff
--- a/libpurple/internal.h	Wed Apr 11 13:38:05 2007 +0000
+++ b/libpurple/internal.h	Wed Apr 11 14:46:04 2007 +0000
@@ -43,7 +43,7 @@
 #ifdef ENABLE_NLS
 #  include <locale.h>
 #  include <libintl.h>
-#  define _(String) ((const char *)gettext(String))
+#  define _(String) ((const char *)dgettext(PACKAGE, String))
 #  ifdef gettext_noop
 #    define N_(String) gettext_noop (String)
 #  else
@@ -56,6 +56,7 @@
 #    define _(String) ((const char *)String)
 #  endif
 #  define ngettext(Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
+#  define dngettext(Domain, Singular, Plural, Number) ((Number == 1) ? ((const char *)Singular) : ((const char *)Plural))
 #endif
 
 #ifdef HAVE_ENDIAN_H