From 7b1327dd8677668a28a13e2f207fc89c5c564b34 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 27 Jun 2006 07:49:14 +0000 Subject: [PATCH] I18n improvements based on a patch from Zbigniew Chyla: 2006-06-27 Sven Neumann I18n improvements based on a patch from Zbigniew Chyla: * app/main.c: * modules/controller_midi.c * plug-ins/script-fu/scripts/guides-new.scm: marked strings for translation. * app/widgets/gimpdock.c * libgimpwidgets/gimppageselector.c * plug-ins/common/plugin-browser.c: use ngettext() for plural forms. --- ChangeLog | 13 +++++++++++++ app/main.c | 2 +- app/widgets/gimpdock.c | 9 +++++++-- libgimpwidgets/gimppageselector.c | 9 +++++++-- modules/controller_midi.c | 6 +++--- plug-ins/common/plugin-browser.c | 4 +++- plug-ins/script-fu/scripts/guides-new.scm | 2 +- 7 files changed, 35 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b2b1c9006..0393dec6e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2006-06-27 Sven Neumann + + I18n improvements based on a patch from Zbigniew Chyla: + + * app/main.c: + * modules/controller_midi.c + * plug-ins/script-fu/scripts/guides-new.scm: marked strings for + translation. + + * app/widgets/gimpdock.c + * libgimpwidgets/gimppageselector.c + * plug-ins/common/plugin-browser.c: use ngettext() for plural forms. + 2006-06-27 Sven Neumann * libgimp/gimpexport.c (gimp_export_image): use NULL as the diff --git a/app/main.c b/app/main.c index 7ae85154a4..78cb591a43 100644 --- a/app/main.c +++ b/app/main.c @@ -284,7 +284,7 @@ main (int argc, no_interface = TRUE; #endif - context = g_option_context_new ("[FILE|URI...]"); + context = g_option_context_new (_("[FILE|URI...]")); g_option_context_add_main_entries (context, main_entries, GETTEXT_PACKAGE); app_libs_init (context, no_interface); diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c index 5893a167e1..7b0a9b5e1f 100644 --- a/app/widgets/gimpdock.c +++ b/app/widgets/gimpdock.c @@ -301,9 +301,14 @@ gimp_dock_delete_event (GtkWidget *widget, gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box, _("Close all tabs?")); + gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box, - _("This window has %d tabs open. Closing the " - "window will also close all its tabs."), n); + ngettext ("This window has %d tab open. " + "Closing the window will also close " + "all its tabs.", + "This window has %d tabs open. " + "Closing the window will also close " + "all its tabs.", n), n); retval = (gimp_dialog_run (GIMP_DIALOG (dialog)) != GTK_RESPONSE_OK); diff --git a/libgimpwidgets/gimppageselector.c b/libgimpwidgets/gimppageselector.c index 9a2f6e07a5..11e4d034c6 100644 --- a/libgimpwidgets/gimppageselector.c +++ b/libgimpwidgets/gimppageselector.c @@ -1180,9 +1180,14 @@ gimp_page_selector_selection_changed (GtkIconView *icon_view, gchar *text; if (n_selected == priv->n_pages) - text = g_strdup_printf (_("All %d pages selected"), n_selected); + text = g_strdup_printf (ngettext ("All %d page selected", + "All %d pages selected", n_selected), + n_selected); else - text = g_strdup_printf (_("%d pages selected"), n_selected); + text = g_strdup_printf (ngettext ("%d page selected", + "%d pages selected", + n_selected), + n_selected); gtk_label_set_text (GTK_LABEL (priv->count_label), text); g_free (text); diff --git a/modules/controller_midi.c b/modules/controller_midi.c index f12ce79f86..f9387a36a8 100644 --- a/modules/controller_midi.c +++ b/modules/controller_midi.c @@ -380,13 +380,13 @@ midi_get_event_blurb (GimpController *controller, if (! midi_events[event_id].blurb) { if (event_id <= 127) - midi_events[event_id].blurb = g_strdup_printf ("Note %02x on", + midi_events[event_id].blurb = g_strdup_printf (_("Note %02x on"), event_id); else if (event_id <= 255) - midi_events[event_id].blurb = g_strdup_printf ("Note %02x off", + midi_events[event_id].blurb = g_strdup_printf (_("Note %02x off"), event_id - 128); else if (event_id <= 383) - midi_events[event_id].blurb = g_strdup_printf ("Controller %03d", + midi_events[event_id].blurb = g_strdup_printf (_("Controller %03d"), event_id - 256); } diff --git a/plug-ins/common/plugin-browser.c b/plug-ins/common/plugin-browser.c index 7dd09cf87e..67eb91d98f 100644 --- a/plug-ins/common/plugin-browser.c +++ b/plug-ins/common/plugin-browser.c @@ -383,7 +383,9 @@ browser_search (GimpBrowser *gimp_browser, if (! search_text || strlen (search_text) == 0) { - str = g_strdup_printf (_("%d plug-ins"), num_plugins); + str = g_strdup_printf (ngettext ("%d plug-in", "%d plug-ins", + num_plugins), + num_plugins); } else { diff --git a/plug-ins/script-fu/scripts/guides-new.scm b/plug-ins/script-fu/scripts/guides-new.scm index 7519391f9c..791a46d03e 100644 --- a/plug-ins/script-fu/scripts/guides-new.scm +++ b/plug-ins/script-fu/scripts/guides-new.scm @@ -29,7 +29,7 @@ SF-DRAWABLE "Drawable" 0 SF-OPTION _"Direction" '(_"Horizontal" _"Vertical") - SF-ADJUSTMENT "Position" '(0 0 262144 1 10 0 1)) + SF-ADJUSTMENT _"Position" '(0 0 262144 1 10 0 1)) (script-fu-menu-register "script-fu-guide-new" "/Image/Guides")