This adds proper gettext support to Tilda, so that it can be
internationalized at a later date. Not all strings are marked, yet.
Note that this will not work as-is, because some additional #define's
are needed. They will be provided when the project is autoconfed.
#include "tilda-terminal.h"
#include "tilda-terminal-dbus-glue.h"
-// FIXME: temporary helpers for gettext
-// TODO: remove these
-#define _(X) X
-#define N_(X) X
-
#define DINGUS1 "(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+(:[0-9]*)?"
#define DINGUS2 "(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp)[-A-Za-z0-9]*\\.)[-A-Za-z0-9\\.]+(:[0-9]*)?/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*[^]'\\.}>\\) ,\\\"]"
TildaWindow *tw;
+#if ENABLE_NLS
+ /* Gettext Initialization */
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+#endif
+
/* Initialize GTK+ (and the GObject system) */
gtk_init (&argc, &argv);
#define debug_assert(args...) do { /* nothing */ } while (0)
#endif
+/* Optional gettext translation macros */
+#ifdef ENABLE_NLS
+ #include <glib/gi18n.h>
+#else
+ #define _(X) X
+ #define N_(X) X
+#endif
+
/* Project-global variables */
extern DBusGConnection *dbus_connection;