Commit f0dfd314 authored by Marc Lehmann's avatar Marc Lehmann
Browse files

see plug-ins/perl/Changes

parent 3ce38aa0
......@@ -6,6 +6,9 @@ Revision history for Gimp-Perl extension.
called.
- started to revamp the extra argument handling.
- updated PDB Explorer a bit, still broken.
- started i18n.
- put help window into a scrolledwindow, as to a suggestion by Jens
Lauterbach. Karlsruhe rules!
1.13 Wed Sep 8 02:55:43 CEST 1999
- removed some glib-1.1 compatibility cruft.
......
......@@ -2,12 +2,12 @@ package Gimp;
use strict 'vars';
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD %EXPORT_TAGS @EXPORT_FAIL
@_consts @_procs $interface_pkg $interface_type @_param @_al_consts
$interface_pkg $interface_type
@PREFIXES $_PROT_VERSION
@gimp_gui_functions $function $basename $spawn_opts
$in_quit $in_run $in_net $in_init $in_query $no_SIG
$help $verbose $host $in_top);
use subs qw(init end lock unlock canonicalize_color);
use subs qw(init end lock unlock canonicalize_color __);
require DynaLoader;
......@@ -15,7 +15,7 @@ require DynaLoader;
$VERSION = 1.14;
@_param = qw(
my @_param = qw(
PARAM_BOUNDARY PARAM_CHANNEL PARAM_COLOR PARAM_DISPLAY PARAM_DRAWABLE
PARAM_END PARAM_FLOAT PARAM_IMAGE PARAM_INT32 PARAM_FLOATARRAY
PARAM_INT16 PARAM_PARASITE PARAM_STRING PARAM_PATH PARAM_INT16ARRAY
......@@ -24,7 +24,7 @@ $VERSION = 1.14;
);
# constants that, in some earlier version, were autoloaded
@_consts = (@_param,
my @_consts = (@_param,
#ENUM_NAME#
'PRESSURE', 'SOFT', 'HARD', 'RGBA_IMAGE', 'INDEXED_IMAGE', 'GRAYA_IMAGE', 'RGB_IMAGE',
'INDEXEDA_IMAGE', 'GRAY_IMAGE', 'CUSTOM', 'FG_BG_HSV', 'FG_TRANS', 'FG_BG_RGB', 'BLUE_CHANNEL',
......@@ -68,8 +68,6 @@ sub ORIENTATION_HORIZONTAL () { &HORIZONTAL }
sub ORIENTATION_VERTICAL () { &VERTICAL }
sub ORIENTATION_UNKNOWN () { &UNKNOWN }
@_procs = ('main','xlfd_size');
bootstrap Gimp $VERSION;
#ENUM_DEFS#
......@@ -125,17 +123,18 @@ sub croak {
goto &Carp::croak;
}
my @_procs = ('main', 'xlfd_size', '__');
my @_default = (@_procs, ':consts' ,':_auto2');
# we really abuse the import facility..
sub import($;@) {
my $pkg = shift;
my $up = caller;
my @export;
# make a quick but dirty guess ;)
@_=(@_procs,':consts',':_auto2') unless @_;
@_=@_default unless @_;
for(@_) {
for(map { $_ eq ":DEFAULT" ? @_default : $_ } @_) {
if ($_ eq ":auto") {
push(@export,@_consts,@_procs);
*{"$up\::AUTOLOAD"} = sub {
......@@ -147,8 +146,8 @@ sub import($;@) {
} elsif ($_ eq ":_auto2") {
push(@export,@_consts,@_procs);
*{"$up\::AUTOLOAD"} = sub {
warn "$function: calling $AUTOLOAD without specifying the :auto import tag is deprecated!\n";
croak "Cannot call '$AUTOLOAD' at this time" unless initialized();
warn __"$function: calling $AUTOLOAD without specifying the :auto import tag is deprecated!\n";
croak __"Cannot call '$AUTOLOAD' at this time" unless initialized();
my ($class,$name) = $AUTOLOAD =~ /^(.*)::(.*?)$/;
*{$AUTOLOAD} = sub { Gimp->$name(@_) };
goto &$AUTOLOAD;
......@@ -158,7 +157,7 @@ sub import($;@) {
} elsif ($_ eq ":param") {
push(@export,@_param);
} elsif (/^interface=(\S+)$/) {
croak "interface=... tag is no longer supported\n";
croak __"interface=... tag is no longer supported\n";
} elsif ($_=~/spawn_options=(\S+)/) {
$spawn_opts = $1;
} elsif ($_ ne "") {
......@@ -166,7 +165,7 @@ sub import($;@) {
} elsif ($_ eq "") {
#nop #d#FIXME, Perl-Server requires this!
} else {
croak "$_ is not a valid import tag for package $pkg";
croak __"$_ is not a valid import tag for package $pkg";
}
}
......@@ -221,7 +220,7 @@ sub canonicalize_colour {
} else {
unless (%rgb_db) {
if ($rgb_db_path) {
open RGB_TEXT,"<$rgb_db_path" or croak "unable to open $rgb_db_path";
open RGB_TEXT,"<$rgb_db_path" or croak __"unable to open $rgb_db_path";
} else {
*RGB_TEXT=*DATA;
}
......@@ -234,7 +233,7 @@ sub canonicalize_colour {
if ($rgb_db{lc($_[0])}) {
return $rgb_db{lc($_[0])};
} else {
croak "Unable to grok '".join(",",@_),"' as colour specifier";
croak sprintf __"Unable to grok '%s' as colour specifier", join(",",@_);
}
}
}
......@@ -262,15 +261,14 @@ if (@ARGV) {
$_=shift(@ARGV);
if (/^-h$|^--?help$|^-\?$/) {
$help=1;
print <<EOF;
Usage: $0 [gimp-args..] [interface-args..] [script-args..]
print __"Usage: $0 [gimp-args..] [interface-args..] [script-args..]
gimp-arguments are
-gimp <anything> used internally only
-h | -help | --help | -? print some help
-v | --verbose be more verbose in what you do
--host|--tcp HOST[:PORT] connect to HOST (optionally using PORT)
(for more info, see Gimp::Net(3))
EOF
";
} elsif (/^-v$|^--verbose$/) {
$verbose++;
} elsif (/^--host$|^--tcp$/) {
......@@ -302,7 +300,7 @@ sub _initialized_callback {
require Gimp::Compat;
$compat_gimp_version[0] == $Gimp::Compat::max_gimp_version[0]
&& $compat_gimp_version[1] == $Gimp::Compat::max_gimp_version[1]
or die "FATAL: Gimp::Compat version mismatch\n";
or die __"FATAL: Gimp::Compat version mismatch\n";
}
}
if (@log) {
......@@ -355,7 +353,7 @@ unless($no_SIG) {
unless ($in_quit) {
warn $_[0];
} else {
logger(message => substr($_[0],0,-1), fatal => 0, function => 'WARNING');
logger(message => substr($_[0],0,-1), fatal => 0, function => __"WARNING");
}
};
}
......@@ -373,7 +371,7 @@ sub call_callback {
} elsif (UNIVERSAL::can($caller,$cb)) {
&{"$caller\::$cb"};
} else {
die_msg "required callback '$cb' not found\n" if $req;
die_msg __"required callback '$cb' not found\n" if $req;
}
}
......@@ -422,7 +420,7 @@ if ($interface_type=~/^lib$/i) {
} elsif ($interface_type=~/^net$/i) {
$interface_pkg="Gimp::Net";
} else {
croak "interface '$interface_type' unsupported.";
croak __"interface '$interface_type' unsupported.";
}
eval "require $interface_pkg" or croak "$@";
......@@ -503,7 +501,7 @@ sub AUTOLOAD {
goto &$AUTOLOAD;
}
}
croak "function/macro \"$name\" not found in $class";
croak __"function/macro \"$name\" not found in $class";
}
sub _pseudoclass {
......@@ -638,9 +636,14 @@ All constants from gimpenums.h (BG_IMAGE_FILL, RUN_NONINTERACTIVE, NORMAL_MODE,
Set default spawn options to I<options>, see L<Gimp::Net>.
=item _:DEFAULT
The default set (see below).
=back
The default (unless '' is specified) is C<main xlfd_size :consts>.
The default (unless '' is specified) is C<main xlfd_size :consts __>.
(C<__> is used for i18n purposes).
=head1 GETTING STARTED
......
#include "config.h"
#include "perl-intl.h"
#include <libgimp/gimp.h>
/*#include <locale.h>*//*notyet*//*D*/
/* FIXME */
/* sys/param.h is redefining these! */
#undef MIN
......@@ -37,6 +40,9 @@ MODULE = Gimp PACKAGE = Gimp
PROTOTYPES: ENABLE
BOOT:
/*setlocale (LC_MESSAGES, "");*//* done by perl *//*notyet*//*D*/
void
_exit()
CODE:
......@@ -49,6 +55,28 @@ _exit()
#endif
abort();
char *
bindtextdomain(d,dir)
char * d
char * dir
char *
textdomain(d)
char * d
char *
gettext(s)
char * s
char *
dgettext(d,s)
char * d
char * s
char *
__(s)
char * s
void
xs_exit(status)
int status
......
......@@ -45,7 +45,7 @@ package Gimp::Compat;
$VERSION=$Gimp::VERSION;
use Gimp 'croak';
use Gimp ('croak', '__');
# as a failsafe check, lowest version NOT requiring this module
@max_gimp_version = (1,1);
......@@ -85,7 +85,7 @@ sub xlfd_unpack {
-$p
-($p) (?# rgstry )
-($p) (?# encdng )
/x or die "xlfd_unpack: unmatched XLFD '$fontname'\n";
/x or die __"xlfd_unpack: unmatched XLFD '$fontname'\n";
my $size;
if ($pixelsize && $pixelsize ne "*") {
......@@ -142,5 +142,3 @@ fun 1,1,gimp_paintbrush,sub {
1;
package Gimp::Fu;
use Gimp 'croak';
use Gimp ('croak', '__');
use Gimp::Data;
use File::Basename;
......@@ -178,10 +178,10 @@ sub interact {
if ($@) {
my @res = map {
die "the gtk perl module is required to run\nthis plug-in in interactive mode\n" unless defined $_->[3];
die __"the gtk perl module is required to run\nthis plug-in in interactive mode\n" unless defined $_->[3];
$_->[3];
} @types;
Gimp::logger(message => "the gtk perl module is required to open a dialog\nwindow, running with default values",
Gimp::logger(message => __"the gtk perl module is required to open a dialog\nwindow, running with default values",
fatal => 1, function => $function);
return (1,@res);
}
......@@ -213,7 +213,7 @@ sub this_script {
return $this if lc($exe) eq lc($fun);
push(@names,$fun);
}
die "function '$exe' not found in this script (must be one of ".join(", ",@names).")\n";
die __"function '$exe' not found in this script (must be one of ".join(", ",@names).")\n";
}
my $latest_image;
......@@ -236,7 +236,7 @@ sub string2pf($$) {
|| $type==PF_SLIDER
|| $type==PF_SPINNER
|| $type==PF_ADJUSTMENT) {
die "$s: not an integer\n" unless $s==int($s);
die __"$s: not an integer\n" unless $s==int($s);
$s*1;
} elsif($type==PF_FLOAT) {
$s*1;
......@@ -246,7 +246,7 @@ sub string2pf($$) {
$s?1:0;
#} elsif($type==PF_IMAGE) {
} else {
die "conversion to type $pf_type2string{$type} is not yet implemented\n";
die __"conversion to type $pf_type2string{$type} is not yet implemented\n";
}
}
......@@ -291,7 +291,7 @@ Gimp::on_net {
} else {
my $arg=shift @ARGV;
my $idx=$map{$1};
die "$_: illegal switch, try $0 --help\n" unless defined($idx);
die __"$_: illegal switch, try $0 --help\n" unless defined($idx);
$args[$idx]=string2pf($arg,$params->[$idx]);
$interact--;
}
......@@ -306,7 +306,7 @@ Gimp::on_net {
next if defined $args[$i];
my $entry = $params->[$i];
$args[$i] = $entry->[3]; # Default value
die "parameter '$entry->[1]' is not optional\n" unless defined $args[$i] || $interact>0;
die __"parameter '$entry->[1]' is not optional\n" unless defined $args[$i] || $interact>0;
}
# Go for it
......@@ -638,24 +638,26 @@ sub register($$$$$$$$$;@) {
} elsif (/^<None>/) {
$type = &Gimp::PROC_EXTENSION;
} else {
die "menupath _must_ start with <Image>, <Toolbox>, <Load>, <Save> or <None>!";
die __"menupath _must_ start with <Image>, <Toolbox>, <Load>, <Save> or <None>!";
}
}
s%^<Toolbox>/Xtns%__("<Toolbox>/Xtns")%e;
s%^<Image>/Filters%__("<Image>/Filters")%e;
undef $menupath if $menupath eq "<None>";#d#
@_==0 or die "register called with too many or wrong arguments\n";
@_==0 or die __"register called with too many or wrong arguments\n";
for my $p (@$params,@$results) {
next unless ref $p;
int($p->[0]) eq $p->[0] or croak "$function: argument/return value '$p->[1]' has illegal type '$p->[0]'";
$p->[1]=~/^[0-9a-z_]+$/ or carp "$function: argument name '$p->[1]' contains illegal characters, only 0-9, a-z and _ allowed";
int($p->[0]) eq $p->[0] or croak __"$function: argument/return value '$p->[1]' has illegal type '$p->[0]'";
$p->[1]=~/^[0-9a-z_]+$/ or carp __"$function: argument name '$p->[1]' contains illegal characters, only 0-9, a-z and _ allowed";
}
$function="perl_fu_".$function unless $function =~ /^(?:perl_fu_|extension_|plug_in_|file_)/ || $function =~ s/^\+//;
$function=~/^[0-9a-z_]+(-ALT)?$/ or carp "$function: function name contains unusual characters, good style is to use only 0-9, a-z and _";
$function=~/^[0-9a-z_]+(-ALT)?$/ or carp __"$function: function name contains unusual characters, good style is to use only 0-9, a-z and _";
Gimp::logger message => "function name contains dashes instead of underscores",
Gimp::logger message => __"function name contains dashes instead of underscores",
function => $function, fatal => 0
if $function =~ y/-//;
......@@ -676,18 +678,18 @@ sub register($$$$$$$$$;@) {
for($menupath) {
if (/^<Image>\//) {
@_ >= 2 or die "<Image> plug-in called without both image and drawable arguments!\n";
@_ >= 2 or die __"<Image> plug-in called without both image and drawable arguments!\n";
@pre = (shift,shift);
} elsif (/^<Toolbox>\// or !defined $menupath) {
# valid ;)
} elsif (/^<Load>\//) {
@_ >= 2 or die "<Load> plug-in called without the 3 standard arguments!\n";
@_ >= 2 or die __"<Load> plug-in called without the 3 standard arguments!\n";
@pre = (shift,shift);
} elsif (/^<Save>\//) {
@_ >= 4 or die "<Save> plug-in called without the 5 standard arguments!\n";
@_ >= 4 or die __"<Save> plug-in called without the 5 standard arguments!\n";
@pre = (shift,shift,shift,shift);
} elsif (defined $_) {
die "menupath _must_ start with <Image>, <Toolbox>, <Load>, <Save> or <None>!";
die __"menupath _must_ start with <Image>, <Toolbox>, <Load>, <Save> or <None>!";
}
}
if ($run_mode == &Gimp::RUN_INTERACTIVE
......@@ -720,7 +722,7 @@ sub register($$$$$$$$$;@) {
} elsif ($run_mode == &Gimp::RUN_NONINTERACTIVE) {
# nop
} else {
die "run_mode must be INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS\n";
die __"run_mode must be INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS\n";
}
$input_image = $_[0] if ref $_[0] eq "Gimp::Image";
$input_image = $pre[0] if ref $pre[0] eq "Gimp::Image";
......@@ -751,7 +753,7 @@ sub register($$$$$$$$$;@) {
$img->display_new unless $input_image && $$img == $$input_image;
}
} elsif (!@$retvals) {
warn "WARNING: $function returned something that is not an image: \"$img\"\n";
warn __"WARNING: $function returned something that is not an image: \"$img\"\n";
}
}
}
......@@ -833,7 +835,7 @@ sub save_image($$) {
$smooth=$1 eq "+", next if s/^([-+])[sS]//;
$quality=$1*0.01, next if s/^-[qQ](\d+)//;
$compress=$1, next if s/^-[cC](\d+)//;
croak "$_: unknown/illegal file-save option";
croak __"$_: unknown/illegal file-save option";
}
$flatten=(()=$img->get_layers)>1 unless defined $flatten;
......@@ -871,12 +873,11 @@ sub main {
$old_trace = Gimp::set_trace (0);
if ($Gimp::help) {
my $this=this_script;
print <<EOF;
interface-arguments are
print __" interface-arguments are
-o | --output <filespec> write image to disk, don't display
-i | --interact let the user edit the values first
script-arguments are
EOF
";
print_switches ($this);
} else {
Gimp::main;
......
......@@ -15,11 +15,11 @@ use subs qw(
);
sub gimp_init {
Gimp::croak "gimp_init not implemented for the Lib interface";
Gimp::croak Gimp::_("gimp_init not implemented for the Lib interface");
}
sub gimp_end {
Gimp::croak "gimp_end not implemented for in the Lib interface";
Gimp::croak Gimp::_("gimp_end not implemented for in the Lib interface");
}
sub lock {
......
#include "config.h"
#include "../perl-intl.h"
#include <assert.h>
#include <stdio.h>
......@@ -120,13 +121,13 @@ static void old_pdl (pdl **p, short ndims, int dim0)
PDL->converttype (p, PDL_B, PDL_PERM);
if ((*p)->ndims < ndims + (dim0 > 1))
croak ("dimension mismatch, pdl has dimension %d but at least %d dimensions allowed", (*p)->ndims, ndims + (dim0 > 1));
croak (__("dimension mismatch, pdl has dimension %d but at least %d dimensions allowed"), (*p)->ndims, ndims + (dim0 > 1));
if ((*p)->ndims > ndims + 1)
croak ("dimension mismatch, pdl has dimension %d but at most %d dimensions required", (*p)->ndims, ndims + 1);
croak (__("dimension mismatch, pdl has dimension %d but at most %d dimensions required"), (*p)->ndims, ndims + 1);
if ((*p)->ndims > ndims && (*p)->dims[0] != dim0)
croak ("pixel size mismatch, pdl has %d channel pixels but %d channels are required", (*p)->dims[0], dim0);
croak (__("pixel size mismatch, pdl has %d channel pixels but %d channels are required"), (*p)->dims[0], dim0);
}
static void pixel_rgn_pdl_delete_data (pdl *p, int param)
......@@ -216,7 +217,7 @@ static SV *new_gdrawable (gint32 id)
GDrawable *gdr = gimp_drawable_get (id);
if (!gdr)
croak ("unable to convert Gimp::Drawable into Gimp::GDrawable (id %d)", id);
croak (__("unable to convert Gimp::Drawable into Gimp::GDrawable (id %d)"), id);
if (!stash)
stash = gv_stashpv (PKG_GDRAWABLE, 1);
......@@ -234,7 +235,7 @@ static SV *new_gdrawable (gint32 id)
static GDrawable *old_gdrawable (SV *sv)
{
if (!(sv_derived_from (sv, PKG_GDRAWABLE)))
croak ("argument is not of type " PKG_GDRAWABLE);
croak (__("argument is not of type %s"), PKG_GDRAWABLE);
/* the next line lacks any type of checking. */
return (GDrawable *)SvIV(SvRV(sv));
......@@ -257,7 +258,7 @@ SV *new_tile (GTile *tile, SV *gdrawable)
static GTile *old_tile (SV *sv)
{
if (!sv_derived_from (sv, PKG_TILE))
croak ("argument is not of type " PKG_TILE);
croak (__("argument is not of type %s"), PKG_TILE);
/* the next line lacks any type of checking. */
return (GTile *)SvIV(*(hv_fetch ((HV*)SvRV(sv), "_tile", 5, 0)));
......@@ -289,7 +290,7 @@ static SV *new_gpixelrgn (SV *gdrawable, int x, int y, int width, int height, in
|| sv_derived_from (gdrawable, PKG_CHANNEL))
gdrawable = sv_2mortal (new_gdrawable (SvIV (SvRV (gdrawable))));
else
croak ("argument is not of type " PKG_GDRAWABLE);
croak (__("argument is not of type %s"), PKG_GDRAWABLE);
}
if (!stash)
......@@ -306,7 +307,7 @@ static SV *new_gpixelrgn (SV *gdrawable, int x, int y, int width, int height, in
static GPixelRgn *old_pixelrgn (SV *sv)
{
if (!sv_derived_from (sv, PKG_PIXELRGN))
croak ("argument is not of type " PKG_PIXELRGN);
croak (__("argument is not of type %s"), PKG_PIXELRGN);
return (GPixelRgn *)SvPV_nolen(SvRV(sv));
}
......@@ -416,7 +417,7 @@ perl_paramdef_count (GParamDef *arg, int count)
j < args[index-1].data.d_int32 - 1 ? ", " : ""); \
} \
else \
trace_printf ("(UNINITIALIZED)"); \
trace_printf (__("(UNINITIALIZED)")); \
trace_printf ("]"); \
}
......@@ -503,10 +504,10 @@ dump_params (int nparams, GParam *args, GParamDef *params)
trace_printf ("%d", args[i].data.d_parasite.flags & ~found);
}
trace_printf (", %d bytes data]", args[i].data.d_parasite.size);
trace_printf (__(", %d bytes data]"), args[i].data.d_parasite.size);
}
else
trace_printf ("[undefined]");
trace_printf (__("[undefined]"));
}
break;
#endif
......@@ -576,7 +577,7 @@ convert_array2paramdef (AV *av, GParamDef **res)
count += 1 + !!is_array (SvIV (type));
}
else
croak ("malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE");
croak (__("malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE"));
}
if (def)
......@@ -663,10 +664,10 @@ unbless (SV *sv, char *type, char *croak_str)
if (SvTYPE (SvRV (sv)) == SVt_PVMG)
return SvIV (SvRV (sv));
else
strcpy (croak_str, "only blessed scalars accepted here");
strcpy (croak_str, __("only blessed scalars accepted here"));
}
else
sprintf (croak_str, "argument type %s expected (not %s)", type, HvNAME(SvSTASH(SvRV(sv))));
sprintf (croak_str, __("argument type %s expected (not %s)"), type, HvNAME(SvSTASH(SvRV(sv))));
else
return SvIV (sv);
......@@ -701,7 +702,7 @@ canonicalize_colour (char *err, SV *sv, GParamColor *c)
PUTBACK;
if (perl_call_pv ("Gimp::canonicalize_colour", G_SCALAR) != 1)
croak ("canonicalize_colour did not return a value!");
croak (__("FATAL: canonicalize_colour did not return a value!"));
SPAGAIN;
......@@ -718,13 +719,13 @@ canonicalize_colour (char *err, SV *sv, GParamColor *c)
c->blue = SvIV(*av_fetch(av, 2, 0));
}
else
sprintf (err, "a color must have three components (array elements)");
sprintf (err, __("a color must have three components (array elements)"));
}
else
sprintf (err, "illegal type for colour specification");
sprintf (err, __("illegal type for colour specification"));
}
else
sprintf (err, "unable to grok colour specification");
sprintf (err, __("unable to grok colour specification"));
PUTBACK;
FREETMPS;
......@@ -747,7 +748,7 @@ static void check_for_typoe (char *croak_str, char *p)
return;
gotit:
sprintf (croak_str, "Expected an INT32 but got '%s'. Maybe you meant '%s' instead and forgot to 'use strict'", p, b);
sprintf (croak_str, __("Expected an INT32 but got '%s'. Maybe you meant '%s' instead and forgot to 'use strict'"), p, b);
}
/* check for 'enumeration types', i.e. integer constants. do not allow
......@@ -763,7 +764,7 @@ static int check_int (char *croak_str, SV *sv)
&& *p != '5' && *p != '6' && *p != '7' && *p != '8' && *p != '9'
&& *p != '-')
{
sprintf (croak_str, "Expected an INT32 but got '%s'. Add '*1' if you really intend to pass in a string", p);
sprintf (croak_str, __("Expected an INT32 but got '%s'. Add '*1' if you really intend to pass in a string"), p);
check_for_typoe (croak_str, p);
return 0;
}
......@@ -874,7 +875,7 @@ push_gimp_sv (GParam *arg, int array_as_ref)
case PARAM_STRINGARRAY: push_gimp_av (arg, d_stringarray, neuSVpv, array_as_ref); break;
default:
croak ("dunno how to return param type %d", arg->type);
croak (__("dunno how to return param type %d"), arg->type);
}
if (sv)
......@@ -898,7 +899,7 @@ push_gimp_sv (GParam *arg, int array_as_ref)
} \
else \
{ \
sprintf (croak_str, "perl-arrayref required as datatype for a gimp-array"); \
sprintf (croak_str, __("perl-arrayref required as datatype for a gimp-array")); \
arg->data.datatype = 0; \
} \
}
......@@ -906,7 +907,7 @@ push_gimp_sv (GParam *arg, int array_as_ref)
#define sv2gimp_extract_noref(fun,str) \
fun(sv); \
if (SvROK(sv)) \
sprintf (croak_str, "Unable to convert a reference to type '%s'", str); \
sprintf (croak_str, __("Unable to convert a reference to type '%s'"), str); \
break;
/*
* convert a perl scalar into a GParam, return true if
......@@ -957,7 +958,7 @@ convert_sv2gimp (char *croak_str, GParam *arg, SV *sv)
arg->data.d_image = unbless(sv, PKG_IMAGE , croak_str); break;
}
else
strcpy (croak_str, "argument incompatible with type IMAGE");
strcpy (croak_str, __("argument incompatible with type IMAGE"));
return 0;
}
......@@ -999,13 +1000,13 @@ convert_sv2gimp (char *croak_str, GParam *arg, SV *sv)
arg->data.d_parasite.data = SvPV(*av_fetch(av, 2, 0), arg->data.d_parasite.size);
}
else
sprintf (croak_str, "illegal parasite specification, expected three array members");
sprintf (croak_str, __("illegal parasite specification, expected three array members"));
}
else
sprintf (croak_str, "illegal parasite specification, arrayref expected");
sprintf (croak_str, __("illegal parasite specification, arrayref expected"));
}
else