summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-08-14 04:21:08 +0000
committerfukachan <fukachan>2002-08-14 04:21:08 +0000
commit3dad2806385e73c7a0ba5ca97ab5de9c18f1b8a7 (patch)
tree143c4a1684a6796d7052fe089e9a71a5228728eb /fml/lib
parentf58276939fe963f45c9d803ec182e0815e573eda (diff)
downloadfml8-3dad2806385e73c7a0ba5ca97ab5de9c18f1b8a7.tar.gz
fml8-3dad2806385e73c7a0ba5ca97ab5de9c18f1b8a7.tar.bz2
fml8-3dad2806385e73c7a0ba5ca97ab5de9c18f1b8a7.zip
enable ml local message template handling
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Process/Kernel.pm18
1 files changed, 13 insertions, 5 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index dd7b00f0..2c70048f 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.124 2002/08/08 03:09:48 fukachan Exp $
+# $FML: Kernel.pm,v 1.125 2002/08/14 03:31:56 fukachan Exp $
#
package FML::Process::Kernel;
@@ -1201,14 +1201,22 @@ sub reply_message_nl
sub message_nl
{
my ($curproc, $class, $default_msg, $args) = @_;
- my $config = $curproc->{ config };
- my $dir = $config->{ message_template_dir };
- my $buf = '';
+ my $config = $curproc->{ config };
+ my $dir = $config->{ message_template_dir };
+ my $local_dir = $config->{ ml_local_message_template_dir };
+ my $charset = $config->{ template_file_charset } || 'en';
+ my $buf = '';
use File::Spec;
$class =~ s@\.@/@g; # XXX replace the first "." only
- my $file = File::Spec->catfile($dir, $class);
+ my $local_file = File::Spec->catfile($local_dir, $charset, $class);
+ my $file = File::Spec->catfile($dir, $charset, $class);
+
+ # override message: replace default one with ml local message template
+ if (-f $local_file) { $file = $local_file;}
+
+ # import message template
if (-f $file) {
use FileHandle;
my $fh = new FileHandle $file;