changeset 434:b79d319e3054

gettext fixes
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 01 Jan 2007 08:34:01 +0000
parents a0c3d277dc0e
children 5f6d3014f86f
files src/xmms-sid.h
diffstat 1 files changed, 23 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmms-sid.h	Mon Jan 01 08:32:01 2007 +0000
+++ b/src/xmms-sid.h	Mon Jan 01 08:34:01 2007 +0000
@@ -40,6 +40,29 @@
 extern "C" {
 #endif
 
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+#  include <libintl.h>
+#  undef _
+#  define _(String) dgettext (PACKAGE, String)
+#  ifdef gettext_noop
+#    define N_(String) gettext_noop (String)
+#  else
+#    define N_(String) (String)
+#  endif
+#else
+#  define textdomain(String) (String)
+#  define gettext(String) (String)
+#  define dgettext(Domain,Message) (Message)
+#  define dcgettext(Domain,Message,Type) (Message)
+#  define bindtextdomain(Domain,Directory) (Domain)
+#  define _(String) (String)
+#  define N_(String) (String)
+#endif
+
+
 #include <xmms/plugin.h>
 
 /*
@@ -218,12 +241,6 @@
 void	xs_error(const char *, ...);
 
 
-/* For possible i18n support
- */
-#ifndef _
-#define _(x) x
-#endif
-
 /* Debugging
  */
 #ifndef DEBUG_NP