- From: Kjartan Maraas <kmaraas online no>
- To: danw helixcode com
- Subject: Patch for i18n in bonobo
- Date: Thu, 27 Apr 2000 20:51:50 +0200
Here we go.
Cheers
Kjartan Maraas
Index: bonobo/bonobo-uih-menu.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-uih-menu.c,v
retrieving revision 1.4
diff -u -r1.4 bonobo-uih-menu.c
--- bonobo/bonobo-uih-menu.c 2000/04/03 06:45:53 1.4
+++ bonobo/bonobo-uih-menu.c 2000/04/27 18:36:17
@@ -7,6 +7,7 @@
*/
#define BONOBO_UI_HANDLER_COMPILATION
+#include <config.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkmenu.h>
Index: bonobo/bonobo-uih-toolbar.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-uih-toolbar.c,v
retrieving revision 1.9
diff -u -r1.9 bonobo-uih-toolbar.c
--- bonobo/bonobo-uih-toolbar.c 2000/03/23 20:57:48 1.9
+++ bonobo/bonobo-uih-toolbar.c 2000/04/27 18:36:29
@@ -7,6 +7,7 @@
*/
#define BONOBO_UI_HANDLER_COMPILATION
+#include <config.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkmenu.h>
Index: gshell/gshell.c
===================================================================
RCS file: /cvs/gnome/bonobo/gshell/gshell.c,v
retrieving revision 1.21
diff -u -r1.21 gshell.c
--- gshell/gshell.c 2000/04/21 21:00:08 1.21
+++ gshell/gshell.c 2000/04/27 18:36:32
@@ -8,6 +8,7 @@
* Copyright 1999 Maurer IT Systemlösungen (http://www.maurer-it.com)
*/
+#include <config.h>
#include "gshell.h"
#include "inout.h"
#include "menu.h"
Index: gshell/inout.c
===================================================================
RCS file: /cvs/gnome/bonobo/gshell/inout.c,v
retrieving revision 1.11
diff -u -r1.11 inout.c
--- gshell/inout.c 2000/03/24 14:50:35 1.11
+++ gshell/inout.c 2000/04/27 18:36:34
@@ -9,6 +9,7 @@
* Copyright 1999 Maurer IT Systemlösungen (http://www.maurer-it.com)
*/
+#include <config.h>
#include "inout.h"
#include "menu.h"
Index: gshell/menu.c
===================================================================
RCS file: /cvs/gnome/bonobo/gshell/menu.c,v
retrieving revision 1.4
diff -u -r1.4 menu.c
--- gshell/menu.c 2000/02/16 10:27:58 1.4
+++ gshell/menu.c 2000/04/27 18:36:34
@@ -7,6 +7,7 @@
* Copyright 1999 Maurer IT Systemlösungen (http://www.maurer-it.com)
*/
+#include <config.h>
#include "menu.h"
#include "inout.h"
Index: gshell/properties.c
===================================================================
RCS file: /cvs/gnome/bonobo/gshell/properties.c,v
retrieving revision 1.1
diff -u -r1.1 properties.c
--- gshell/properties.c 2000/04/21 21:00:08 1.1
+++ gshell/properties.c 2000/04/27 18:36:35
@@ -7,6 +7,7 @@
*
* Copyright 1999, 2000 Helix Code, Inc.
*/
+
#include <config.h>
#include <gnome.h>
Index: po/POTFILES.in
===================================================================
RCS file: /cvs/gnome/bonobo/po/POTFILES.in,v
retrieving revision 1.2
diff -u -r1.2 POTFILES.in
--- po/POTFILES.in 1999/02/22 23:13:20 1.2
+++ po/POTFILES.in 2000/04/27 18:36:36
@@ -1 +1,23 @@
-bonobo/test-container.c
\ No newline at end of file
+bonobo/bonobo-selector.c
+bonobo/bonobo-uih-menu.c
+bonobo/bonobo-uih-toolbar.c
+bonobo/selector_test.c
+bonobo/test-container-autoload.c
+bonobo/test-container.c
+bonobo/test-storage.c
+bonobo/test-ui-handler.c
+gshell/gshell.c
+gshell/inout.c
+gshell/menu.c
+samples/bonobo-class/echo-client.c
+samples/bonobo-class/main.c
+samples/compound-doc/paint-component-simple.c
+samples/compound-doc/sample-container.c
+samples/controls/bonobo-calculator-control.c
+samples/controls/sample-control-factory.c
+tools/bonobrowser/bonobrowser.c
+tools/bonobrowser/idl-browser.c
+tools/bonobrowser/name-browser.c
+tools/bonobrowser/object-browser.c
+tools/bonobrowser/register-new-object.c
+tools/bonobrowser/utils.c
Index: tools/bonobrowser/bonobrowser.c
===================================================================
RCS file: /cvs/gnome/bonobo/tools/bonobrowser/bonobrowser.c,v
retrieving revision 1.2
diff -u -r1.2 bonobrowser.c
--- tools/bonobrowser/bonobrowser.c 2000/02/16 10:27:59 1.2
+++ tools/bonobrowser/bonobrowser.c 2000/04/27 18:36:37
@@ -20,6 +20,7 @@
*
*----------------------------------------------------------------------*/
+#include <config.h>
#include <gtk/gtk.h>
#include <orb/orbit.h>
#include <libgnorba/gnorba.h>
@@ -36,9 +37,9 @@
} page;
-page pages[] = {{"Registration browser", object_browser_new},
- {"Name service browser", nameservice_browser_new},
- {"IDL browser", idl_browser_new}};
+page pages[] = {{N_("Registration browser"), object_browser_new},
+ {N_("Name service browser"), nameservice_browser_new},
+ {N_("IDL browser"), idl_browser_new}};
static void
create_pages (GtkNotebook *notebook)
@@ -97,7 +98,7 @@
GTK_SIGNAL_FUNC(gtk_main_quit),
&main_window);
- gtk_window_set_title (GTK_WINDOW (main_window), "BonoBrowser");
+ gtk_window_set_title (GTK_WINDOW (main_window), _("BonoBrowser"));
gtk_container_set_border_width (GTK_CONTAINER (main_window), 0);
@@ -120,6 +121,9 @@
CORBA_Environment ev;
CORBA_ORB orb;
+ bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ textdomain (PACKAGE);
+
CORBA_exception_init(&ev);
orb = gnome_CORBA_init ("thing", "0.0", &argc, argv,
Index: tools/bonobrowser/idl-browser.c
===================================================================
RCS file: /cvs/gnome/bonobo/tools/bonobrowser/idl-browser.c,v
retrieving revision 1.2
diff -u -r1.2 idl-browser.c
--- tools/bonobrowser/idl-browser.c 2000/02/19 13:50:34 1.2
+++ tools/bonobrowser/idl-browser.c 2000/04/27 18:36:40
@@ -18,6 +18,7 @@
*
*----------------------------------------------------------------------*/
+#include <config.h>
#include <gnome.h>
#include <stdlib.h>
#include <string.h>
@@ -299,7 +300,7 @@
if (!window)
{
- window = gtk_file_selection_new ("file selection dialog");
+ window = gtk_file_selection_new (_("file selection dialog"));
gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (window));
@@ -353,7 +354,7 @@
load_btn =
gtk_button_new_with_label_and_pixmap (
vbox,
- "Open IDL File...",
+ _("Open IDL File..."),
GNOME_STOCK_PIXMAP_OPEN);
gtk_signal_connect (GTK_OBJECT (load_btn), "clicked",
Index: tools/bonobrowser/name-browser.c
===================================================================
RCS file: /cvs/gnome/bonobo/tools/bonobrowser/name-browser.c,v
retrieving revision 1.3
diff -u -r1.3 name-browser.c
--- tools/bonobrowser/name-browser.c 2000/03/31 01:38:03 1.3
+++ tools/bonobrowser/name-browser.c 2000/04/27 18:36:42
@@ -20,6 +20,7 @@
*----------------------------------------------------------------------*/
+#include <config.h>
#include <gnome.h>
#include <orb/orbit.h>
#include <libgnorba/gnorba.h>
@@ -315,7 +316,7 @@
GdkColor transparent;
- char *ctree_titles[] = { "identifier" , "kind" };
+ char *ctree_titles[] = { _("identifier") , _("kind") };
vbox = gtk_vbox_new (FALSE, 0);
@@ -363,7 +364,7 @@
refresh_button =
gtk_button_new_with_label_and_pixmap (
hbox,
- "Refresh",
+ _("Refresh"),
GNOME_STOCK_PIXMAP_REFRESH);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), refresh_button, TRUE, FALSE, 0);
Index: tools/bonobrowser/object-browser.c
===================================================================
RCS file: /cvs/gnome/bonobo/tools/bonobrowser/object-browser.c,v
retrieving revision 1.2
diff -u -r1.2 object-browser.c
--- tools/bonobrowser/object-browser.c 2000/02/19 13:50:34 1.2
+++ tools/bonobrowser/object-browser.c 2000/04/27 18:36:43
@@ -22,6 +22,7 @@
/* much of this code in this file is stolen
* from the goad-browser */
+#include <config.h>
#include <gnome.h>
#include <orb/orbit.h>
#include <libgnorba/gnorba.h>
@@ -80,13 +81,13 @@
make_obj_subtree(
ctree, this_branch,
- "server id",
+ _("server id"),
servers[i].server_id,
FALSE);
make_obj_subtree(
ctree, this_branch,
- "location info",
+ _("location info"),
servers[i].location_info,
FALSE);
@@ -94,7 +95,7 @@
make_obj_subtree(
ctree, this_branch,
- "repo ids",
+ _("repo ids"),
repo_ids,
FALSE);
@@ -426,7 +427,7 @@
new_object_btn =
gtk_button_new_with_label_and_pixmap (
option_vbox,
- "Register new object...",
+ _("Register new object..."),
GNOME_STOCK_PIXMAP_NEW);
gtk_signal_connect (
@@ -442,7 +443,7 @@
option_menu = gtk_option_menu_new ();
menu_item = make_menu_item (
- "Description",
+ _("Description"),
GTK_SIGNAL_FUNC(sorting_option_menu_selected_cb),
GINT_TO_POINTER (SORTBY_DESCRIPTION));
gtk_object_set_data (
@@ -450,7 +451,7 @@
gtk_menu_append (GTK_MENU (menu), menu_item);
menu_item = make_menu_item (
- "Interface",
+ _("Interface"),
GTK_SIGNAL_FUNC(sorting_option_menu_selected_cb),
GINT_TO_POINTER (SORTBY_INTERFACE));
gtk_object_set_data (
@@ -458,7 +459,7 @@
gtk_menu_append (GTK_MENU (menu), menu_item);
menu_item = make_menu_item (
- "Activation Type",
+ _("Activation Type"),
GTK_SIGNAL_FUNC(sorting_option_menu_selected_cb),
GINT_TO_POINTER (SORTBY_ACTIVATION_TYPE));
Index: tools/bonobrowser/register-new-object.c
===================================================================
RCS file: /cvs/gnome/bonobo/tools/bonobrowser/register-new-object.c,v
retrieving revision 1.2
diff -u -r1.2 register-new-object.c
--- tools/bonobrowser/register-new-object.c 2000/02/19 13:50:34 1.2
+++ tools/bonobrowser/register-new-object.c 2000/04/27 18:36:47
@@ -19,6 +19,7 @@
*
*----------------------------------------------------------------------*/
+#include <config.h>
#include <gnome.h>
#include <libgnorba/gnorba.h>
#include "bonobrowser.h"
@@ -133,13 +134,13 @@
/* creation_type will be exe, factory or shlib */
if (!contains_non_whitespace (creation_type)) {
if (user_interaction_allowed)
- message_box ("Please fill in the creation type.");
+ message_box (_("Please fill in the creation type."));
return FALSE;
}
/* location_info will be a filename or the goad_id of a factory */
if (!contains_non_whitespace (location_info)) {
if (user_interaction_allowed)
- message_box ("Please fill in the creation method.");
+ message_box (_("Please fill in the creation method."));
return FALSE;
}
@@ -151,13 +152,13 @@
if (!filename) {
if (user_interaction_allowed)
- message_box ("The server_id is empty.");
+ message_box (_("The server_id is empty."));
return FALSE;
}
if (strlen (filename) < 1) {
if (user_interaction_allowed)
- message_box ("The server_id is empty.");
+ message_box (_("The server_id is empty."));
g_free (filename);
return FALSE;
}
@@ -190,13 +191,13 @@
}
else /* fopen failed */
if (user_interaction_allowed) {
- message_box ("Can't open file %s for writing: %s",
+ message_box (_("Can't open file %s for writing: %s"),
filename_fq, strerror(errno));
}
} else if (fopen_rtn == 0) {/* file exists, so let's not overwrite it */
if (user_interaction_allowed)
- message_box ("The file %s already exists!",
+ message_box (_("The file %s already exists!"),
filename_fq);
else
@@ -422,13 +423,13 @@
radio_button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (radio_button)),
- "Local");
+ _("Local"));
gtk_signal_connect (GTK_OBJECT (radio_button), "clicked",
GTK_SIGNAL_FUNC(interface_local_clicked),
reg_info);
gtk_box_pack_start (GTK_BOX (hbox), radio_button, FALSE, TRUE, 0);
- button = gtk_button_new_with_label ("New");
+ button = gtk_button_new_with_label (_("New"));
reg_info->iface_combo = GTK_COMBO (gtk_combo_new());
gtk_signal_connect (GTK_OBJECT (button), "clicked",
@@ -457,7 +458,7 @@
interface_idl_clicked(idl_radio_button, reg_info);
- button = gtk_button_new_with_label ("Add");
+ button = gtk_button_new_with_label (_("Add"));
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC(add_interface_to_list),
reg_info);
@@ -556,7 +557,7 @@
radio_button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (radio_button)),
- "Local");
+ _("Local"));
gtk_signal_connect (GTK_OBJECT (radio_button), "clicked",
GTK_SIGNAL_FUNC(server_local_clicked),
@@ -636,7 +637,7 @@
{
object_registration_info* reg_info = p;
GtkFileSelection *fs = GTK_FILE_SELECTION (
- gtk_file_selection_new ("file selection dialog"));
+ gtk_file_selection_new (_("file selection dialog")));
gtk_file_selection_hide_fileop_buttons (fs);
@@ -681,7 +682,7 @@
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 5);
radio_button = gtk_radio_button_new_with_label (
- NULL, "factory");
+ NULL, _("factory"));
gtk_signal_connect (GTK_OBJECT (radio_button), "clicked",
GTK_SIGNAL_FUNC (activation_factory_clicked),
reg_info);
@@ -691,7 +692,7 @@
radio_button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (radio_button)),
- "exe");
+ _("exe"));
gtk_signal_connect (GTK_OBJECT (radio_button), "clicked",
GTK_SIGNAL_FUNC(activation_exe_clicked),
@@ -701,7 +702,7 @@
radio_button = gtk_radio_button_new_with_label (
gtk_radio_button_group (GTK_RADIO_BUTTON (radio_button)),
- "shlib");
+ _("shlib"));
gtk_signal_connect (GTK_OBJECT (radio_button), "clicked",
GTK_SIGNAL_FUNC(activation_shlib_clicked),
@@ -710,7 +711,7 @@
gtk_box_pack_start (GTK_BOX (hbox), radio_button, FALSE, TRUE, 0);
reg_info->creation_browse_button = GTK_BUTTON (
- gtk_button_new_with_label ("Browse"));
+ gtk_button_new_with_label (_("Browse")));
gtk_signal_connect (GTK_OBJECT (reg_info->creation_browse_button), "clicked",
GTK_SIGNAL_FUNC(activation_type_browse),
reg_info);
@@ -809,15 +810,15 @@
GTK_SIGNAL_FUNC(delete_reg_info),
reg_info);
- gtk_window_set_title (GTK_WINDOW (window), "New Object");
+ gtk_window_set_title (GTK_WINDOW (window), _("New Object"));
- iface_frame = gtk_frame_new("Interface(s)");
+ iface_frame = gtk_frame_new(_("Interface(s)"));
gtk_container_add (GTK_CONTAINER (iface_frame),
interface_section_new(reg_info));
- serverid_frame = gtk_frame_new("Server ID");
+ serverid_frame = gtk_frame_new(_("Server ID"));
gtk_container_add (GTK_CONTAINER (serverid_frame),
server_id_section_new(reg_info));
- creation_frame = gtk_frame_new("Creation method");
+ creation_frame = gtk_frame_new(_("Creation method"));
gtk_container_add (GTK_CONTAINER (creation_frame),
creation_type_section_new(reg_info));
@@ -832,7 +833,7 @@
gtk_box_pack_start (GTK_BOX (vbox),
hbox,
FALSE, TRUE, 5);
- label = gtk_label_new ("Description:");
+ label = gtk_label_new (_("Description:"));
gtk_box_pack_start (GTK_BOX (hbox),
label,
FALSE, TRUE, 5);
@@ -844,7 +845,7 @@
/* add in `register object' btn */
{
GtkWidget *button, *hbox;
- button = gtk_button_new_with_label ("Register this object");
+ button = gtk_button_new_with_label (_("Register this object"));
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox),
Index: tools/bonobrowser/utils.c
===================================================================
RCS file: /cvs/gnome/bonobo/tools/bonobrowser/utils.c,v
retrieving revision 1.2
diff -u -r1.2 utils.c
--- tools/bonobrowser/utils.c 2000/02/19 13:50:34 1.2
+++ tools/bonobrowser/utils.c 2000/04/27 18:36:47
@@ -19,6 +19,7 @@
*
*----------------------------------------------------------------------*/
+#include <config.h>
#include <gnome.h>
/**