summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-09-27 06:55:11 +0000
committerfukachan <fukachan>2003-09-27 06:55:11 +0000
commitbf0092406e12134ad80e52991833ee6dfd61420c (patch)
tree88dff818fc954804ba9e684abf639ca208995430 /fml/lib/FML/Process
parent6abf021c5974fcff85799c55d2deb18fc488040d (diff)
downloadfml8-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.pm13
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 || '' );
}