From 3423edf7eb933a05e54a356fc62bc9352c45307b Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Tue, 24 Aug 1999 19:57:55 +0000 Subject: [PATCH] big i18n fix patch from SHIRASAKI Yasuhiro . Fixes those pesky menu problems -Yosh --- ChangeLog | 14 +++++++++ app/channels_dialog.c | 18 +++++------ app/gui/channels-dialog.c | 18 +++++------ app/gui/layers-dialog.c | 40 ++++++++++++------------ app/gui/menus.c | 27 ++++++++++------ app/layers_dialog.c | 40 ++++++++++++------------ app/menus.c | 27 ++++++++++------ app/menus/menus.c | 27 ++++++++++------ app/widgets/gimpitemfactory.c | 27 ++++++++++------ plug-ins/common/autostretch_hsv.c | 2 +- plug-ins/common/compose.c | 2 +- plug-ins/common/decompose.c | 2 +- plug-ins/common/mail.c | 2 +- plug-ins/print/print.c | 2 +- plug-ins/script-fu/script-fu-interface.c | 3 +- plug-ins/script-fu/script-fu-scripts.c | 3 +- 16 files changed, 149 insertions(+), 105 deletions(-) diff --git a/ChangeLog b/ChangeLog index 271ec1d482..e84ee9afad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Tue Aug 24 12:49:35 PDT 1999 Manish Singh + + * app/channels_dialog.c + * app/layers_dialog.c + * app/menus.c + * plug-ins/common/autostretch_hsv.c + * plug-ins/common/compose.c + * plug-ins/common/decompose.c + * plug-ins/common/mail.c + * plug-ins/print/print.c + * plug-ins/script-fu/script-fu-scripts.c: big i18n fix patch + from SHIRASAKI Yasuhiro . Fixes those + pesky menu problems + Tue Aug 24 20:32:39 MEST 1999 Sven Neumann * plug-ins/common/Makefile.am diff --git a/app/channels_dialog.c b/app/channels_dialog.c index c69ea1442a..9dad2b54b8 100644 --- a/app/channels_dialog.c +++ b/app/channels_dialog.c @@ -622,26 +622,26 @@ channels_dialog_set_menu_sensitivity () gtk_widget_set_sensitive (channels_ops_buttons[(button)].widget, \ (condition) != 0) - SET_SENSITIVE (_("/New Channel"), !fs_sens); + SET_SENSITIVE (N_("/New Channel"), !fs_sens); SET_OPS_SENSITIVE (0, !fs_sens); - SET_SENSITIVE (_("/Raise Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Raise Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (1, !fs_sens && aux_sens); - SET_SENSITIVE (_("/Lower Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Lower Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (2, !fs_sens && aux_sens); - SET_SENSITIVE (_("/Duplicate Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Duplicate Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (3, !fs_sens && aux_sens); - SET_SENSITIVE (_("/Channel to Selection"), aux_sens); + SET_SENSITIVE (N_("/Channel to Selection"), aux_sens); SET_OPS_SENSITIVE (4, aux_sens); - SET_SENSITIVE (_("/Add to Selection"), aux_sens); - SET_SENSITIVE (_("/Subtract From Selection"), aux_sens); - SET_SENSITIVE (_("/Intersect With Selection"), aux_sens); + SET_SENSITIVE (N_("/Add to Selection"), aux_sens); + SET_SENSITIVE (N_("/Subtract From Selection"), aux_sens); + SET_SENSITIVE (N_("/Intersect With Selection"), aux_sens); - SET_SENSITIVE (_("/Delete Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Delete Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (5, !fs_sens && aux_sens); #undef SET_OPS_SENSITIVE diff --git a/app/gui/channels-dialog.c b/app/gui/channels-dialog.c index c69ea1442a..9dad2b54b8 100644 --- a/app/gui/channels-dialog.c +++ b/app/gui/channels-dialog.c @@ -622,26 +622,26 @@ channels_dialog_set_menu_sensitivity () gtk_widget_set_sensitive (channels_ops_buttons[(button)].widget, \ (condition) != 0) - SET_SENSITIVE (_("/New Channel"), !fs_sens); + SET_SENSITIVE (N_("/New Channel"), !fs_sens); SET_OPS_SENSITIVE (0, !fs_sens); - SET_SENSITIVE (_("/Raise Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Raise Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (1, !fs_sens && aux_sens); - SET_SENSITIVE (_("/Lower Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Lower Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (2, !fs_sens && aux_sens); - SET_SENSITIVE (_("/Duplicate Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Duplicate Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (3, !fs_sens && aux_sens); - SET_SENSITIVE (_("/Channel to Selection"), aux_sens); + SET_SENSITIVE (N_("/Channel to Selection"), aux_sens); SET_OPS_SENSITIVE (4, aux_sens); - SET_SENSITIVE (_("/Add to Selection"), aux_sens); - SET_SENSITIVE (_("/Subtract From Selection"), aux_sens); - SET_SENSITIVE (_("/Intersect With Selection"), aux_sens); + SET_SENSITIVE (N_("/Add to Selection"), aux_sens); + SET_SENSITIVE (N_("/Subtract From Selection"), aux_sens); + SET_SENSITIVE (N_("/Intersect With Selection"), aux_sens); - SET_SENSITIVE (_("/Delete Channel"), !fs_sens && aux_sens); + SET_SENSITIVE (N_("/Delete Channel"), !fs_sens && aux_sens); SET_OPS_SENSITIVE (5, !fs_sens && aux_sens); #undef SET_OPS_SENSITIVE diff --git a/app/gui/layers-dialog.c b/app/gui/layers-dialog.c index 8e97a520c0..033242d8bd 100644 --- a/app/gui/layers-dialog.c +++ b/app/gui/layers-dialog.c @@ -1004,46 +1004,46 @@ layers_dialog_set_menu_sensitivity () gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \ (condition) != 0) - SET_SENSITIVE (_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev); - SET_SENSITIVE (_("/Stack/Next Layer"), fs && ac && gimage && lp && next); + SET_SENSITIVE (N_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev); + SET_SENSITIVE (N_("/Stack/Next Layer"), fs && ac && gimage && lp && next); - SET_SENSITIVE (_("/Stack/Raise Layer"), + SET_SENSITIVE (N_("/Stack/Raise Layer"), fs && ac && gimage && lp && alpha && prev); SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev); - SET_SENSITIVE (_("/Stack/Lower Layer"), + SET_SENSITIVE (N_("/Stack/Lower Layer"), fs && ac && gimage && lp && next && next_alpha); SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha); - SET_SENSITIVE (_("/Stack/Layer to Top"), + SET_SENSITIVE (N_("/Stack/Layer to Top"), fs && ac && gimage && lp && alpha && prev); - SET_SENSITIVE (_("/Stack/Layer to Bottom"), + SET_SENSITIVE (N_("/Stack/Layer to Bottom"), fs && ac && gimage && lp && next && next_alpha); - SET_SENSITIVE (_("/New Layer"), gimage); + SET_SENSITIVE (N_("/New Layer"), gimage); SET_OPS_SENSITIVE (0, gimage); - SET_SENSITIVE (_("/Duplicate Layer"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Duplicate Layer"), fs && ac && gimage && lp); SET_OPS_SENSITIVE (3, fs && ac && gimage && lp); - SET_SENSITIVE (_("/Anchor Layer"), !fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Anchor Layer"), !fs && ac && gimage && lp); SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp); - SET_SENSITIVE (_("/Delete Layer"), ac && gimage && lp); + SET_SENSITIVE (N_("/Delete Layer"), ac && gimage && lp); SET_OPS_SENSITIVE (5, ac && gimage && lp); - SET_SENSITIVE (_("/Scale Layer"), ac && gimage && lp); - SET_SENSITIVE (_("/Resize Layer"), ac && gimage && lp); + SET_SENSITIVE (N_("/Scale Layer"), ac && gimage && lp); + SET_SENSITIVE (N_("/Resize Layer"), ac && gimage && lp); - SET_SENSITIVE (_("/Merge Visible Layers"), fs && ac && gimage && lp); - SET_SENSITIVE (_("/Merge Down"), fs && ac && gimage && lp); - SET_SENSITIVE (_("/Flatten Image"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Merge Visible Layers"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Merge Down"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Flatten Image"), fs && ac && gimage && lp); - SET_SENSITIVE (_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha); - SET_SENSITIVE (_("/Apply Layer Mask"), fs && ac && gimage && lm && lp); - SET_SENSITIVE (_("/Alpha to Selection"), fs && ac && gimage && lp && alpha); - SET_SENSITIVE (_("/Mask to Selection"), fs && ac && gimage && lm && lp); - SET_SENSITIVE (_("/Add Alpha Channel"), !alpha); + SET_SENSITIVE (N_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha); + SET_SENSITIVE (N_("/Apply Layer Mask"), fs && ac && gimage && lm && lp); + SET_SENSITIVE (N_("/Alpha to Selection"), fs && ac && gimage && lp && alpha); + SET_SENSITIVE (N_("/Mask to Selection"), fs && ac && gimage && lm && lp); + SET_SENSITIVE (N_("/Add Alpha Channel"), !alpha); #undef SET_OPS_SENSITIVE #undef SET_SENSITIVE diff --git a/app/gui/menus.c b/app/gui/menus.c index 01c191cf94..b7c1c5aeb5 100644 --- a/app/gui/menus.c +++ b/app/gui/menus.c @@ -43,7 +43,13 @@ #define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1) #define MRU_MENU_ACCEL_SIZE sizeof ("0") -static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 "); +static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "), + N_("/File"), + N_("/File/Dialogs"), + N_("/Layers"), + N_("/Tools"), + N_("/Dialogs"), + N_("/View/Zoom") }; static void menus_init (void); static gchar* menu_translate (const gchar *path, @@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_sensitive (menupath, sensitive); g_free (menupath); } @@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_state (menupath, state); g_free (menupath); } @@ -622,13 +628,14 @@ menus_last_opened_update_labels (void) { g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str)); - g_string_sprintf (path, _("/File/MRU%02d"), i); + g_string_sprintf (path, N_("/File/MRU%02d"), i); widget = gtk_item_factory_get_widget (toolbox_factory, path->str); - gtk_widget_show (widget); + if (widget != NULL) { + gtk_widget_show (widget); - gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); - + gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); + } filename_slist = filename_slist->next; } @@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename) if (num_entries == 0) { - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_show (widget); } @@ -703,7 +710,7 @@ menus_init_mru (void) last_opened_entries[i].callback_action = i; last_opened_entries[i].item_type = NULL; - g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1); + g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1); if (accelerator != NULL) g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "%d", i + 1); } @@ -718,7 +725,7 @@ menus_init_mru (void) gtk_widget_hide (widget); } - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_hide (widget); g_free (paths); diff --git a/app/layers_dialog.c b/app/layers_dialog.c index 8e97a520c0..033242d8bd 100644 --- a/app/layers_dialog.c +++ b/app/layers_dialog.c @@ -1004,46 +1004,46 @@ layers_dialog_set_menu_sensitivity () gtk_widget_set_sensitive (layers_ops_buttons[(button)].widget, \ (condition) != 0) - SET_SENSITIVE (_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev); - SET_SENSITIVE (_("/Stack/Next Layer"), fs && ac && gimage && lp && next); + SET_SENSITIVE (N_("/Stack/Previous Layer"), fs && ac && gimage && lp && prev); + SET_SENSITIVE (N_("/Stack/Next Layer"), fs && ac && gimage && lp && next); - SET_SENSITIVE (_("/Stack/Raise Layer"), + SET_SENSITIVE (N_("/Stack/Raise Layer"), fs && ac && gimage && lp && alpha && prev); SET_OPS_SENSITIVE (1, fs && ac && gimage && lp && alpha && prev); - SET_SENSITIVE (_("/Stack/Lower Layer"), + SET_SENSITIVE (N_("/Stack/Lower Layer"), fs && ac && gimage && lp && next && next_alpha); SET_OPS_SENSITIVE (2, fs && ac && gimage && lp && next && next_alpha); - SET_SENSITIVE (_("/Stack/Layer to Top"), + SET_SENSITIVE (N_("/Stack/Layer to Top"), fs && ac && gimage && lp && alpha && prev); - SET_SENSITIVE (_("/Stack/Layer to Bottom"), + SET_SENSITIVE (N_("/Stack/Layer to Bottom"), fs && ac && gimage && lp && next && next_alpha); - SET_SENSITIVE (_("/New Layer"), gimage); + SET_SENSITIVE (N_("/New Layer"), gimage); SET_OPS_SENSITIVE (0, gimage); - SET_SENSITIVE (_("/Duplicate Layer"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Duplicate Layer"), fs && ac && gimage && lp); SET_OPS_SENSITIVE (3, fs && ac && gimage && lp); - SET_SENSITIVE (_("/Anchor Layer"), !fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Anchor Layer"), !fs && ac && gimage && lp); SET_OPS_SENSITIVE (4, !fs && ac && gimage && lp); - SET_SENSITIVE (_("/Delete Layer"), ac && gimage && lp); + SET_SENSITIVE (N_("/Delete Layer"), ac && gimage && lp); SET_OPS_SENSITIVE (5, ac && gimage && lp); - SET_SENSITIVE (_("/Scale Layer"), ac && gimage && lp); - SET_SENSITIVE (_("/Resize Layer"), ac && gimage && lp); + SET_SENSITIVE (N_("/Scale Layer"), ac && gimage && lp); + SET_SENSITIVE (N_("/Resize Layer"), ac && gimage && lp); - SET_SENSITIVE (_("/Merge Visible Layers"), fs && ac && gimage && lp); - SET_SENSITIVE (_("/Merge Down"), fs && ac && gimage && lp); - SET_SENSITIVE (_("/Flatten Image"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Merge Visible Layers"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Merge Down"), fs && ac && gimage && lp); + SET_SENSITIVE (N_("/Flatten Image"), fs && ac && gimage && lp); - SET_SENSITIVE (_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha); - SET_SENSITIVE (_("/Apply Layer Mask"), fs && ac && gimage && lm && lp); - SET_SENSITIVE (_("/Alpha to Selection"), fs && ac && gimage && lp && alpha); - SET_SENSITIVE (_("/Mask to Selection"), fs && ac && gimage && lm && lp); - SET_SENSITIVE (_("/Add Alpha Channel"), !alpha); + SET_SENSITIVE (N_("/Add Layer Mask"), fs && ac && gimage && !lm && lp && alpha); + SET_SENSITIVE (N_("/Apply Layer Mask"), fs && ac && gimage && lm && lp); + SET_SENSITIVE (N_("/Alpha to Selection"), fs && ac && gimage && lp && alpha); + SET_SENSITIVE (N_("/Mask to Selection"), fs && ac && gimage && lm && lp); + SET_SENSITIVE (N_("/Add Alpha Channel"), !alpha); #undef SET_OPS_SENSITIVE #undef SET_SENSITIVE diff --git a/app/menus.c b/app/menus.c index 01c191cf94..b7c1c5aeb5 100644 --- a/app/menus.c +++ b/app/menus.c @@ -43,7 +43,13 @@ #define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1) #define MRU_MENU_ACCEL_SIZE sizeof ("0") -static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 "); +static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "), + N_("/File"), + N_("/File/Dialogs"), + N_("/Layers"), + N_("/Tools"), + N_("/Dialogs"), + N_("/View/Zoom") }; static void menus_init (void); static gchar* menu_translate (const gchar *path, @@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_sensitive (menupath, sensitive); g_free (menupath); } @@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_state (menupath, state); g_free (menupath); } @@ -622,13 +628,14 @@ menus_last_opened_update_labels (void) { g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str)); - g_string_sprintf (path, _("/File/MRU%02d"), i); + g_string_sprintf (path, N_("/File/MRU%02d"), i); widget = gtk_item_factory_get_widget (toolbox_factory, path->str); - gtk_widget_show (widget); + if (widget != NULL) { + gtk_widget_show (widget); - gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); - + gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); + } filename_slist = filename_slist->next; } @@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename) if (num_entries == 0) { - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_show (widget); } @@ -703,7 +710,7 @@ menus_init_mru (void) last_opened_entries[i].callback_action = i; last_opened_entries[i].item_type = NULL; - g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1); + g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1); if (accelerator != NULL) g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "%d", i + 1); } @@ -718,7 +725,7 @@ menus_init_mru (void) gtk_widget_hide (widget); } - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_hide (widget); g_free (paths); diff --git a/app/menus/menus.c b/app/menus/menus.c index 01c191cf94..b7c1c5aeb5 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -43,7 +43,13 @@ #define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1) #define MRU_MENU_ACCEL_SIZE sizeof ("0") -static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 "); +static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "), + N_("/File"), + N_("/File/Dialogs"), + N_("/Layers"), + N_("/Tools"), + N_("/Dialogs"), + N_("/View/Zoom") }; static void menus_init (void); static gchar* menu_translate (const gchar *path, @@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_sensitive (menupath, sensitive); g_free (menupath); } @@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_state (menupath, state); g_free (menupath); } @@ -622,13 +628,14 @@ menus_last_opened_update_labels (void) { g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str)); - g_string_sprintf (path, _("/File/MRU%02d"), i); + g_string_sprintf (path, N_("/File/MRU%02d"), i); widget = gtk_item_factory_get_widget (toolbox_factory, path->str); - gtk_widget_show (widget); + if (widget != NULL) { + gtk_widget_show (widget); - gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); - + gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); + } filename_slist = filename_slist->next; } @@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename) if (num_entries == 0) { - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_show (widget); } @@ -703,7 +710,7 @@ menus_init_mru (void) last_opened_entries[i].callback_action = i; last_opened_entries[i].item_type = NULL; - g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1); + g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1); if (accelerator != NULL) g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "%d", i + 1); } @@ -718,7 +725,7 @@ menus_init_mru (void) gtk_widget_hide (widget); } - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_hide (widget); g_free (paths); diff --git a/app/widgets/gimpitemfactory.c b/app/widgets/gimpitemfactory.c index 01c191cf94..b7c1c5aeb5 100644 --- a/app/widgets/gimpitemfactory.c +++ b/app/widgets/gimpitemfactory.c @@ -43,7 +43,13 @@ #define MRU_MENU_ENTRY_SIZE (strlen (_("/File/MRU00 ")) + 1) #define MRU_MENU_ACCEL_SIZE sizeof ("0") -static char* G_GNUC_UNUSED dummyMRU = N_("/File/MRU00 "); +static char* G_GNUC_UNUSED dummyMenus[] = { N_("/File/MRU00 "), + N_("/File"), + N_("/File/Dialogs"), + N_("/Layers"), + N_("/Tools"), + N_("/Dialogs"), + N_("/View/Zoom") }; static void menus_init (void); static gchar* menu_translate (const gchar *path, @@ -512,7 +518,7 @@ menus_set_sensitive_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_sensitive (menupath, sensitive); g_free (menupath); } @@ -549,7 +555,7 @@ menus_set_state_locale (gchar *prepath, { gchar *menupath; - menupath = g_strdup_printf ("%s%s", prepath, _(path)); + menupath = g_strdup_printf ("%s%s", prepath, path); menus_set_state (menupath, state); g_free (menupath); } @@ -622,13 +628,14 @@ menus_last_opened_update_labels (void) { g_string_sprintf (entry_filename, "%d. %s", i, g_basename (((GString *) filename_slist->data)->str)); - g_string_sprintf (path, _("/File/MRU%02d"), i); + g_string_sprintf (path, N_("/File/MRU%02d"), i); widget = gtk_item_factory_get_widget (toolbox_factory, path->str); - gtk_widget_show (widget); + if (widget != NULL) { + gtk_widget_show (widget); - gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); - + gtk_label_set (GTK_LABEL (GTK_BIN (widget)->child), entry_filename->str); + } filename_slist = filename_slist->next; } @@ -667,7 +674,7 @@ menus_last_opened_add (gchar *filename) if (num_entries == 0) { - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_show (widget); } @@ -703,7 +710,7 @@ menus_init_mru (void) last_opened_entries[i].callback_action = i; last_opened_entries[i].item_type = NULL; - g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1); + g_snprintf (path, MRU_MENU_ENTRY_SIZE, N_("/File/MRU%02d"), i + 1); if (accelerator != NULL) g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "%d", i + 1); } @@ -718,7 +725,7 @@ menus_init_mru (void) gtk_widget_hide (widget); } - widget = gtk_item_factory_get_widget (toolbox_factory, gettext(file_menu_separator.path)); + widget = gtk_item_factory_get_widget (toolbox_factory, file_menu_separator.path); gtk_widget_hide (widget); g_free (paths); diff --git a/plug-ins/common/autostretch_hsv.c b/plug-ins/common/autostretch_hsv.c index 6e8e669639..e8cd6e79d6 100644 --- a/plug-ins/common/autostretch_hsv.c +++ b/plug-ins/common/autostretch_hsv.c @@ -84,7 +84,7 @@ query () "Scott Goehring and Federico Mena Quintero", "Scott Goehring and Federico Mena Quintero", "1997", - _("/Image/Colors/Auto-Stretch HSV"), + N_("/Image/Colors/Auto-Stretch HSV"), "RGB*, INDEXED*", PROC_PLUG_IN, nargs, nreturn_vals, diff --git a/plug-ins/common/compose.c b/plug-ins/common/compose.c index b497e026d5..91a98f714c 100644 --- a/plug-ins/common/compose.c +++ b/plug-ins/common/compose.c @@ -231,7 +231,7 @@ query () "Peter Kirchgessner", "Peter Kirchgessner (peter@kirchgessner.net)", "1997", - _("/Image/Channel Ops/Compose"), + N_("/Image/Channel Ops/Compose"), "GRAY*", PROC_PLUG_IN, nargs, nreturn_vals, diff --git a/plug-ins/common/decompose.c b/plug-ins/common/decompose.c index 677a7d721a..95e8842877 100644 --- a/plug-ins/common/decompose.c +++ b/plug-ins/common/decompose.c @@ -219,7 +219,7 @@ query () "Peter Kirchgessner", "Peter Kirchgessner (peter@kirchgessner.net)", "1997", - _("/Image/Channel Ops/Decompose"), + N_("/Image/Channel Ops/Decompose"), "RGB*", PROC_PLUG_IN, nargs, nreturn_vals, diff --git a/plug-ins/common/mail.c b/plug-ins/common/mail.c index e58b3cc563..9a6e97388e 100644 --- a/plug-ins/common/mail.c +++ b/plug-ins/common/mail.c @@ -214,7 +214,7 @@ query () "Adrian Likins, Reagan Blundell", "Adrian Likins, Reagan Blundell, Daniel Risacher, Spencer Kimball and Peter Mattis", "1995-1997", - _("/File/Mail image"), + N_("/File/Mail image"), "RGB*, GRAY*, INDEXED*", PROC_PLUG_IN, nargs, nreturn_vals, diff --git a/plug-ins/print/print.c b/plug-ins/print/print.c index 9ff8701b95..b7a0b20cc0 100644 --- a/plug-ins/print/print.c +++ b/plug-ins/print/print.c @@ -334,7 +334,7 @@ query(void) "Michael Sweet ", "Copyright 1997-1998 by Michael Sweet", PLUG_IN_VERSION, - _("/File/Print"), + N_("/File/Print"), "RGB*,GRAY*,INDEXED*", PROC_PLUG_IN, nargs, diff --git a/plug-ins/script-fu/script-fu-interface.c b/plug-ins/script-fu/script-fu-interface.c index 0c5a08e5f1..de6d863fb6 100644 --- a/plug-ins/script-fu/script-fu-interface.c +++ b/plug-ins/script-fu/script-fu-interface.c @@ -1105,7 +1105,8 @@ script_fu_interface (SFScript *script) argc = 1; argv = g_new (gchar *, 1); argv[0] = g_strdup ("script-fu"); - + + gtk_set_locale(); gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); diff --git a/plug-ins/script-fu/script-fu-scripts.c b/plug-ins/script-fu/script-fu-scripts.c index 0c5a08e5f1..de6d863fb6 100644 --- a/plug-ins/script-fu/script-fu-scripts.c +++ b/plug-ins/script-fu/script-fu-scripts.c @@ -1105,7 +1105,8 @@ script_fu_interface (SFScript *script) argc = 1; argv = g_new (gchar *, 1); argv[0] = g_strdup ("script-fu"); - + + gtk_set_locale(); gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ());