Commit d62c9bb1 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Additional fixes for PR #1095 (Improve MHonArc resource file) under #1091

  - Update POTFILES for changing name of a file
  - Update xgettext.pl for the new tags
parent 249bae41
......@@ -10,7 +10,7 @@ cpanfile
src/cgi/*.fcgi.in
default/web_tt2/*.tt2
default/mail_tt2/*.tt2
default/mhonarc-ressources.tt2
default/mhonarc_rc.tt2
default/topics.conf
default/scenari/*
doc/samples/intranet/scenari/*
......
......@@ -208,7 +208,8 @@ foreach my $file (@ordered_files) {
&add_expression($expression);
}
# Template Toolkit with ($tag$%|loc%$tag$)...($tag$%END%$tag$) in archives
# Template Toolkit with ($tag$%|loc%$tag$)...($tag$%END%$tag$) in
# mhonarc-ressources.tt2 (<=6.2.60; OBSOLETED)
$line = 1;
pos($_) = 0;
while (
......@@ -229,6 +230,30 @@ foreach my $file (@ordered_files) {
&add_expression($expression);
}
# Template Toolkit with <%|loc%>...<%END%> in mhonarc_rc.tt2 (6.2.61b.1 or
# later)
if ($file eq 'default/mhonarc_rc.tt2') {
$line = 1;
pos($_) = 0;
while (
m!\G.*?<%\s*\|($available_tags)(.*?)\s*%>(.*?)<%[-=~+]?\s*END\s*[-=~+]?%>!sg
) {
my ($this_tag, $vars, $str) = ($1, $2, $3);
$line += (() = ($& =~ /\n/g)); # cryptocontext!
$str =~ s/\\\'/\'/g;
$vars =~ s/^\s*\(//;
$vars =~ s/\)\s*$//;
my $expression = {
'expression' => $str,
'filename' => $filename,
'line' => $line,
'vars' => $vars
};
$expression->{'type'} = 'date' if ($this_tag eq 'locdt');
&add_expression($expression);
}
}
# Sympa variables (gettext_comment, gettext_id and gettext_unit)
$line = 1;
pos($_) = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment