diff options
| author | fukachan <fukachan> | 2003-09-27 06:55:11 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-09-27 06:55:11 +0000 |
| commit | bf0092406e12134ad80e52991833ee6dfd61420c (patch) | |
| tree | 88dff818fc954804ba9e684abf639ca208995430 /fml/lib/FML/Process | |
| parent | 6abf021c5974fcff85799c55d2deb18fc488040d (diff) | |
| download | fml8-bf0092406e12134ad80e52991833ee6dfd61420c.tar.gz fml8-bf0092406e12134ad80e52991833ee6dfd61420c.tar.bz2 fml8-bf0092406e12134ad80e52991833ee6dfd61420c.zip | |
make message_nl() handle enable language translation
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index bf754a62..194021c1 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Kernel.pm,v 1.181 2003/09/14 04:05:46 fukachan Exp $ +# $FML: Kernel.pm,v 1.182 2003/09/19 13:30:34 tmu Exp $ # package FML::Process::Kernel; @@ -1679,7 +1679,7 @@ sub message_nl my $buf = ''; use File::Spec; - $class =~ s@\.@/@g; # XXX replace the first "." only + $class =~ s@\.@/@g; # XXX . -> / my $local_file = File::Spec->catfile($local_dir, $charset, $class); my $file = File::Spec->catfile($dir, $charset, $class); @@ -1701,7 +1701,14 @@ sub message_nl $curproc->logwarn("no such file: $file"); } - return $buf; + if (defined $buf) { + my $config = $curproc->config(); + if ($buf =~ /\$/o) { + $config->expand_variable_in_buffer(\$buf, $args); + } + } + + return( $buf || $default_msg || '' ); } |
