From 11649fc7012731293a5993487217ed462f407868 Mon Sep 17 00:00:00 2001 From: SHIRASAKI Yasuhiro Date: Mon, 17 Jan 2000 13:21:13 +0000 Subject: [PATCH] plug-ins/common/csource.c plug-ins/common/header.c * plug-ins/common/csource.c * plug-ins/common/header.c * plug-ins/common/winclipboard.c * po-plug-ins/POTFILES.in: added gettext support. -- yasuhiro --- ChangeLog | 7 +++++++ plug-ins/common/csource.c | 33 +++++++++++++++++++-------------- plug-ins/common/header.c | 7 ++++++- plug-ins/common/winclipboard.c | 32 +++++++++++++++++++------------- 4 files changed, 51 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3dcfcc556..104f43dc96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-01-17 Shirasaki Yasuhiro + + * plug-ins/common/csource.c + * plug-ins/common/header.c + * plug-ins/common/winclipboard.c + * po-plug-ins/POTFILES.in: added gettext support. + Sat Jan 16 19:58:55 CET 2000 Stanislav Brabec * plug-ins/common/shift.c: Typo fix. diff --git a/plug-ins/common/csource.c b/plug-ins/common/csource.c index f4d1417912..595802c06c 100644 --- a/plug-ins/common/csource.c +++ b/plug-ins/common/csource.c @@ -21,10 +21,11 @@ #include #include #include +#include "config.h" #include "libgimp/gimp.h" #include "libgimp/gimpui.h" #include - +#include "libgimp/stdplugins-intl.h" typedef struct { @@ -79,9 +80,11 @@ query (void) { PARAM_STRING, "raw_filename", "The name of the file to save the image in" }, }; static int nsave_args = sizeof (save_args) / sizeof (save_args[0]); + + INIT_I18N(); gimp_install_procedure ("file_csource_save", - "Dump image data in RGB(A) format for C source", + _("Dump image data in RGB(A) format for C source"), "FIXME: write help", "Tim Janik", "Tim Janik", @@ -112,7 +115,7 @@ run (gchar *name, *return_vals = values; values[0].type = PARAM_STATUS; values[0].data.d_status = STATUS_CALLING_ERROR; - + if (run_mode == RUN_INTERACTIVE && strcmp (name, "file_csource_save") == 0) { @@ -139,6 +142,8 @@ run (gchar *name, drawable_type == GRAYA_IMAGE || drawable_type == INDEXEDA_IMAGE); + INIT_I18N_UI(); + parasite = gimp_image_parasite_find (image_ID, "gimp-comment"); if (parasite) { @@ -615,14 +620,14 @@ run_save_dialog (Config *config) gtk_init (&argc, &argv); gtk_rc_parse (gimp_gtkrc ()); - dialog = gimp_dialog_new ("Save as C-Source", "csource", + dialog = gimp_dialog_new ( _("Save as C-Source"), "csource", gimp_plugin_help_func, "filters/csource.html", GTK_WIN_POS_MOUSE, FALSE, TRUE, FALSE, - "OK", cb_set_true, + _("OK"), cb_set_true, NULL, &do_save, &button, TRUE, FALSE, - "Cancel", gtk_widget_destroy, + _("Cancel"), gtk_widget_destroy, NULL, 1, NULL, FALSE, TRUE, NULL); @@ -647,7 +652,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); gtk_widget_new (GTK_TYPE_LABEL, - "label", "Prefixed Name: ", + "label", _("Prefixed Name: "), "xalign", 0.0, "visible", TRUE, "parent", hbox, @@ -667,7 +672,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); gtk_widget_new (GTK_TYPE_LABEL, - "label", "Comment: ", + "label", _("Comment: "), "xalign", 0.0, "visible", TRUE, "parent", hbox, @@ -687,7 +692,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); use_comment = gtk_widget_new (GTK_TYPE_CHECK_BUTTON, - "label", "Save comment to file?", + "label", _("Save comment to file?"), "visible", TRUE, "parent", hbox, NULL); @@ -701,7 +706,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); gtype = gtk_widget_new (GTK_TYPE_CHECK_BUTTON, - "label", "Use GLib types (guint8*)", + "label", _("Use GLib types (guint8*)"), "visible", TRUE, "parent", hbox, NULL); @@ -715,7 +720,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); use_macros = gtk_widget_new (GTK_TYPE_CHECK_BUTTON, - "label", "Use macros instead of struct", + "label", _("Use macros instead of struct"), "visible", TRUE, "parent", hbox, NULL); @@ -729,7 +734,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); use_rle = gtk_widget_new (GTK_TYPE_CHECK_BUTTON, - "label", "Use 1 Byte Run-Length-Encoding", + "label", _("Use 1 Byte Run-Length-Encoding"), "visible", TRUE, "parent", hbox, NULL); @@ -743,7 +748,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); alpha = gtk_widget_new (GTK_TYPE_CHECK_BUTTON, - "label", "Save Alpha channel (RGBA/RGB)", + "label", _("Save Alpha channel (RGBA/RGB)"), "visible", TRUE, "parent", hbox, NULL); @@ -757,7 +762,7 @@ run_save_dialog (Config *config) "parent", vbox, NULL); gtk_widget_new (GTK_TYPE_LABEL, - "label", "Opacity: ", + "label", _("Opacity: "), "xalign", 0.0, "visible", TRUE, "parent", hbox, diff --git a/plug-ins/common/header.c b/plug-ins/common/header.c index 63b710116b..a4d246df6c 100644 --- a/plug-ins/common/header.c +++ b/plug-ins/common/header.c @@ -1,9 +1,11 @@ #include #include #include +#include "config.h" #include "gtk/gtk.h" #include "libgimp/gimp.h" #include "libgimp/gimpui.h" +#include "libgimp/stdplugins-intl.h" /* Declare some local functions. */ @@ -43,8 +45,10 @@ query () }; static int nsave_args = sizeof (save_args) / sizeof (save_args[0]); + INIT_I18N(); + gimp_install_procedure ("file_header_save", - "saves files as C unsigned character array", + _("saves files as C unsigned character array"), "FIXME: write help", "Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", @@ -89,6 +93,7 @@ run (char *name, { case RUN_INTERACTIVE: case RUN_WITH_LAST_VALS: + INIT_I18N_UI(); init_gtk (); export = gimp_export_image (&image_ID, &drawable_ID, "Header", (CAN_HANDLE_RGB | CAN_HANDLE_INDEXED)); diff --git a/plug-ins/common/winclipboard.c b/plug-ins/common/winclipboard.c index 95964d11f7..cf7ea25b69 100644 --- a/plug-ins/common/winclipboard.c +++ b/plug-ins/common/winclipboard.c @@ -27,7 +27,9 @@ #include #include +#include "config.h" #include "libgimp/gimp.h" +#include "libgimp/stdplugins-intl.h" /* History: * @@ -95,37 +97,39 @@ query () }; static int ncopy_args = sizeof (copy_args) / sizeof (copy_args[0]); + INIT_I18N(); + gimp_install_procedure ("plug_in_clipboard_copy", - "copy image to clipboard", - "Copies the active drawable to the clipboard.", + _("copy image to clipboard"), + _("Copies the active drawable to the clipboard."), "Hans Breuer", "Hans Breuer", "1999", - "/Edit/Copy to Clipboard", + N_("/Edit/Copy to Clipboard"), "INDEXED*, RGB*", PROC_PLUG_IN, ncopy_args, 0, copy_args, NULL); gimp_install_procedure ("plug_in_clipboard_paste", - "paste image from clipboard", - "Paste image from clipboard into active image.", + _("paste image from clipboard"), + _("Paste image from clipboard into active image."), "Hans Breuer", "Hans Breuer", "1999", - "/Edit/Paste from Clipboard", + N_("/Edit/Paste from Clipboard"), "INDEXED*, RGB*", PROC_PLUG_IN, ncopy_args, 0, copy_args, NULL); gimp_install_procedure ("extension_clipboard_paste", - "Get image from clipboard", - "Get an image from the Windows clipboard, creating a new image", + _("Get image from clipboard"), + _("Get an image from the Windows clipboard, creating a new image"), "Hans Breuer", "Hans Breuer", "1999", - "/File/Acquire/From Clipboard", + N_("/File/Acquire/From Clipboard"), "", PROC_EXTENSION, ncopy_args, 0, @@ -150,6 +154,8 @@ run (char *name, values[0].type = PARAM_STATUS; values[0].data.d_status = STATUS_CALLING_ERROR; + INIT_I18N(); + if (strcmp (name, "plug_in_clipboard_copy") == 0) { *nreturn_vals = 1; @@ -298,7 +304,7 @@ CB_CopyImage (gboolean interactive, /* following the slow part ... */ if (interactive) - gimp_progress_init ("Copying ..."); + gimp_progress_init ( _("Copying ...")); /* speed it up with: */ gimp_tile_cache_size( drawable->width * gimp_tile_height() @@ -504,7 +510,7 @@ CB_PasteImage (gboolean interactive, /* create new image */ image_ID = gimp_image_new (nWidth, nHeight, nBitsPS <= 8 ? INDEXED : RGB); gimp_image_undo_disable(image_ID); - drawable_ID = gimp_layer_new (image_ID, "Background", nWidth, nHeight, + drawable_ID = gimp_layer_new (image_ID, _("Background"), nWidth, nHeight, nBitsPS <= 8 ? INDEXED_IMAGE : RGB_IMAGE, 100, NORMAL_MODE); } @@ -512,7 +518,7 @@ CB_PasteImage (gboolean interactive, { /* ??? gimp_convert_rgb(image_ID); */ - drawable_ID = gimp_layer_new (image_ID, "Pasted", nWidth, nHeight, + drawable_ID = gimp_layer_new (image_ID, _("Pasted"), nWidth, nHeight, nBitsPS <= 8 ? INDEXED_IMAGE : RGB_IMAGE, 100, NORMAL_MODE); bIsNewImage = FALSE; @@ -525,7 +531,7 @@ CB_PasteImage (gboolean interactive, /* following the slow part ... */ if (interactive) - gimp_progress_init ("Pasteing ..."); + gimp_progress_init ( _("Pasteing ...")); pData = GlobalLock(hDIB); if (pData)