[PATCH] Internationalization fixes to nautilus-vcs



As nautilus-vcs claims to be a reference implementation, it should do
clean internationalization, since people will most likely copy some of
this code. This patch does:
- depend on glib-2.0 >= 2.4.0
- use glib for i18n (#include <glib/gi18n-lib.h>
- remove nautilus-vcs-intl.h
- fix GETTEXT_PACKAGE to be nautilus-vcs instead of nautilus-cvs.
May I commit it?

regs,
 Chris
? COPYING
? INSTALL
Index: configure.in
===================================================================
RCS file: /cvs/gnome/nautilus-vcs/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- configure.in	19 Nov 2003 20:28:23 -0000	1.1.1.1
+++ configure.in	1 Apr 2004 14:57:28 -0000
@@ -11,6 +11,7 @@
 
 NAUTILUS_REQUIRED=2.5.0
 EEL_REQUIRED=2.5.0
+GLIB_REQUIRED=2.4.0
 
 AC_PROG_CC
 AM_PROG_LIBTOOL
@@ -25,7 +26,7 @@
   AC_MSG_ERROR(you need to have pkgconfig installed !)
 fi
 
-PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED eel-2.0 >= $EEL_REQUIRED)
+PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED eel-2.0 >= $EEL_REQUIRED glib-2.0 >= $GLIB_REQUIRED)
 
 dnl make GNOME_CFLAGS and GNOME_LIBS available
 AC_SUBST(NAUTILUS_CFLAGS)
@@ -34,7 +35,7 @@
 dnl intltool stuff
 AC_PROG_INTLTOOL(0.18)
 dnl AM_WITH_NLS
-GETTEXT_PACKAGE=nautilus-cvs
+GETTEXT_PACKAGE=nautilus-vcs
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package])
 ALL_LINGUAS=""
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/nautilus-vcs/src/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- src/Makefile.am	11 Jan 2004 02:23:41 -0000	1.3
+++ src/Makefile.am	1 Apr 2004 14:57:28 -0000
@@ -19,8 +19,7 @@
 	nautilus-cvs.h           \
 	nautilus-cvs-directory.c \
 	nautilus-cvs-directory.h \
-	nautilus-vcs.c           \
-	nautilus-vcs-intl.h
+	nautilus-vcs.c
 
 libnautilus_vcs_la_LDFLAGS = -module -avoid-version
 libnautilus_vcs_la_LIBADD  = $(NAUTILUS_LIBS)
Index: src/nautilus-cvs.c
===================================================================
RCS file: /cvs/gnome/nautilus-vcs/src/nautilus-cvs.c,v
retrieving revision 1.6
diff -u -r1.6 nautilus-cvs.c
--- src/nautilus-cvs.c	23 Feb 2004 01:31:47 -0000	1.6
+++ src/nautilus-cvs.c	1 Apr 2004 14:57:29 -0000
@@ -33,9 +33,9 @@
 
 /* Other headers */
 #include "nautilus-cvs-directory.h"
-#include "nautilus-vcs-intl.h"
 
 #include <eel/eel-vfs-extensions.h>
+#include <glib/gi18n-lib.h>
 #include <gtk/gtktable.h>
 #include <gtk/gtkvbox.h>
 #include <gtk/gtkhbox.h>
Index: src/nautilus-vcs-intl.h
===================================================================
RCS file: src/nautilus-vcs-intl.h
diff -N src/nautilus-vcs-intl.h
--- src/nautilus-vcs-intl.h	30 Nov 2003 14:42:31 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-#ifndef NAUTILUS_VCS_INTL_H
-#define NAUTILUS_VCS_INTL_H
-
-#include "../config.h"
-
-#ifdef ENABLE_NLS
-#include<libintl.h>
-#define _(String) dgettext(GETTEXT_PACKAGE,String)
-#ifdef gettext_noop
-#define N_(String) gettext_noop(String)
-#else
-#define N_(String) (String)
-#endif
-#else /* NLS is disabled */
-#define _(String) (String)
-#define N_(String) (String)
-#define textdomain(String) (String)
-#define gettext(String) (String)
-#define dgettext(Domain,String) (String)
-#define dcgettext(Domain,String,Type) (String)
-#define bindtextdomain(Domain,Directory) (Domain)
-#endif
-
-#endif
Index: src/nautilus-vcs.c
===================================================================
RCS file: /cvs/gnome/nautilus-vcs/src/nautilus-vcs.c,v
retrieving revision 1.2
diff -u -r1.2 nautilus-vcs.c
--- src/nautilus-vcs.c	11 Jan 2004 02:23:41 -0000	1.2
+++ src/nautilus-vcs.c	1 Apr 2004 14:57:29 -0000
@@ -28,7 +28,8 @@
 
 #include "nautilus-cvs.h"
 #include "nautilus-cvs-directory.h"
-#include "nautilus-vcs-intl.h"
+
+#include <glib/gi18n-lib.h>
 
 /* NautilusVcs provider.  This object handles things that are shared
  * across different version control systems. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]