[gnome-pim] compilation & i18n patch



This patch is needed to fix compile of gnome-pim
Gnome2 branch. It also fixes a few i18n issues.
(making translation strings show up and add
translators/documenters placeholders in about
dialog) Can I apply this patch?

-- 
Abel Cheung
GPG Key: (0xC67186FF) http://deaddog.org/gpg.asc
Index: gncal/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/Makefile.am,v
retrieving revision 1.85.2.22
diff -u -r1.85.2.22 Makefile.am
--- gncal/Makefile.am	23 Apr 2002 23:12:35 -0000	1.85.2.22
+++ gncal/Makefile.am	26 Apr 2002 01:12:07 -0000
@@ -6,9 +6,10 @@
 
 bin_PROGRAMS = gnomecal
 
-gnomecal_CFLAGS = -I$(top_srcdir)/libversit $(GNOME_CFLAGS) \
+INCLUDES = -I$(top_srcdir)/libversit $(GNOME_CFLAGS) \
 	-DPREFIX=\"$(prefix)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
 	-DDATADIR=\"$(datadir)\" -DLIBDIR=\"$(libdir)\" \
+	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
 	-DG_DISABLE_DEPRECATED \
 	-DGDK_DISABLE_DEPRECATED -DGDK_PIXMAP_DISABLE_DEPRECATED \
 	-DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
Index: gncal/gnomecal-goto.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/Attic/gnomecal-goto.c,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 gnomecal-goto.c
--- gncal/gnomecal-goto.c	10 Apr 2002 17:55:30 -0000	1.1.2.2
+++ gncal/gnomecal-goto.c	26 Apr 2002 01:12:07 -0000
@@ -20,6 +20,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <time.h>
 
 #include <glib.h>
Index: gncal/gnomecal-prefs.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/Attic/gnomecal-prefs.c,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 gnomecal-prefs.c
--- gncal/gnomecal-prefs.c	25 Apr 2002 23:46:28 -0000	1.1.2.6
+++ gncal/gnomecal-prefs.c	26 Apr 2002 01:12:08 -0000
@@ -18,6 +18,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <glib.h>
 
 #include <gconf/gconf.h>
Index: gncal/main.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/main.c,v
retrieving revision 1.103.2.16
diff -u -r1.103.2.16 main.c
--- gncal/main.c	23 Apr 2002 23:18:07 -0000	1.103.2.16
+++ gncal/main.c	26 Apr 2002 01:12:08 -0000
@@ -32,7 +32,7 @@
 #include "gnome-cal.h"
 #include "gnomecal-config.h"
 #include "gnomecal-goto.h"
-#include "gnomecal-mainwin.h"
+/* #include "gnomecal-mainwin.h" */
 #include "gnomecal-prefs.h"
 #include "timeutil.h"
 #include "todo-list.h"
@@ -112,12 +112,20 @@
 			"Sebastian Rittau <srittau jroger in-berlin de>",
 			NULL
 		};
+
+		const gchar *documenters[] = {
+			NULL
+		};
+
+		const gchar *translator_credits = _("translator_credits");
 		
 		about = gnome_about_new (_("GNOME Calendar"), VERSION,
 					 "(C) 1998 Free Software Foundation\n(C) 1998 Red Hat Software, Inc.\n(C) 2002 Sebastian Rittau",
 					 _("The GNOME personal calendar and schedule manager"),
 					 authors,
-					 NULL, NULL, NULL);
+					 documenters,
+					 strcmp (translator_credits, "translator_credits") != 0 ? (const char *)translator_credits : NULL,
+					 NULL);
 
 		g_signal_connect (G_OBJECT (about), "destroy",
 				  G_CALLBACK (gtk_widget_destroyed), &about);
@@ -956,10 +964,9 @@
 	int ret = 0;
 	CORBA_Object factory;
 
-#ifdef ENABLE_NLS
-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-        textdomain (GETTEXT_PACKAGE);
-#endif
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
 
 	gnome_program_init ("gnomecal", VERSION,
 			    LIBGNOMEUI_MODULE,
Index: gncal/todo-categories.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/Attic/todo-categories.c,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 todo-categories.c
--- gncal/todo-categories.c	23 Apr 2002 19:13:09 -0000	1.1.2.6
+++ gncal/todo-categories.c	26 Apr 2002 01:12:08 -0000
@@ -20,6 +20,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <glib.h>
 #include <gnome.h>
 
Index: gncal/todo-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/Attic/todo-dialog.c,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 todo-dialog.c
--- gncal/todo-dialog.c	18 Apr 2002 18:10:14 -0000	1.1.2.11
+++ gncal/todo-dialog.c	26 Apr 2002 01:12:09 -0000
@@ -23,6 +23,10 @@
 /* FIXME: window resize is broken... */
 /* FIXME: priority button should be an option menu */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <glib.h>
 
 #include <gconf/gconf.h>
Index: gncal/todo-list.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/Attic/todo-list.c,v
retrieving revision 1.1.2.9
diff -u -r1.1.2.9 todo-list.c
--- gncal/todo-list.c	18 Apr 2002 18:11:45 -0000	1.1.2.9
+++ gncal/todo-list.c	26 Apr 2002 01:12:09 -0000
@@ -20,6 +20,10 @@
 
 /* FIXME: row size changeable, rows reorderable, sort during instant apply */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <time.h>
 
 #include <glib.h>
Index: gnomecard/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-pim/gnomecard/Makefile.am,v
retrieving revision 1.53.2.11
diff -u -r1.53.2.11 Makefile.am
--- gnomecard/Makefile.am	23 Apr 2002 23:10:07 -0000	1.53.2.11
+++ gnomecard/Makefile.am	26 Apr 2002 01:12:09 -0000
@@ -20,9 +20,10 @@
 
 bin_PROGRAMS = gnomecard
 
-gnomecard_CFLAGS = -I$(top_srcdir)/libversit $(GNOME_CFLAGS) \
+INCLUDES = -I$(top_srcdir)/libversit $(GNOME_CFLAGS) \
 	-DPREFIX=\"$(prefix)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
 	-DDATADIR=\"$(datadir)\" -DLIBDIR=\"$(libdir)\" \
+	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
 	-DG_DISABLE_DEPRECATED \
 	-DGDK_DISABLE_DEPRECATED -DGDK_PIXMAP_DISABLE_DEPRECATED \
 	-DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
Index: gnomecard/dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gnomecard/dialog.c,v
retrieving revision 1.43.2.7
diff -u -r1.43.2.7 dialog.c
--- gnomecard/dialog.c	23 Apr 2002 16:13:02 -0000	1.43.2.7
+++ gnomecard/dialog.c	26 Apr 2002 01:12:09 -0000
@@ -1196,18 +1196,26 @@
 dialog_about(void)
 {
 	GtkWidget *about;
-	const gchar *authors[] = {
+	static const gchar *authors[] = {
 		"Arturo Espinosa <arturo nuclecu unam mx>", 
 		"<drmike redhat com>",
 		"Sebastian Rittau <srittau jroger in-berlin de>",
 		NULL
 	};
 	
+	const gchar *documenters[] = {
+		NULL
+	};
+
+	const gchar *translator_credits = _("translator_credits");
+
 	about = gnome_about_new (_("GNOME Address Book"), VERSION,
 				 "(C) 1997-2002 the Free Software Foundation",
 				 _("Electronic Business Card Manager"),
 				 authors,
-				 NULL, NULL, NULL);
+				 documenters,
+				 strcmp (translator_credits, "translator_credits") != 0 ? (const char *)translator_credits : NULL,
+				 NULL);
 	gtk_widget_show (about);
 }
 
Index: gnomecard/gnomecard-prefs.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gnomecard/Attic/gnomecard-prefs.c,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 gnomecard-prefs.c
--- gnomecard/gnomecard-prefs.c	23 Apr 2002 16:13:33 -0000	1.1.2.2
+++ gnomecard/gnomecard-prefs.c	26 Apr 2002 01:12:09 -0000
@@ -22,6 +22,10 @@
 
 #undef GTK_DISABLE_DEPRECATED /* FIXME */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <glib.h>
 
 #include <gconf/gconf.h>
Index: gnomecard/gnomecard.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gnomecard/gnomecard.c,v
retrieving revision 1.80.2.10
diff -u -r1.80.2.10 gnomecard.c
--- gnomecard/gnomecard.c	23 Apr 2002 23:19:13 -0000	1.80.2.10
+++ gnomecard/gnomecard.c	26 Apr 2002 01:12:10 -0000
@@ -559,23 +559,23 @@
 	
 GnomeUIInfo sortradios[] = {
 	
-	{GNOME_APP_UI_ITEM, N_("By Card Name"), "",
+	{GNOME_APP_UI_ITEM, N_("By Card Name"), N_("Sort by card name"),
 	 gnomecard_sort_cards, (gpointer) COLTYPE_CARDNAME, NULL,
 	GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
 	
-	{GNOME_APP_UI_ITEM, N_("By Name"), "",
+	{GNOME_APP_UI_ITEM, N_("By Name"), N_("Sort by real name"),
 	 gnomecard_sort_cards, (gpointer) COLTYPE_FULLNAME, NULL,
 	GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
 	
-	{GNOME_APP_UI_ITEM, N_("By Last Name"), "",
+	{GNOME_APP_UI_ITEM, N_("By Last Name"), N_("Sort by last name"),
 	 gnomecard_sort_cards, (gpointer) COLTYPE_LASTNAME, NULL,
 	GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
 	
-	{GNOME_APP_UI_ITEM, N_("By E-mail"), "",
+	{GNOME_APP_UI_ITEM, N_("By E-mail"), N_("Sort by e-mail address"),
 	 gnomecard_sort_cards, (gpointer) COLTYPE_EMAIL, NULL,
 	GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
 
-	{GNOME_APP_UI_ITEM, N_("By Organization"), "",
+	{GNOME_APP_UI_ITEM, N_("By Organization"), N_("Sort by organization"),
 	 gnomecard_sort_cards, (gpointer) COLTYPE_ORG, NULL,
 	GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
 	
@@ -846,10 +846,9 @@
 
 int main (int argc, char *argv[])
 {
-#ifdef ENABLE_NLS
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
-#endif
 
 	gnome_program_init ("gnomecard", VERSION,
 			    LIBGNOMEUI_MODULE,


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