Commit e37b8174 authored by Sebastien Granjoux's avatar Sebastien Granjoux

Use internationalization support provided by glib

parent 4ed3a2d8
......@@ -50,7 +50,7 @@ CFILE_GLOB=$(top_srcdir)/gdl/*.c
# Header files to ignore when scanning.
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES=gdl-data-* gdl-i18n.h libgdl*
IGNORE_HFILES=gdl-data-* libgdl*
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
......
......@@ -34,8 +34,6 @@ libgdl_headers = \
libgdl_3_la_SOURCES = \
$(libgdl_headers) \
gdl-i18n.h \
gdl-i18n.c \
gdl-dock-object.c \
gdl-dock-master.c \
gdl-dock.c \
......
......@@ -28,7 +28,7 @@
#ifndef GDL_DISABLE_DEPRECATED
#define GDL_DISABLE_DEPRECATION_WARNINGS
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include "gdl-dock-tablabel.h"
......
......@@ -23,7 +23,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -31,7 +31,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <string.h>
#include <glib-object.h>
#include <gtk/gtk.h>
......
......@@ -33,7 +33,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
......
......@@ -23,7 +23,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <string.h>
#include <stdlib.h>
#include <libxml/parser.h>
......
......@@ -25,7 +25,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include "gdl-dock-master.h"
#include "gdl-dock.h"
......
......@@ -23,7 +23,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include "gdl-switcher.h"
#include "gdl-dock-notebook.h"
......
......@@ -25,7 +25,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -25,7 +25,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <string.h>
#include <gtk/gtk.h>
......
......@@ -28,7 +28,7 @@
#ifndef GDL_DISABLE_DEPRECATED
#define GDL_DISABLE_DEPRECATION_WARNINGS
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include "gdl-dock-placeholder.h"
#include "gdl-dock-item.h"
......
......@@ -24,7 +24,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
......
/*
* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
* All rights reserved.
*
* This file is part of the Gnome Devtools Library.
*
* The Gnome Devtools Library is free software; you can redistribute
* it and/or modify it under the terms of the GNU Library General
* Public License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* The Gnome Devtools Library is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the Gnome Library; see the file COPYING.LIB. If not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gdl-i18n.h"
char *
gdl_gettext (const char *msgid)
{
static gboolean initialized = FALSE;
if (!initialized) {
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
initialized = TRUE;
}
return dgettext (GETTEXT_PACKAGE, msgid);
}
/*
* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
* All rights reserved.
*
* This file is part of the Gnome Devtools Library.
*
* The Gnome Devtools Library is free software; you can redistribute
* it and/or modify it under the terms of the GNU Library General
* Public License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* The Gnome Devtools Library is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the Gnome Library; see the file COPYING.LIB. If not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
@NOTATION@
*/
/*
* Handles all of the internationalization configuration options.
* Author: Tom Tromey <tromey@creche.cygnus.com>
*/
#ifndef __GDL_18N_H__
#define __GDL_18N_H__ 1
#include <glib.h>
G_BEGIN_DECLS
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) gdl_gettext (String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
/* Stubs that do something close enough. */
# undef textdomain
# define textdomain(String) (String)
# undef gettext
# define gettext(String) (String)
# undef dgettext
# define dgettext(Domain,Message) (Message)
# undef dcgettext
# define dcgettext(Domain,Message,Type) (Message)
# undef bindtextdomain
# define bindtextdomain(Domain,Directory) (Domain)
# undef bind_textdomain_codeset
# define bind_textdomain_codeset(Domain,CodeSet) (Domain)
# undef _
# define _(String) (String)
# undef N_
# define N_(String) (String)
#endif
char *gdl_gettext (const char *msgid);
G_END_DECLS
#endif /* __GDL_I18N_H__ */
......@@ -30,7 +30,7 @@
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <glib/gi18n-lib.h>
#include "gdl-switcher.h"
#include "libgdlmarshal.h"
#include "libgdltypebuiltins.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