diff --git a/ChangeLog b/ChangeLog index bb95ec274b..c878b27d42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 2 00:35:02 CET 2000 Sven Neumann + + * plug-ins/gfli.c: added gettext support + + * plug-ins/[various Makefile.am]: added CPPFLAGS to make i18n work + Tue Feb 1 23:09:42 CET 2000 Sven Neumann * app/regex.c diff --git a/plug-ins/MapObject/Makefile.am b/plug-ins/MapObject/Makefile.am index 7909d02283..02029f2325 100644 --- a/plug-ins/MapObject/Makefile.am +++ b/plug-ins/MapObject/Makefile.am @@ -44,6 +44,9 @@ LDADD = \ $(GTK_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/fits/Makefile.am b/plug-ins/fits/Makefile.am index 688144a9f5..6b76826bca 100644 --- a/plug-ins/fits/Makefile.am +++ b/plug-ins/fits/Makefile.am @@ -20,6 +20,9 @@ LDADD = \ $(GTK_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/gdyntext/Makefile.am b/plug-ins/gdyntext/Makefile.am index 1a6a64ceaa..916f951a5a 100644 --- a/plug-ins/gdyntext/Makefile.am +++ b/plug-ins/gdyntext/Makefile.am @@ -44,6 +44,9 @@ LDADD = \ $(GTK_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/gfli/Makefile.am b/plug-ins/gfli/Makefile.am index e6166fca46..3dff5c4e42 100644 --- a/plug-ins/gfli/Makefile.am +++ b/plug-ins/gfli/Makefile.am @@ -20,6 +20,9 @@ LDADD = \ $(GTK_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/gfli/gfli.c b/plug-ins/gfli/gfli.c index 43599195ad..656ab2e8e6 100644 --- a/plug-ins/gfli/gfli.c +++ b/plug-ins/gfli/gfli.c @@ -47,6 +47,7 @@ * 1.1 first support for FLI saving (BRUN and LC chunks) * 1.2 support for load/save ranges, fixed SGI & SUN problems (I hope...), fixed FLC */ +#include #include #include @@ -56,6 +57,7 @@ #include #include +#include #include "fli.h" @@ -235,6 +237,8 @@ run (gchar *name, if (strncmp (name, "file_fli_load", strlen("file_fli_load")) == 0) { + INIT_I18N_UI (); + switch (run_mode) { case RUN_NONINTERACTIVE: @@ -311,6 +315,8 @@ run (gchar *name, } else if (strcmp (name, "file_fli_save") == 0) { + INIT_I18N_UI (); + switch (run_mode) { case RUN_NONINTERACTIVE: @@ -363,6 +369,9 @@ run (gchar *name, else if (strcmp (name, "file_fli_info") == 0) { gint32 width, height, frames; + + INIT_I18N_UI (); + /* * check for valid parameters; */ @@ -425,7 +434,7 @@ get_info (gchar *filename, if (!f) { - g_message ("FLI: can't open \"%s\"\n", filename); + g_message (_("FLI: can't open \"%s\"\n"), filename); return FALSE; } fli_read_header (f, &fli_header); @@ -457,15 +466,14 @@ load_image (gchar *filename, gint cnt; - name_buf = g_malloc (64 + strlen(filename)); - sprintf (name_buf, "Loading %s:", filename); + name_buf = g_strdup_printf (_("Loading %s:"), filename); gimp_progress_init (name_buf); g_free (name_buf); f = fopen (filename ,"rb"); if (!f) { - g_message ("FLI: can't open \"%s\"\n", filename); + g_message (_("FLI: can't open \"%s\"\n"), filename); return -1; } fli_read_header (f, &fli_header); @@ -525,12 +533,12 @@ load_image (gchar *filename, */ for (cnt = from_frame; cnt <= to_frame; cnt++) { - gchar layername[64]; - sprintf (layername, "Frame (%i)",cnt); - layer_ID = gimp_layer_new (image_id, layername, + name_buf = g_strdup_printf (_("Frame (%i)"), cnt); + layer_ID = gimp_layer_new (image_id, name_buf, fli_header.width, fli_header.height, INDEXED_IMAGE, 100, NORMAL_MODE); gimp_image_add_layer (image_id, layer_ID, 0); + g_free (name_buf); drawable = gimp_drawable_get (layer_ID); gimp_progress_update ((double) cnt / (double)(to_frame-from_frame)); @@ -622,7 +630,7 @@ save_image (gchar *filename, { case INDEXEDA_IMAGE: case GRAYA_IMAGE: - g_message ("FLI: Sorry, can't save images with Alpha.\n"); + g_message (_("FLI: Sorry, can't save images with Alpha.\n")); return FALSE; case GRAY_IMAGE: { @@ -652,11 +660,11 @@ save_image (gchar *filename, break; } default: - g_message ("FLI: Sorry, I can save only INDEXED and GRAY images.\n"); + g_message (_("FLI: Sorry, I can save only INDEXED and GRAY images.\n")); return FALSE; } - name_buf = g_strdup_printf ("Saving %s:", filename); + name_buf = g_strdup_printf (_("Saving %s:"), filename); gimp_progress_init (name_buf); g_free (name_buf); @@ -688,7 +696,7 @@ save_image (gchar *filename, f = fopen (filename ,"wb"); if (!f) { - g_message ("FLI: can't open \"%s\"\n", filename); + g_message (_("FLI: can't open \"%s\"\n"), filename); return FALSE; } fseek (f, 128, SEEK_SET); @@ -821,14 +829,14 @@ load_dialog (gchar *name) init_gtk (); - dialog = gimp_dialog_new ("GFLI 1.2 - Load framestack", "gfli", + dialog = gimp_dialog_new (_("GFLI 1.2 - Load framestack"), "gfli", gimp_plugin_help_func, "filters/gfli.html", GTK_WIN_POS_MOUSE, FALSE, TRUE, FALSE, - "OK", cb_ok, + _("OK"), cb_ok, NULL, NULL, NULL, TRUE, FALSE, - "Cancel", gtk_widget_destroy, + _("Cancel"), gtk_widget_destroy, NULL, 1, NULL, FALSE, TRUE, NULL); @@ -852,7 +860,7 @@ load_dialog (gchar *name) spinbutton = gimp_spin_button_new (&adj, from_frame, 1, nframes, 1, 10, 0, 1, 0); gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, - "From:", 1.0, 0.5, + _("From:"), 1.0, 0.5, spinbutton, 1, TRUE); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC (gimp_int_adjustment_update), @@ -861,7 +869,7 @@ load_dialog (gchar *name) spinbutton = gimp_spin_button_new (&adj, to_frame, 1, nframes, 1, 10, 0, 1, 0); gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, - "To:", 1.0, 0.5, + _("To:"), 1.0, 0.5, spinbutton, 1, TRUE); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC (gimp_int_adjustment_update), @@ -892,14 +900,14 @@ save_dialog (gint32 image_id) init_gtk (); - dialog = gimp_dialog_new ("GFLI 1.2 - Save framestack", "gfli", + dialog = gimp_dialog_new (_("GFLI 1.2 - Save framestack"), "gfli", gimp_plugin_help_func, "filters/gfli.html", GTK_WIN_POS_MOUSE, FALSE, TRUE, FALSE, - "OK", cb_ok, + _("OK"), cb_ok, NULL, NULL, NULL, TRUE, FALSE, - "Cancel", gtk_widget_destroy, + _("Cancel"), gtk_widget_destroy, NULL, 1, NULL, FALSE, TRUE, NULL); @@ -923,7 +931,7 @@ save_dialog (gint32 image_id) spinbutton = gimp_spin_button_new (&adj, from_frame, 1, nframes, 1, 10, 0, 1, 0); gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, - "From:", 1.0, 0.5, + _("From:"), 1.0, 0.5, spinbutton, 1, TRUE); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC (gimp_int_adjustment_update), @@ -932,7 +940,7 @@ save_dialog (gint32 image_id) spinbutton = gimp_spin_button_new (&adj, to_frame, 1, nframes, 1, 10, 0, 1, 0); gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, - "To:", 1.0, 0.5, + _("To:"), 1.0, 0.5, spinbutton, 1, TRUE); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC (gimp_int_adjustment_update), @@ -945,3 +953,4 @@ save_dialog (gint32 image_id) return result; } + diff --git a/plug-ins/helpbrowser/Makefile.am b/plug-ins/helpbrowser/Makefile.am index d9bf57e031..95ea4e9711 100644 --- a/plug-ins/helpbrowser/Makefile.am +++ b/plug-ins/helpbrowser/Makefile.am @@ -22,6 +22,9 @@ LDADD = \ $(GTKXMHTML_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/ifscompose/Makefile.am b/plug-ins/ifscompose/Makefile.am index aafb8b929d..fcb542d85b 100644 --- a/plug-ins/ifscompose/Makefile.am +++ b/plug-ins/ifscompose/Makefile.am @@ -23,6 +23,9 @@ LDADD = \ $(GTK_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/imagemap/Makefile.am b/plug-ins/imagemap/Makefile.am index e295c8e0f2..e6ef6a1144 100644 --- a/plug-ins/imagemap/Makefile.am +++ b/plug-ins/imagemap/Makefile.am @@ -173,6 +173,9 @@ LDADD = \ $(GTK_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/script-fu/Makefile.am b/plug-ins/script-fu/Makefile.am index 6daebe13e3..fbd0bc4d61 100644 --- a/plug-ins/script-fu/Makefile.am +++ b/plug-ins/script-fu/Makefile.am @@ -41,7 +41,8 @@ LDADD = \ $(INTLLIBS) AM_CPPFLAGS = \ - -DREGEX_MALLOC + -DREGEX_MALLOC \ + -DLOCALEDIR=\""$(localedir)"\" .PHONY: files diff --git a/plug-ins/sinus/Makefile.am b/plug-ins/sinus/Makefile.am index 1332f8f4d9..bf41a8a37c 100644 --- a/plug-ins/sinus/Makefile.am +++ b/plug-ins/sinus/Makefile.am @@ -19,6 +19,9 @@ LDADD = \ $(GTK_LIBS) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/plug-ins/xjt/Makefile.am b/plug-ins/xjt/Makefile.am index 5dd78c8182..5909e42f5e 100644 --- a/plug-ins/xjt/Makefile.am +++ b/plug-ins/xjt/Makefile.am @@ -25,6 +25,9 @@ LDADD = \ $(LIBJPEG) \ $(INTLLIBS) +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" + .PHONY: files files: diff --git a/po-plug-ins/POTFILES.in b/po-plug-ins/POTFILES.in index dee26d2ee4..07774f6382 100644 --- a/po-plug-ins/POTFILES.in +++ b/po-plug-ins/POTFILES.in @@ -168,6 +168,7 @@ plug-ins/gdyntext/gdyntext_ui.c plug-ins/gdyntext/message_window.c plug-ins/gfig/gfig.c plug-ins/gflare/gflare.c +plug-ins/gfli/gfli.c plug-ins/gimpressionist/brush.c plug-ins/gimpressionist/color.c plug-ins/gimpressionist/general.c