From 6c674e3570221c96734f94967ad55f50560bee54 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 22 Jan 2018 14:36:15 -0800 Subject: [PATCH] Switch from Text::Template to Text::Xslate - Text::Xslate uses a different format (see Text::Xslate::Syntax::Kolon) - It's significantly faster than Text::Template (and faster than most every other templating system I've used. --- Debbugs/Text.pm | 238 +++++++++--------- scripts/process | 16 +- scripts/service | 17 +- templates/en_US/cgi/bugreport.tmpl | 50 ---- templates/en_US/cgi/bugreport.tx | 48 ++++ templates/en_US/cgi/bugreport_buginfo.tmpl | 79 ------ templates/en_US/cgi/bugreport_buginfo.tx | 54 ++++ templates/en_US/cgi/bugreport_pkginfo.tmpl | 31 --- templates/en_US/cgi/bugreport_pkginfo.tx | 27 ++ templates/en_US/cgi/no_such_bug.tmpl | 9 - templates/en_US/cgi/no_such_bug.tx | 9 + templates/en_US/cgi/pkgindex.tmpl | 32 --- templates/en_US/cgi/pkgindex.tx | 29 +++ ...avascript.tmpl => pkgreport_javascript.tx} | 126 +++++----- templates/en_US/cgi/pkgreport_options.tmpl | 85 ------- templates/en_US/cgi/pkgreport_options.tx | 80 ++++++ .../pkgreport_options_include_exclude.tmpl | 16 -- .../cgi/pkgreport_options_include_exclude.tx | 5 + ... pkgreport_options_include_exclude_key.tx} | 9 +- .../cgi/pkgreport_options_search_key.tmpl | 6 - .../en_US/cgi/pkgreport_options_search_key.tx | 5 + templates/en_US/cgi/{quit.tmpl => quit.tx} | 2 +- templates/en_US/cgi/short_bug_status.tmpl | 157 ------------ templates/en_US/cgi/short_bug_status.tx | 135 ++++++++++ templates/en_US/html/html_tail.tmpl | 20 -- templates/en_US/html/html_tail.tx | 21 ++ .../html/{post_title.tmpl => post_title.tx} | 2 +- templates/en_US/html/pre_title.tmpl | 3 - templates/en_US/html/pre_title.tx | 3 + ..._control.tmpl => excluded_from_control.tx} | 0 ...l_message.tmpl => fake_control_message.tx} | 10 +- templates/en_US/mail/footer.tmpl | 11 - templates/en_US/mail/footer.tx | 6 + ...rd_maintonly.tmpl => forward_maintonly.tx} | 0 ...{forward_normal.tmpl => forward_normal.tx} | 0 ...rd_veryquiet.tmpl => forward_veryquiet.tx} | 2 +- .../en_US/mail/{header.tmpl => header.tx} | 0 templates/en_US/mail/invalid_maintainer.tmpl | 9 - templates/en_US/mail/invalid_maintainer.tx | 9 + templates/en_US/mail/invalid_severity.tmpl | 5 - templates/en_US/mail/invalid_severity.tx | 5 + .../{invalid_user.tmpl => invalid_user.tx} | 2 +- ...nvalid_version.tmpl => invalid_version.tx} | 2 +- .../{maintainercc.tmpl => maintainercc.tx} | 2 +- templates/en_US/mail/message_body.tmpl | 2 - templates/en_US/mail/message_body.tx | 3 + templates/en_US/mail/process_ack.tmpl | 10 - templates/en_US/mail/process_ack.tx | 10 + ....tmpl => process_ack_thanks_additional.tx} | 2 +- .../en_US/mail/process_ack_thanks_new.tmpl | 3 - .../en_US/mail/process_ack_thanks_new.tx | 3 + ...subject.tmpl => process_broken_subject.tx} | 2 +- ...pl => process_default_package_selected.tx} | 4 +- .../en_US/mail/process_mark_as_done.tmpl | 13 - templates/en_US/mail/process_mark_as_done.tx | 13 + .../en_US/mail/process_mark_as_forwarded.tmpl | 9 - .../en_US/mail/process_mark_as_forwarded.tx | 8 + .../en_US/mail/process_no_bug_number.tmpl | 22 -- templates/en_US/mail/process_no_bug_number.tx | 22 ++ ..._no_package.tmpl => process_no_package.tx} | 14 +- .../mail/process_unknown_bug_number.tmpl | 21 -- .../en_US/mail/process_unknown_bug_number.tx | 20 ++ .../en_US/mail/process_your_bug_done.tmpl | 12 - templates/en_US/mail/process_your_bug_done.tx | 12 + ....tmpl => serious_mail_misconfiguration.tx} | 2 +- templates/en_US/mail/submitter_changed.tmpl | 13 - templates/en_US/mail/submitter_changed.tx | 13 + templates/en_US/mail/xdebbugscc.tmpl | 4 - templates/en_US/mail/xdebbugscc.tx | 4 + 69 files changed, 766 insertions(+), 852 deletions(-) delete mode 100644 templates/en_US/cgi/bugreport.tmpl create mode 100644 templates/en_US/cgi/bugreport.tx delete mode 100644 templates/en_US/cgi/bugreport_buginfo.tmpl create mode 100644 templates/en_US/cgi/bugreport_buginfo.tx delete mode 100644 templates/en_US/cgi/bugreport_pkginfo.tmpl create mode 100644 templates/en_US/cgi/bugreport_pkginfo.tx delete mode 100644 templates/en_US/cgi/no_such_bug.tmpl create mode 100644 templates/en_US/cgi/no_such_bug.tx delete mode 100644 templates/en_US/cgi/pkgindex.tmpl create mode 100644 templates/en_US/cgi/pkgindex.tx rename templates/en_US/cgi/{pkgreport_javascript.tmpl => pkgreport_javascript.tx} (65%) delete mode 100644 templates/en_US/cgi/pkgreport_options.tmpl create mode 100644 templates/en_US/cgi/pkgreport_options.tx delete mode 100644 templates/en_US/cgi/pkgreport_options_include_exclude.tmpl create mode 100644 templates/en_US/cgi/pkgreport_options_include_exclude.tx rename templates/en_US/cgi/{pkgreport_options_include_exclude_key.tmpl => pkgreport_options_include_exclude_key.tx} (58%) delete mode 100644 templates/en_US/cgi/pkgreport_options_search_key.tmpl create mode 100644 templates/en_US/cgi/pkgreport_options_search_key.tx rename templates/en_US/cgi/{quit.tmpl => quit.tx} (82%) delete mode 100644 templates/en_US/cgi/short_bug_status.tmpl create mode 100644 templates/en_US/cgi/short_bug_status.tx delete mode 100644 templates/en_US/html/html_tail.tmpl create mode 100644 templates/en_US/html/html_tail.tx rename templates/en_US/html/{post_title.tmpl => post_title.tx} (61%) delete mode 100644 templates/en_US/html/pre_title.tmpl create mode 100644 templates/en_US/html/pre_title.tx rename templates/en_US/mail/{excluded_from_control.tmpl => excluded_from_control.tx} (100%) rename templates/en_US/mail/{fake_control_message.tmpl => fake_control_message.tx} (79%) delete mode 100644 templates/en_US/mail/footer.tmpl create mode 100644 templates/en_US/mail/footer.tx rename templates/en_US/mail/{forward_maintonly.tmpl => forward_maintonly.tx} (100%) rename templates/en_US/mail/{forward_normal.tmpl => forward_normal.tx} (100%) rename templates/en_US/mail/{forward_veryquiet.tmpl => forward_veryquiet.tx} (76%) rename templates/en_US/mail/{header.tmpl => header.tx} (100%) delete mode 100644 templates/en_US/mail/invalid_maintainer.tmpl create mode 100644 templates/en_US/mail/invalid_maintainer.tx delete mode 100644 templates/en_US/mail/invalid_severity.tmpl create mode 100644 templates/en_US/mail/invalid_severity.tx rename templates/en_US/mail/{invalid_user.tmpl => invalid_user.tx} (62%) rename templates/en_US/mail/{invalid_version.tmpl => invalid_version.tx} (94%) rename templates/en_US/mail/{maintainercc.tmpl => maintainercc.tx} (61%) delete mode 100644 templates/en_US/mail/message_body.tmpl create mode 100644 templates/en_US/mail/message_body.tx delete mode 100644 templates/en_US/mail/process_ack.tmpl create mode 100644 templates/en_US/mail/process_ack.tx rename templates/en_US/mail/{process_ack_thanks_additional.tmpl => process_ack_thanks_additional.tx} (69%) delete mode 100644 templates/en_US/mail/process_ack_thanks_new.tmpl create mode 100644 templates/en_US/mail/process_ack_thanks_new.tx rename templates/en_US/mail/{process_broken_subject.tmpl => process_broken_subject.tx} (63%) rename templates/en_US/mail/{process_default_package_selected.tmpl => process_default_package_selected.tx} (56%) delete mode 100644 templates/en_US/mail/process_mark_as_done.tmpl create mode 100644 templates/en_US/mail/process_mark_as_done.tx delete mode 100644 templates/en_US/mail/process_mark_as_forwarded.tmpl create mode 100644 templates/en_US/mail/process_mark_as_forwarded.tx delete mode 100644 templates/en_US/mail/process_no_bug_number.tmpl create mode 100644 templates/en_US/mail/process_no_bug_number.tx rename templates/en_US/mail/{process_no_package.tmpl => process_no_package.tx} (64%) delete mode 100644 templates/en_US/mail/process_unknown_bug_number.tmpl create mode 100644 templates/en_US/mail/process_unknown_bug_number.tx delete mode 100644 templates/en_US/mail/process_your_bug_done.tmpl create mode 100644 templates/en_US/mail/process_your_bug_done.tx rename templates/en_US/mail/{serious_mail_misconfiguration.tmpl => serious_mail_misconfiguration.tx} (60%) delete mode 100644 templates/en_US/mail/submitter_changed.tmpl create mode 100644 templates/en_US/mail/submitter_changed.tx delete mode 100644 templates/en_US/mail/xdebbugscc.tmpl create mode 100644 templates/en_US/mail/xdebbugscc.tx diff --git a/Debbugs/Text.pm b/Debbugs/Text.pm index 1edb174..dfc1d3c 100644 --- a/Debbugs/Text.pm +++ b/Debbugs/Text.pm @@ -47,7 +47,7 @@ BEGIN { $EXPORT_TAGS{all} = [@EXPORT_OK]; } -use Text::Template; +use Text::Xslate qw(html_builder); use Storable qw(dclone); @@ -58,34 +58,84 @@ use Carp; use IO::File; use Data::Dumper; +### for %text_xslate_functions +use POSIX; +use Debbugs::CGI qw(html_escape); +use Scalar::Util; +use Debbugs::Common qw(make_list); +use Debbugs::Status; + our %tt_templates; our %filled_templates; our $language; -# This function is what is called when someone does include('foo/bar') -# {include('foo/bar')} - -sub include { - my $template = shift; - $filled_templates{$template}++; - print STDERR "include template $template language $language\n" if $DEBUG; - # Die if we're in a template loop - die "Template loop with $template" if $filled_templates{$template} > 10; - my $filled_tmpl = ''; - eval { - $filled_tmpl = fill_in_template(template => $template, - variables => {}, - language => $language, - ); - }; - if ($@) { - print STDERR "failed to fill template $template: $@"; - } - print STDERR "failed to fill template $template\n" if $filled_tmpl eq '' and $DEBUG; - print STDERR "template $template '$filled_tmpl'\n" if $DEBUG; - $filled_templates{$template}--; - return $filled_tmpl; -}; + +sub __output_select_options { + my ($options,$value) = @_; + my @options = @{$options}; + my $output = ''; + while (@options) { + my ($o_value) = shift @options; + if (ref($o_value)) { + for (@{$o_value}) { + unshift @options, + ($_,$_); + } + next; + } + my $name = shift @options; + my $selected = ''; + if (defined $value and $o_value eq $value) { + $selected = ' selected'; + } + $output .= q(\n); + } + return $output; +} + +sub __text_xslate_functions { + return + {gm_strftime => sub {POSIX::strftime($_[0],gmtime)}, + package_links => html_builder(\&Debbugs::CGI::package_links), + bug_links => html_builder(\&Debbugs::CGI::bug_links), + looks_like_number => \&Scalar::Util::looks_like_number, + isstrongseverity => \&Debbugs::Status::isstrongseverity, + secs_to_english => \&Debbugs::Common::secs_to_english, + maybelink => \&Debbugs::CGI::maybelink, + # add in a few utility routines + duplicate_array => sub { + my @r = map {($_,$_)} make_list(@{$_[0]}); + return @r; + }, + output_select_options => html_builder(\&__output_select_options), + make_list => \&make_list, + }; +} +sub __text_xslate_functions_text { + return + {bugurl => + sub{ + return "$_[0]: ". + $config{cgi_domain}.'/'. + Debbugs::CGI::bug_links(bug=>$_[0], + links_only => 1, + ); + }, + }; +} + + + +### this function removes leading spaces from line-start code strings and spaces +### before <:- and spaces after -:> +sub __html_template_prefilter { + my $text = shift; + $text =~ s/^\s+:/:/mg; + $text =~ s/((?:^:[^\n]*\n)?)\s+(<:-)/$1$2/mg; + $text =~ s/(-:>)\s+(^:|)/$1.(length($2)?"\n$2":'')/emg; + return $text; +} =head2 fill_in_template @@ -95,15 +145,14 @@ sub include { language => '..' ); -Reads a template from disk (if it hasn't already been read in) and -fills the template in. +Reads a template from disk (if it hasn't already been read in) andf +ills the template in. =cut - sub fill_in_template{ my %param = validate_with(params => \@_, - spec => {template => SCALAR|HANDLE|SCALARREF, + spec => {template => SCALAR, variables => {type => HASHREF, default => {}, }, @@ -113,106 +162,59 @@ sub fill_in_template{ output => {type => HANDLE, optional => 1, }, - safe => {type => OBJECT|UNDEF, - optional => 1, - }, hole_var => {type => HASHREF, optional => 1, }, + output_type => {type => SCALAR, + default => 'html', + }, }, ); - if ($DEBUG) { - print STDERR "fill_in_template "; - print STDERR join(" ",map {exists $param{$_}?"$_:$param{$_}":()} keys %param); - print STDERR "\n"; - } - # Get the text - my $tt_type = ''; - my $tt_source; - if (ref($param{template}) eq 'GLOB' or - ref(\$param{template}) eq 'GLOB') { - $tt_type = 'FILE_HANDLE'; - $tt_source = $param{template}; - binmode($tt_source,":encoding(UTF-8)"); - } - elsif (ref($param{template}) eq 'SCALAR') { - $tt_type = 'STRING'; - $tt_source = ${$param{template}}; - } - else { - $tt_type = 'FILE'; - $tt_source = _locate_text($param{template},$param{language}); - } - if (not defined $tt_source) { - die "Unable to find template $param{template} with language $param{language}"; - } - - $language = $param{language}; + my $output_type = $param{output_type}; + my $language = $param{language}; + my $template = $param{template}; + $template .= '.tx' unless $template =~ /\.tx$/; my $tt; - if ($tt_type eq 'FILE' and - defined $tt_templates{$tt_source} and - ($tt_templates{$tt_source}{mtime} + 60) < time and - (stat $tt_source)[9] <= $tt_templates{$tt_source}{mtime} + if (not exists $tt_templates{$output_type}{$language} or + not defined $tt_templates{$output_type}{$language} ) { - $tt = $tt_templates{$tt_source}{template}; - } - else { - my $passed_source = $tt_source; - my $passed_type = $tt_type; - if ($tt_type eq 'FILE') { - $tt_templates{$tt_source}{mtime} = - (stat $tt_source)[9]; - $passed_source = IO::File->new($tt_source,'r'); - binmode($passed_source,":encoding(UTF-8)"); - $passed_type = 'FILEHANDLE'; - } - $tt = Text::Template->new(TYPE => $passed_type, - SOURCE => $passed_source, - UNTAINT => 1, - ); - if ($tt_type eq 'FILE') { - $tt_templates{$tt_source}{template} = $tt; - } + $tt_templates{$output_type}{$language} = + Text::Xslate->new(# cache in template_cache or temp directory + cache_dir => $config{template_cache} // + File::Temp::tempdir(CLEANUP => 1), + # default to the language, but fallback to en_US + path => [$config{template_dir}.'/'.$language.'/', + $config{template_dir}.'/en_US/', + ], + suffix => '.tx', + ## use html or text specific functions + function => + ($output_type eq 'html' ? __text_xslate_functions() : + __text_xslate_functions_text()), + syntax => 'Kolon', + module => ['Text::Xslate::Bridge::Star', + 'Debbugs::Text::XslateBridge', + ], + type => $output_type, + ## use the html-specific pre_process_handler + $output_type eq 'html'? + (pre_process_handler => \&__html_template_prefilter):(), + ) + or die "Unable to create Text::Xslate"; } - if (not defined $tt) { - die "Unable to create Text::Template for $tt_type:$tt_source"; + $tt = $tt_templates{$output_type}{$language}; + my $ret = + $tt->render($template, + {time => time, + %{$param{variables}//{}}, + config => \%config, + }); + if (exists $param{output}) { + print {$param{output}} $ret; + return ''; } - my $ret = $tt->fill_in(PACKAGE => 'DTT', - HASH => {%{$param{variables}//{}}, - (map {my $t = $_; $t =~ s/^\&//; ($t => $param{hole_var}{$_})} - keys %{$param{hole_var}//{}}), - include => \&Debbugs::Text::include, - config => \%config, - }, - defined $param{output}?(OUTPUT=>$param{output}):(), - ); - if (not defined $ret) { - print STDERR $Text::Template::ERROR; - return ''; - } - if ($DEBUG) { - no strict 'refs'; - no warnings 'uninitialized'; - print STDERR "Variables for $param{template}\n"; - } - return $ret; } -sub _locate_text{ - my ($template,$language) = @_; - $template =~ s/\.tmpl$//g; - # if a language doesn't exist, use the en_US template - if (not -e $config{template_dir}.'/'.$language.'/'.$template.'.tmpl') { - $language = 'en_US'; - } - my $loc = $config{template_dir}.'/'.$language.'/'.$template.'.tmpl'; - if (not -e $loc) { - print STDERR "Unable to locate template $loc\n"; - return undef; - } - return $loc; -} - 1; diff --git a/scripts/process b/scripts/process index 91b6861..3da8f98 100755 --- a/scripts/process +++ b/scripts/process @@ -34,6 +34,7 @@ use Debbugs::Control qw(append_action_to_log); use Debbugs::Control::Service qw(valid_control control_line); use Debbugs::Recipients qw(determine_recipients); use Encode qw(encode_utf8 decode); +use List::AllUtils qw(first uniqnum); =head1 NAME @@ -1273,20 +1274,15 @@ sub fill_template{ my $variables = {config => \%config, defined($ref)?(ref => $ref):(), defined($data)?(data => $data):(), - refs => [map {exists $clonebugs{$_}?$clonebugs{$_}:$_} keys %bug_affected], + refs => [sort + uniqnum(defined($ref)?($ref):(), + map {exists $clonebugs{$_}?$clonebugs{$_}:$_} + keys %bug_affected)], %{$extra_var}, }; - my $hole_var = {'&bugurl' => - sub{"$_[0]: ". - $config{cgi_domain}.'/'. - Debbugs::CGI::bug_links(bug=>$_[0], - links_only => 1, - ); - } - }; return fill_in_template(template => $template, variables => $variables, - hole_var => $hole_var, + output_type => 'text', ); } diff --git a/scripts/service b/scripts/service index a14691a..7e4c205 100755 --- a/scripts/service +++ b/scripts/service @@ -39,7 +39,7 @@ use Debbugs::Text qw(:templates); use Scalar::Util qw(looks_like_number); -use List::AllUtils qw(first); +use List::AllUtils qw(first uniqnum); use Mail::RFC822::Address; use Encode qw(decode encode); @@ -573,20 +573,15 @@ sub fill_template{ my $variables = {config => \%config, defined($ref)?(ref => $ref):(), defined($data)?(data => $data):(), - refs => [map {exists $clonebugs{$_}?$clonebugs{$_}:$_} keys %bug_affected], + refs => [sort + uniqnum(defined($ref)?($ref):(), + map {exists $clonebugs{$_}?$clonebugs{$_}:$_} + keys %bug_affected)], %{$extra_var}, }; - my $hole_var = {'&bugurl' => - sub{"$_[0]: ". - $config{cgi_domain}.'/'. - Debbugs::CGI::bug_links(bug=>$_[0], - links_only => 1, - ); - } - }; return fill_in_template(template => $template, variables => $variables, - hole_var => $hole_var, + output_type => 'text', ); } diff --git a/templates/en_US/cgi/bugreport.tmpl b/templates/en_US/cgi/bugreport.tmpl deleted file mode 100644 index 2f0ec04..0000000 --- a/templates/en_US/cgi/bugreport.tmpl +++ /dev/null @@ -1,50 +0,0 @@ -{include(q(html/pre_title))}#{$bug_num} - {html_escape($status{subject})} - {html_escape($config{project})} {html_escape($config{bug})} report logs{include(q(html/post_title.tmpl))} - - - -

{html_escape($config{project})} {html_escape($config{bug})} report logs - -#{$bug_num}
-{html_escape($status{subject})}

-
{$version_graph}
-{include(q(cgi/bugreport_pkginfo))} -{include(q(cgi/bugreport_buginfo))} -{ my $output = ''; - if (looks_like_number($msg)) { - $output .= sprintf qq(

Full log

),html_escape(bug_links(bug=>$bug_num,links_only=>1)); - } - else { - if (not $status{archived}) { - $output .= qq(

Reply ). - qq(or subscribe ). - qq(to this bug.

\n); - } - $output .= qq(

Toggle useless messages

); - $output .= sprintf qq(

View this report as an mbox folder, ). - qq(status mbox, maintainer mbox

\n), - html_escape(bug_links(bug=>$bug_num, links_only=>1,options=>{mbox=>'yes'})), - html_escape(bug_links(bug=>$bug_num, links_only=>1,options=>{mbox=>'yes',mboxstatus=>'yes'})), - html_escape(bug_links(bug=>$bug_num, links_only=>1,options=>{mbox=>'yes',mboxmaint=>'yes'})); - } - $output; -} -{$log} -
-

Send a report that this bug log contains spam.

-
-{include(q(html/html_tail))} - - diff --git a/templates/en_US/cgi/bugreport.tx b/templates/en_US/cgi/bugreport.tx new file mode 100644 index 0000000..347c26f --- /dev/null +++ b/templates/en_US/cgi/bugreport.tx @@ -0,0 +1,48 @@ +<: include "html/pre_title.tx" :>#<: $bug_num :> - <: $status.subject :> - <: $config.project :> <: $config.bug :> report logs<: include "html/post_title.tx" :> + + + +

<: $config.project :> <: $config.bug :> report logs - +#<: $bug_num :>
+<: $status.subject :>

+
<: raw($version_graph) :>
+<: include "cgi/bugreport_pkginfo.tx" :> +<: include "cgi/bugreport_buginfo.tx" :> +: if looks_like_number($msg) { +

Full log

+: } else { +: if ! $status.archived { +

Reply +or subscribe +to this bug.

+: } + +

View this report as an +">mbox folder, +">status mbox, +">maintainer mbox +

+: } +<: raw($log) :> +
+

Send a report that this bug log contains spam.

+
+<: include "html/html_tail.tx" :> + + diff --git a/templates/en_US/cgi/bugreport_buginfo.tmpl b/templates/en_US/cgi/bugreport_buginfo.tmpl deleted file mode 100644 index 9b6c4fd..0000000 --- a/templates/en_US/cgi/bugreport_buginfo.tmpl +++ /dev/null @@ -1,79 +0,0 @@ -
-

Reported by: {package_links(submitter=>$status{originator})}

-

Date: {$status{date_text}}

-{ my $output = ''; - if (defined $status{owner} and length $status{owner}) { - $output = q(

Owned by: ).package_links(owner=>$status{owner}).q(

); - } - $output; -} -

Severity: {my $output = $status{severity}; - if (isstrongseverity($status{severity})) { - $output = q().$status{severity}.q(); - } - $output; - }

-

{@{$status{tags_array}}?q(Tags: ).html_escape(join(q(, ),@{$status{tags_array}})):''}

-{my $output = ''; - if (@{$status{mergedwith_array}}) { - $output .= q(

Merged with ).join(qq(,\n),bug_links(bug=>$status{mergedwith_array})).qq(

\n); - } - $output; -} -{my $output = ''; - if (@{$status{found_versions}}) { - $output .= q(

Found in ); - $output .= (@{$status{found_versions}} == 1) ? 'version ' : 'versions '; - $output .= join(qq(, ),map {html_escape($_);} @{$status{found_versions}}).qq(

\n); - } - if (@{$status{fixed_versions}}) { - $output .= q(

Fixed in ); - $output .= (@{$status{fixed_versions}} == 1) ? 'version ' : 'versions '; - $output .= join(qq(, ),map {html_escape($_);} @{$status{fixed_versions}}).qq(

\n); - } - $output; -} -{ my $output = ''; - if (length($status{done})) { - $output .= q(

Done: ).html_escape($status{done}).q(

) - } - $output; -} -{ my $output = ''; - if (@{$status{blockedby_array}}) { - $output .= q(

Fix blocked by ). - join(q(, ), - map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})} - @{$status{blockedby_array}}).q(

) - } - if (@{$status{blocks_array}}) { - $output .= q(

Blocking fix for ). - join(q(, ), - map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})} - @{$status{blocks_array}}).q(

) - } - $output; -} -{ my $output = ''; - if (exists $status{archived} and $status{archived}) { - $output .= q(

Bug is archived. No further changes may be made.

) - } - $output -}{ my $output = ''; - if (length($status{forwarded})) { - $output = "

Forwarded to " . - join(', ', - map {maybelink($_)} - split /\,\s+/,$status{forwarded} - )."

\n"; - } - $output; -}{ my $output = ''; - if (exists $status{summary} and defined $status{summary} and length $status{summary}) { - $output .= q(

Summary: ).html_escape($status{summary}).q(

); - } - if (exists $status{outlook} and defined $status{outlook} and length $status{outlook}) { - $output .= q(

Outlook: ).html_escape($status{outlook}).q(

); - } - $output; -}
diff --git a/templates/en_US/cgi/bugreport_buginfo.tx b/templates/en_US/cgi/bugreport_buginfo.tx new file mode 100644 index 0000000..6349540 --- /dev/null +++ b/templates/en_US/cgi/bugreport_buginfo.tx @@ -0,0 +1,54 @@ +
+

Reported by: <: raw(package_links(submitter=>$status.originator )) :>

+

Date: <: $status.date_text :>

+ : if defined($status.owner) && $status.owner.length() { +

Owned by: <: raw(package_links("owner",$status.owner)) :>

+ : } +

Severity: <: if $status.severity { :><: } :><: $status.severity :> + <: if $status.severity { :><: } :>

+

<: if $status.tags_array { :>Tags: <: $status.tags_array.join(' ') :>

<: } :> + : if $status.mergedwith_array.count > 0 { +

Merged with <: bug_links(bug=>$status.mergedwith_array).join(",\n") :>

+ : } + : if $status.found_versions.count { +

Found in + version<:- if $status.found_versions.count > 1 { -:>s<: } -:> + <: $status.found_versions.join(', ') :>

+ : } + : if $status.fixed_versions.count { +

Fixed in + version<:- if $status.fixed_versions.count > 1 { -:>s<: } -:> + <: $status.fixed_versions.join(', ') :>

+ : } + <: if $status.done.length() { :> +

Done: <: $status.done :>

+ <: } :> + <: if $status.blockedby_array.count { :> +

Fix blocked by + : for $status.blockedby_array -> $bug { + <: bug_links("bug",$bug.bug_num) :>: <: $bug.subject :><: if !$~bug.is_last { :>, + <: } else { :>.<: } :> + : } +

+ <: } :> + : if $status.blocks_array.count { +

Blocking fix for + : for $status.blocks_array -> $bug { + <: bug_links("bug",$bug.bug_num) :>: <: $bug.subject :><:if ! $~bug.is_last { :>, + <: } else { :>.<: } :> + : } +

+ : } + : if $status.archived { +

Bug is archived. No further changes may be made.

+ : } + : if defined $status.forwarded and $status.forwarded.length() { +

Forwarded to <: split($status.forwarded,',\s+').map(maybelink).join(', ') :>

+ : } + : if defined $status.summary and $status.summary.length() { +

Summary: <: $status.summary :>

+ : } + : if defined $status.outlook and $status.outlook.length() { +

Summary: <: $status.outlook :>

+ : } +
diff --git a/templates/en_US/cgi/bugreport_pkginfo.tmpl b/templates/en_US/cgi/bugreport_pkginfo.tmpl deleted file mode 100644 index 777928e..0000000 --- a/templates/en_US/cgi/bugreport_pkginfo.tmpl +++ /dev/null @@ -1,31 +0,0 @@ -
-

{if (keys %package > 1) { q(Packages)} else {q(Package)}}: - {join(q(, ),package_links(package => [map {$_->{package}} grep {!$_->{is_source}} values %package], - source => [map {$_->{source} } grep { $_->{is_source}} values %package], - class => q(submitter), - ) - )}; -{my $output =''; - for my $package (values %package) { - $output .= q(Maintainer for ).package_links($package->{is_source}?(source=>$package->{source}):(package=>$package->{package})).qq( is ). - package_links(maintainer => $package->{maintainer}).qq(; ); - if (exists $package->{source} and not $package->{is_source}) { - $output .= q(Source for ).package_links(package=>$package->{package}).qq( is ). - package_links(source => $package->{source}).qq(. ); - } - } - $output; -}

-{ my $output = ''; - if (keys %affects) { - $output .= q(

Affects: ). - join(q(, ), - package_links(package => [map {$_->{package}} grep {!$_->{is_source}} values %affects], - source => [map {$_->{source} } grep { $_->{is_source}} values %affects], - class => q(submitter), - ) - ).q(

); - } - $output; -} -
diff --git a/templates/en_US/cgi/bugreport_pkginfo.tx b/templates/en_US/cgi/bugreport_pkginfo.tx new file mode 100644 index 0000000..18d259a --- /dev/null +++ b/templates/en_US/cgi/bugreport_pkginfo.tx @@ -0,0 +1,27 @@ +: macro link_to_package -> ($packages) { +: for $packages.values() -> $pkg { +: if $pkg.is_source { +<:- package_links(source => $pkg.source,class=>"submitter"); -:> +: } else { +<:- package_links(package => $pkg.package,class=>"submitter"); -:> +: } +: if $~pkg.is_last { +; +: } else { +, +: } } } +
+

Package<: if ($package.keys.count > 1) {:>s<: } :> + <: link_to_package($package) :> +: for $package.values() -> $pkg { +

Maintainer for <: package_links($pkg.is_source ? "source": "package",$pkg.is_source ? $pkg.source : $pkg.package ) :> is <: package_links(maintainer => $pkg.maintainer) :>; +<: if defined($pkg.source) && not $pkg.is_source { :> +Source for <: package_links(package => $pkg.package) :> is +<: package_links(source => $pkg.source) :>. +<: } :>

+: } +: if $affects.keys.size > 0 { +

Affects: <: link_to_package($affects) :> +

+: } +
diff --git a/templates/en_US/cgi/no_such_bug.tmpl b/templates/en_US/cgi/no_such_bug.tmpl deleted file mode 100644 index bdbd67d..0000000 --- a/templates/en_US/cgi/no_such_bug.tmpl +++ /dev/null @@ -1,9 +0,0 @@ - - -#{$bug_num} - {$config{project}} {$config{bug}} report logs - -

{$config{project}} {$config{bug}} report logs - #{$bug_num}

-

There is no record of {$config{bug}} #{$bug_num}. -Try the search page instead.

-{#include('html/html_tail')} - diff --git a/templates/en_US/cgi/no_such_bug.tx b/templates/en_US/cgi/no_such_bug.tx new file mode 100644 index 0000000..05df20f --- /dev/null +++ b/templates/en_US/cgi/no_such_bug.tx @@ -0,0 +1,9 @@ + + +#<: $bug_num :> - <: $config.project :> .$config.bug report logs + +

.$config.project .$config.bug report logs - #.$bug_num

+

There is no record of .$config.bug #.$bug_num. +Try the search page instead.

+<: include 'html/html_tail.tx' :> + diff --git a/templates/en_US/cgi/pkgindex.tmpl b/templates/en_US/cgi/pkgindex.tmpl deleted file mode 100644 index c645a60..0000000 --- a/templates/en_US/cgi/pkgindex.tmpl +++ /dev/null @@ -1,32 +0,0 @@ -{include(q(html/pre_title))}{html_escape($config{project})} {html_escape($config{bug})} report logs by {html_escape($tag)}{include(q(html/post_title.tmpl))} - - -

{html_escape($config{project})} {html_escape($config{bug})} report logs by {html_escape($tag)}

-{$note} -
- - - - - - -{ my $output = ''; -if (defined $param{first}) { - $output .= qq(\n); -} else { - $output .= q(

); - if ($param{skip}> 0) { - $output .= q(); - } - if (keys %count > ($param{skip} + $param{max_results})) { - $output .= q(); - } - $output .= qq(

\n); -} -$output; -} -{ $result } -
-{include(q(html/html_tail))} - - diff --git a/templates/en_US/cgi/pkgindex.tx b/templates/en_US/cgi/pkgindex.tx new file mode 100644 index 0000000..875d7bc --- /dev/null +++ b/templates/en_US/cgi/pkgindex.tx @@ -0,0 +1,29 @@ +<: include "html/pre_title.tx":>.$config.project) .$config.bug report logs by <: $tag :><:include "html/post_title.tx":> + + +

.$config.project .$config.bug report logs by .$tag

+ .$note + + + + + + + + : if (defined $param.first) { + + : } else { +

+ : if ($param.skip> 0) { + + : } + : if (keys %count > ($param.skip + $param.max_results)) { + + : } +

+ : } + <: $result :> +
+ <: include "html/html_tail.tx" :> + + diff --git a/templates/en_US/cgi/pkgreport_javascript.tmpl b/templates/en_US/cgi/pkgreport_javascript.tx similarity index 65% rename from templates/en_US/cgi/pkgreport_javascript.tmpl rename to templates/en_US/cgi/pkgreport_javascript.tx index a786cbf..644feb4 100644 --- a/templates/en_US/cgi/pkgreport_javascript.tmpl +++ b/templates/en_US/cgi/pkgreport_javascript.tx @@ -1,77 +1,77 @@ diff --git a/templates/en_US/cgi/pkgreport_options.tmpl b/templates/en_US/cgi/pkgreport_options.tmpl deleted file mode 100644 index da362dd..0000000 --- a/templates/en_US/cgi/pkgreport_options.tmpl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -

Select bugs

-
-{ my $output = ''; -our $value_index = 0; -our $search = ''; -our $search_value = ''; -for my $key (@search_key_order){ - if (exists $param{$key}){ - for my $value (make_list($param{$key})){ - $search = $key; - $search_value = $value; - $output .= include('cgi/pkgreport_options_search_key'); - $output .= '
'; - $value_index++; - } - } - } - $search = ''; - $search_value = ''; - $output; -} -{include('cgi/pkgreport_options_search_key')} -
-

The same search fields are ORed, different fields are ANDed.

-

Valid severities are {$config{show_severities}}

-

Valid tags are {join(', ',@{$config{tags}})}

-

Include Bugs

{our $incexc = 'include'; -include('cgi/pkgreport_options_include_exclude'); -}

Exclude Bugs

-{our $incexc = 'exclude'; -include('cgi/pkgreport_options_include_exclude'); -} -

Categorize/Order using

Misc options

- Repeat Merged
- Reverse Bugs
- Reverse Pending
- Reverse Severity
- No Bugs which affect packages
-
-
-Toggle all extra information -

Submit

- -
- - diff --git a/templates/en_US/cgi/pkgreport_options.tx b/templates/en_US/cgi/pkgreport_options.tx new file mode 100644 index 0000000..15497a5 --- /dev/null +++ b/templates/en_US/cgi/pkgreport_options.tx @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + +

Select bugs

+
+ : for $search_key_order -> $key { + : if defined $param[$key] { + : for $param[$key] -> $value { + : include "cgi/pkgreport_options_search_key.tx" { search => $key, search_value => $value }; + : } + : } + : } + : include "cgi/pkgreport_options_search_key.tx"; + +

The same search fields are ORed, different fields are ANDed.

+

Valid severities are <: $config.show_severities :>

+

Valid tags are <: $config.tags.join(', ') :>

+

Include Bugs

+ : include "cgi/pkgreport_options_include_exclude.tx" { incexc => "include" }; +

Exclude Bugs

+ : include "cgi/pkgreport_options_include_exclude.tx" { incexc => "exclude" }; +

Categorize/Order using

+

Misc options

+ : macro input_checkbox ->($what,$text) { + <:- $text -:>
+ : } + <:- input_checkbox("repeatmerged","Repeat Merged") :> + <:- input_checkbox("bug-rev","Reverse Bugs") :> + <:- input_checkbox("pend-rev","Reverse Pending") :> + <:- input_checkbox("sev-rev","Reverse Severity") :> + <:- input_checkbox("noaffects","No Bugs which affect packages") :> +
+
+ + Toggle all extra information +

Submit

+ +
+
diff --git a/templates/en_US/cgi/pkgreport_options_include_exclude.tmpl b/templates/en_US/cgi/pkgreport_options_include_exclude.tmpl deleted file mode 100644 index c0f8acd..0000000 --- a/templates/en_US/cgi/pkgreport_options_include_exclude.tmpl +++ /dev/null @@ -1,16 +0,0 @@ - -{ my $output = ''; - our $value_index = 0; - our $key1 = ''; - our $key2 = ''; - for my $field (make_list($param{$incexc})) { - ($key1,$key2) = $field =~ m/^([^:]+)\:(.+)/; - next unless defined $key2; - $output .= include('cgi/pkgreport_options_include_exclude_key'); - } - $key1 = ''; - $key2 = ''; - $output .= include('cgi/pkgreport_options_include_exclude_key'); - $output; -} - diff --git a/templates/en_US/cgi/pkgreport_options_include_exclude.tx b/templates/en_US/cgi/pkgreport_options_include_exclude.tx new file mode 100644 index 0000000..a4a6f94 --- /dev/null +++ b/templates/en_US/cgi/pkgreport_options_include_exclude.tx @@ -0,0 +1,5 @@ + +: for $param[$incexc] -> $field { + : include "cgi/pkgreport_options_include_exclude_key.tx" {key1 => split($field,':',2).0, key2 => split($field,':',2).1 }; +: } +: include "cgi/pkgreport_options_include_exclude_key.tx"; diff --git a/templates/en_US/cgi/pkgreport_options_include_exclude_key.tmpl b/templates/en_US/cgi/pkgreport_options_include_exclude_key.tx similarity index 58% rename from templates/en_US/cgi/pkgreport_options_include_exclude_key.tmpl rename to templates/en_US/cgi/pkgreport_options_include_exclude_key.tx index ab0a246..5beb8b9 100644 --- a/templates/en_US/cgi/pkgreport_options_include_exclude_key.tmpl +++ b/templates/en_US/cgi/pkgreport_options_include_exclude_key.tx @@ -1,5 +1,5 @@ - +<:- output_select_options([subject => 'with subject containing', tags => 'tagged', severity => 'with severity', pending => 'with pending state', @@ -7,8 +7,7 @@ forwarded => 'with forwarded containing', owner => 'with owner containing', package => 'with package', - ],$key1||'')} + ],$key1 // '') :> - - + diff --git a/templates/en_US/cgi/pkgreport_options_search_key.tmpl b/templates/en_US/cgi/pkgreport_options_search_key.tmpl deleted file mode 100644 index e09fdff..0000000 --- a/templates/en_US/cgi/pkgreport_options_search_key.tmpl +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/templates/en_US/cgi/pkgreport_options_search_key.tx b/templates/en_US/cgi/pkgreport_options_search_key.tx new file mode 100644 index 0000000..4d92782 --- /dev/null +++ b/templates/en_US/cgi/pkgreport_options_search_key.tx @@ -0,0 +1,5 @@ + + + diff --git a/templates/en_US/cgi/quit.tmpl b/templates/en_US/cgi/quit.tx similarity index 82% rename from templates/en_US/cgi/quit.tmpl rename to templates/en_US/cgi/quit.tx index 2a89d8e..96d9064 100644 --- a/templates/en_US/cgi/quit.tmpl +++ b/templates/en_US/cgi/quit.tx @@ -2,5 +2,5 @@ Error An error occurred. -Error was: {$msg} +Error was: .$msg diff --git a/templates/en_US/cgi/short_bug_status.tmpl b/templates/en_US/cgi/short_bug_status.tmpl deleted file mode 100644 index 821a459..0000000 --- a/templates/en_US/cgi/short_bug_status.tmpl +++ /dev/null @@ -1,157 +0,0 @@ -
- #{html_escape($status{bug_num})} - [{ - my $output = qq(); - my $temp = $status{severity}; - $temp = substr $temp,0,1; - if (isstrongseverity($status{severity})){ - $temp = q().uc($temp).q(); - } - $output .= $temp.qq(); - length($output)?$output:'  '; - }|{ - my $output = ''; - for my $tag (@{$status{tags_array}}) { - next unless exists $config{tags_single_letter}{$tag}; - $output .= q().$config{tags_single_letter}{$tag}.q(); - } - length($output)?$output:'  '; - }|{ - my $output = ''; - if (@{$status{mergedwith_array}}) { - $output .= qq(=); - } - if (@{$status{fixed_versions}}) { - $output .= qq(☺); - } - if (@{$status{blockedby_array}}) { - $output .= qq(♙); - } - if (@{$status{blocks_array}}) { - $output .= qq(♔); - } - if (length($status{forwarded})) { - $output .= qq(↝); - } - if ($status{archived}) { - $output .= qq(♲); - } - if (length $status{affects}){ - $output .= qq(☣); - } - length($output)?$output:'  '; - }] - [{package_links(package=>[split /,/,$status{package}],options=>\%options,class=>"submitter")}] - {html_escape($status{subject})} -
- Reported by: {package_links(submitter=>$status{originator})}; - Date: {$status{date_text}}; -{ my $output = ''; - if (defined $status{owner} and length $status{owner}) { - $output = q(Owned by: ).package_links(owner=>$status{owner}).qq(;\n); - } - $output; -}Severity: {my $output = $status{severity}; - if (isstrongseverity($status{severity})) { - $output = q().$status{severity}.q(); - } - $output; - }; -{@{$status{tags_array}}?q(Tags: ).html_escape(join(q(, ),@{$status{tags_array}})).';':''} -{my $output = ''; - if (@{$status{mergedwith_array}}) { - $output .= q(Merged with ).join(qq(,\n),bug_links(bug=>$status{mergedwith_array})).qq(;\n); - } - $output; -}{my $output = ''; - if (@{$status{found_versions}} or @{$status{fixed_versions}}) { - $output .= ' '; - } - if (@{$status{found_versions}}) { - $output .= q(Found in ); - $output .= (@{$status{found_versions}} == 1) ? 'version ' : 'versions '; - $output .= join(qq(, ),map {html_escape($_);} @{$status{found_versions}}).qq(;\n); - } - if (@{$status{fixed_versions}}) { - $output .= q(Fixed in ); - $output .= (@{$status{fixed_versions}} == 1) ? 'version ' : 'versions '; - $output .= join(qq(, ),map {html_escape($_);} @{$status{fixed_versions}}).qq(;\n); - } - if (@{$status{found_versions}} or @{$status{fixed_versions}}) { - $output .= qq(); - } - $output; -}{ my $output = ''; - if (length($status{forwarded})) { - $output = "Forwarded to " . - join(', ', - map {maybelink($_)} - split /\,\s+/,$status{forwarded} - ).";\n"; - } - $output; -}{ my $output = ''; - if (length($status{done})) { - $output .= q(Done: ).html_escape($status{done}).q(; ) - } - $output; -}{ my $output = ''; - my $days = $status{archive_days}; - if ($days >= 0 and defined $status{location} and $status{location} ne 'archive') { - $output .= "Can be archived" . - ( $days == 0 ? " today" : $days == 1 ? " in $days day" : " in $days days" ) . - ";\n"; - } - elsif (defined $status{location} and $status{location} eq 'archived') { - $output .= "Archived;\n"; - } - $output; -}{ my $output = ''; - if (@{$status{blockedby_array}}) { - $output .= q(Fix blocked by ). - join(q(, ), - map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})} - @{$status{blockedby_array}}).q(; ) - } - if (@{$status{blocks_array}}) { - $output .= q(Blocking fix for ). - join(q(, ), - map {bug_links(bug=>$_->{bug_num}).q(: ).html_escape($_->{subject})} - @{$status{blocks_array}}).q(; ) - } - $output; -}{ my $output = ''; - my ($days_last,$eng_last) = secs_to_english(time - $status{log_modified}); - my ($days,$eng) = secs_to_english(time - $status{date}); - - if ($days >= 7) { - my $font = ""; - my $efont = ""; - $font = "em" if ($days > 30); - $font = "strong" if ($days > 60); - $efont = "" if ($font); - $font = "<$font>" if ($font); - - $output .= "${font}Filed $eng ago$efont;\n"; - } - if ($days_last > 7) { - my $font = ""; - my $efont = ""; - $font = "em" if ($days_last > 30); - $font = "strong" if ($days_last > 60); - $efont = "" if ($font); - $font = "<$font>" if ($font); - - $output .= "${font}Modified $eng_last ago$efont;\n"; - } - $output; - }{ my $output = ''; - if (exists $status{archived} and $status{archived}) { - $output .= q(Bug is archived. No further changes may be made. ) - } - $output}
-
diff --git a/templates/en_US/cgi/short_bug_status.tx b/templates/en_US/cgi/short_bug_status.tx new file mode 100644 index 0000000..1952173 --- /dev/null +++ b/templates/en_US/cgi/short_bug_status.tx @@ -0,0 +1,135 @@ +
+ >#<: $status.bug_num :> + [ + <:- my $short_sev = substr($status.severity,0,1) -:> + <:- if isstrongseverity($status.severity) { -:><: uc($short_sev) :> + <:- } else { -:> + <:- $short_sev } -:>| + <:- for $status.tags_array -> $tag { -:> + <:- if defined($config.tags_single_letter[$tag]) { -:> + <: $config.tags_single_letter[$tag] :><:- } -:> + : } + <:- if $status.tags_array.size() == 0 { -:>  <: } :>| + <:- if $status.mergedwith_array.count > 0 { -:> + = + <:- } -:> + <:- if $status.fixed_versions.count > 0 { -:> + ☺ + <:- } -:> + <:- if $status.fixed_versions.count > 0 { -:> + ☺ + <:- } -:> + <:- if $status.blockedby_array.count > 0 { -:> + ♙ + <:- } -:> + <:- if $status.blocks_array.count > 0 { -:> + ♔ + <:- } -:> + <:- if length($status.forwarded) { -:> + ↝ + <:- } -:> + <:- if $status.archived { -:> + ♲ + <:- } -:> + <:- if length($status.affects) { -:> + ☣ + <:- } -:>] + [<: raw(package_links(package=>$status.package.split(','),class=>"submitter")) :>] + <: $status.subject :> +
+ Reported by: <: raw(package_links(submitter=>$status.originator)) :>; + Date: <: $status.date_text :>; + <:- if (defined $status.owner and length($status.owner)) { -:> + Owned by: <: raw(package_links(owner=>$status.owner)) :>; + <:- } :> + Severity: + <:- if (isstrongseverity($status.severity)) { -:> + )<: $status.severity :> + <:- } else { -:> + <: $status.severity :> + <:- } -:> + + <:- if $status.tags_array.size > 0 { -:> + Tags: <: $status.tags_array.join(', ') :>; + <:- } -:> + + : if $status.mergedwith_array.size > 0 { + Merged with <: bug_links(bug=>$status.mergedwith_array).join(",\n") :>; + : } + : if $status.found_versions.size > 0 or $status.fixed_versions.size > 0 { + + <:- } -:> + <:- if $status.found_versions.size > 0 { -:> + Found in version<: if $status.found_versions.size > 1 { :>s<: } :> + <:- $status.found_versions.join(', ') -:>; + + <:- } -:> + <:- if $status.fixed_versions.size > 0 { :> + Fixed in version<: if $status.fixed_versions.size > 1 { :>s<: } :> + <:- $status.fixed_versions.join(', ') -:>; + + <:- } -:> + <:- if $status.found_versions.size > 0 or $status.fixed_versions.size > 0 { -:> + + <:- } -:> + <:- if (length($status.forwarded)) { :> + Forwarded to + <: $status.forwarded.split('\,\s+').map(maybelink).join(', ') :> + + <:- } -:> + <:- if (length($status.done)) { -:> + Done: + <: $status.done :> + + <:- } -:> + <:- if $status.archive_days >= 0 and + defined($status.location) && $status.location != "archive" { -:> + Can be archived + <: if $status.archive_days == 0 { :> + today + <: } else if $status.archive_days == 1 { :> + in 1 day + <: } else { :> + in <: $status.archive_days :> days + <:- } :>; + <:- } else if defined($status.location) && $status.location == "archived" { -:> + Archived + <:- } -:> + <:- if $status.blockedby_array.count > 0 { :> + Fix blocked by + <: for $status.blockedby_array -> $bug { :> + <: bug_links("bug",bug.bug_num) :>: + <: $bug.subject -:> + <:- if ! $~bug.is_last { -:>, <: } else { -:>.<:- } -:> + <:- } -:> + + <:- } -:> + <:- if $status.blocks_array.count > 0 { :> + Blocking fix for + <: for $status.blocks_array -> $bug { :> + <: bug_links("bug",bug.bug_num) :>: + <: $bug.subject -:> + <:- if ! $~bug.is_last {-:>, <: } else { -:>.<:- } -:> + <:- } -:> + + <:- } -:> + <:- macro days_ago->($what,$ago) {-:> + + <:- if ($time - $ago) / 86400 > 60 { -:> + <: $what :> <: secs_to_english($time-$ago) :> ago. + <:- } else if ($time - $ago) / 86400 > 30 { :> + <: $what :> <: secs_to_english($time-$ago) :> ago. + <:- } -:>; + + <:- } -:> + <: days_ago("Filed",$status.date) :> + <: days_ago("Modified",$status.log_modified) :> + <:- if defined $status.archived and $status.archived {:> + Bug is archived. No further changes may be made. + <:- } -:> +
+
diff --git a/templates/en_US/html/html_tail.tmpl b/templates/en_US/html/html_tail.tmpl deleted file mode 100644 index 0bbfc43..0000000 --- a/templates/en_US/html/html_tail.tmpl +++ /dev/null @@ -1,20 +0,0 @@ -
{$config{maintainer}} <{$config{maintainer_email}}>. -Last modified: -{$last_modified||strftime('%c',gmtime)}; -Machine Name: -{$config{machine_name}||'Unknown'} -

-{$config{project}} {$config{bug}} tracking system -

-

- Debbugs is free software and licensed under the terms of the GNU - Public License version 2. The current version can be obtained - from https://bugs.debian.org/debbugs-source/. -

-

-Copyright © 1999 Darren O. Benham, -1997,2003 nCipher Corporation Ltd, -1994-97 Ian Jackson, -2005-2017 Don Armstrong, and many other contributors. -

-
diff --git a/templates/en_US/html/html_tail.tx b/templates/en_US/html/html_tail.tx new file mode 100644 index 0000000..cca1fe7 --- /dev/null +++ b/templates/en_US/html/html_tail.tx @@ -0,0 +1,21 @@ +
<: $config.maintainer :> + <<: $config.maintainer_email :>>. + Last modified: + <: defined $last_modified ? $last_modified : gm_strftime('%c') :>; + Machine Name: + <: $config.machine_name ||'Unknown' :> +

+ <: $config.project :> <: $config.bug :> tracking system +

+

+ Debbugs is free software and licensed under the terms of the + GNU Public License version 2. The current version can be + obtained from https://bugs.debian.org/debbugs-source/. +

+

+ Copyright © 1999 Darren O. Benham, + 1997,2003 nCipher Corporation Ltd, + 1994-97 Ian Jackson, + 2005-2017 Don Armstrong, and many other contributors. +

+
diff --git a/templates/en_US/html/post_title.tmpl b/templates/en_US/html/post_title.tx similarity index 61% rename from templates/en_US/html/post_title.tmpl rename to templates/en_US/html/post_title.tx index 5ec109a..0061ca2 100644 --- a/templates/en_US/html/post_title.tmpl +++ b/templates/en_US/html/post_title.tx @@ -1,4 +1,4 @@ - + diff --git a/templates/en_US/html/pre_title.tmpl b/templates/en_US/html/pre_title.tmpl deleted file mode 100644 index 2f7ab77..0000000 --- a/templates/en_US/html/pre_title.tmpl +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/templates/en_US/html/pre_title.tx b/templates/en_US/html/pre_title.tx new file mode 100644 index 0000000..f6e17aa --- /dev/null +++ b/templates/en_US/html/pre_title.tx @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head> +<title> diff --git a/templates/en_US/mail/excluded_from_control.tmpl b/templates/en_US/mail/excluded_from_control.tx similarity index 100% rename from templates/en_US/mail/excluded_from_control.tmpl rename to templates/en_US/mail/excluded_from_control.tx diff --git a/templates/en_US/mail/fake_control_message.tmpl b/templates/en_US/mail/fake_control_message.tx similarity index 79% rename from templates/en_US/mail/fake_control_message.tmpl rename to templates/en_US/mail/fake_control_message.tx index 2af273d..9df6c9b 100644 --- a/templates/en_US/mail/fake_control_message.tmpl +++ b/templates/en_US/mail/fake_control_message.tx @@ -1,9 +1,9 @@ Received: (at fakecontrol) by fakecontrolmessage; -To: {$request_addr} -From: {$requester} +To: <: $request_addr :> +From: <: $requester :> Subject: Internal Control -Message-Id: {$action} -Date: {$date} +Message-Id: <: $action :> +Date: <: $date :> User-Agent: Fakemail v42.6.9 # A New Hope @@ -15,7 +15,7 @@ User-Agent: Fakemail v42.6.9 # message doesn't tell you why it happened # # The action: -# {$action} +# <: $action :> thanks # This fakemail brought to you by your local debbugs # administrator diff --git a/templates/en_US/mail/footer.tmpl b/templates/en_US/mail/footer.tmpl deleted file mode 100644 index 132201f..0000000 --- a/templates/en_US/mail/footer.tmpl +++ /dev/null @@ -1,11 +0,0 @@ --- -{ -my %ref_handled; -for my $bug (sort ($ref,@refs)) { - next unless defined $bug; - next if exists $ref_handled{$bug}; - $ref_handled{$bug} = 1; - $OUT .= bugurl($bug).qq(\n); -} -}{$config{project}} {ucfirst($config{bug})} Tracking System -Contact {$config{maintainer_email}} with problems diff --git a/templates/en_US/mail/footer.tx b/templates/en_US/mail/footer.tx new file mode 100644 index 0000000..921606e --- /dev/null +++ b/templates/en_US/mail/footer.tx @@ -0,0 +1,6 @@ +-- +: for $refs -> $bug { +<: bugurl($bug) :> +: } +<:$config.project:> <: $config.ubug :> Tracking System +Contact <: $config.maintainer_email :> with problems diff --git a/templates/en_US/mail/forward_maintonly.tmpl b/templates/en_US/mail/forward_maintonly.tx similarity index 100% rename from templates/en_US/mail/forward_maintonly.tmpl rename to templates/en_US/mail/forward_maintonly.tx diff --git a/templates/en_US/mail/forward_normal.tmpl b/templates/en_US/mail/forward_normal.tx similarity index 100% rename from templates/en_US/mail/forward_normal.tmpl rename to templates/en_US/mail/forward_normal.tx diff --git a/templates/en_US/mail/forward_veryquiet.tmpl b/templates/en_US/mail/forward_veryquiet.tx similarity index 76% rename from templates/en_US/mail/forward_veryquiet.tmpl rename to templates/en_US/mail/forward_veryquiet.tx index 623eded..b98e82f 100644 --- a/templates/en_US/mail/forward_veryquiet.tmpl +++ b/templates/en_US/mail/forward_veryquiet.tx @@ -2,4 +2,4 @@ Your message has not been forwarded to the package maintainers or other interested parties; you should ensure that the developers are aware of the problem you have entered into the system - preferably -quoting the { $config{bug} } reference number, #{ $ref }. +quoting the <: $config.bug :> reference number, #<: $ref :>. diff --git a/templates/en_US/mail/header.tmpl b/templates/en_US/mail/header.tx similarity index 100% rename from templates/en_US/mail/header.tmpl rename to templates/en_US/mail/header.tx diff --git a/templates/en_US/mail/invalid_maintainer.tmpl b/templates/en_US/mail/invalid_maintainer.tmpl deleted file mode 100644 index 9a244ff..0000000 --- a/templates/en_US/mail/invalid_maintainer.tmpl +++ /dev/null @@ -1,9 +0,0 @@ - -You requested that the message be sent to the package maintainer(s) -but either the { $config{bug} } report is not associated with any package (probably -because of a missing Package pseudo-header field in the original { $config{bug} } -report), or the package(s) specified do not have any maintainer(s). - -Your message has *not* been sent to any package maintainers; it has -merely been filed in the { $config{bug} } tracking system. If you require assistance -please contact { $config{maintainer_email} } quoting the { $config{bug} } number { $ref }. diff --git a/templates/en_US/mail/invalid_maintainer.tx b/templates/en_US/mail/invalid_maintainer.tx new file mode 100644 index 0000000..cff38b4 --- /dev/null +++ b/templates/en_US/mail/invalid_maintainer.tx @@ -0,0 +1,9 @@ + +You requested that the message be sent to the package maintainer(s) +but either the <: $config.bug :> report is not associated with any package (probably +because of a missing Package pseudo-header field in the original <: $config.bug :> +report), or the package(s) specified do not have any maintainer(s). + +Your message has *not* been sent to any package maintainers; it has +merely been filed in the <: $config.bug :> tracking system. If you require assistance +please contact <: $config.maintainer_email :> quoting the <: $config.bug :> number <: $ref :>. diff --git a/templates/en_US/mail/invalid_severity.tmpl b/templates/en_US/mail/invalid_severity.tmpl deleted file mode 100644 index dad928f..0000000 --- a/templates/en_US/mail/invalid_severity.tmpl +++ /dev/null @@ -1,5 +0,0 @@ - -Your message specified a Severity: in the pseudo-header, but -the severity value {$severity} was not recognised. -The default severity {$config{default_severity}} is being used instead. -The recognised values are: {$config{show_severities}}. diff --git a/templates/en_US/mail/invalid_severity.tx b/templates/en_US/mail/invalid_severity.tx new file mode 100644 index 0000000..826f6c8 --- /dev/null +++ b/templates/en_US/mail/invalid_severity.tx @@ -0,0 +1,5 @@ + +Your message specified a Severity: in the pseudo-header, but +the severity value <: $severity :> was not recognised. +The default severity <: $config.default_severity :> is being used instead. +The recognised values are: <: $config.show_severities :>. diff --git a/templates/en_US/mail/invalid_user.tmpl b/templates/en_US/mail/invalid_user.tx similarity index 62% rename from templates/en_US/mail/invalid_user.tmpl rename to templates/en_US/mail/invalid_user.tx index d7f3891..2df06f2 100644 --- a/templates/en_US/mail/invalid_user.tmpl +++ b/templates/en_US/mail/invalid_user.tx @@ -1,3 +1,3 @@ Your message tried to set a usertag, but didn't have a valid -user set ('{$user}' isn't valid) +user set ('<: $user :>' isn't valid) diff --git a/templates/en_US/mail/invalid_version.tmpl b/templates/en_US/mail/invalid_version.tx similarity index 94% rename from templates/en_US/mail/invalid_version.tmpl rename to templates/en_US/mail/invalid_version.tx index 1bddeab..a1bbcaf 100644 --- a/templates/en_US/mail/invalid_version.tmpl +++ b/templates/en_US/mail/invalid_version.tx @@ -2,7 +2,7 @@ Your message had a Version: pseudo-header with an invalid package version: -{$version} +<: $version :> please either use found or fixed to the control server with a correct version, or reply to this report indicating the correct version so the diff --git a/templates/en_US/mail/maintainercc.tmpl b/templates/en_US/mail/maintainercc.tx similarity index 61% rename from templates/en_US/mail/maintainercc.tmpl rename to templates/en_US/mail/maintainercc.tx index 5a6cb41..e168771 100644 --- a/templates/en_US/mail/maintainercc.tmpl +++ b/templates/en_US/mail/maintainercc.tx @@ -1,3 +1,3 @@ Your message has been sent to the package maintainer(s): -{join('',map {" $_\n"} @maintaddrs)} \ No newline at end of file +<: $maintaddrs.join("\n") :> diff --git a/templates/en_US/mail/message_body.tmpl b/templates/en_US/mail/message_body.tmpl deleted file mode 100644 index b2f7c4d..0000000 --- a/templates/en_US/mail/message_body.tmpl +++ /dev/null @@ -1,2 +0,0 @@ -{include('mail/header')}{$body} -{include('mail/footer')} \ No newline at end of file diff --git a/templates/en_US/mail/message_body.tx b/templates/en_US/mail/message_body.tx new file mode 100644 index 0000000..a7a4863 --- /dev/null +++ b/templates/en_US/mail/message_body.tx @@ -0,0 +1,3 @@ +: include "mail/header.tx" +<: $body :> +: include "mail/footer.tx" \ No newline at end of file diff --git a/templates/en_US/mail/process_ack.tmpl b/templates/en_US/mail/process_ack.tmpl deleted file mode 100644 index e15ea5a..0000000 --- a/templates/en_US/mail/process_ack.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{$thanks} -This is an automatically generated reply to let you know your message -has been received. -{ $forwardexplain }{ $resentccexplain } -If you wish to submit further information on this problem, please -send it to { $refreplyto }. - -Please do not send mail to {$config{maintainer_email}} unless you wish -to report a problem with the {ucfirst($config{bug})}-tracking system. -{$brokenness} \ No newline at end of file diff --git a/templates/en_US/mail/process_ack.tx b/templates/en_US/mail/process_ack.tx new file mode 100644 index 0000000..e3ca006 --- /dev/null +++ b/templates/en_US/mail/process_ack.tx @@ -0,0 +1,10 @@ +<: $thanks :> +This is an automatically generated reply to let you know your message +has been received. +<: $forwardexplain :><: $resentccexplain :> +If you wish to submit further information on this problem, please +send it to <: $refreplyto :>. + +Please do not send mail to <:$config.maintainer_email:> unless you wish +to report a problem with the <: $config.bug :>-tracking system. +<: $brokenness :> \ No newline at end of file diff --git a/templates/en_US/mail/process_ack_thanks_additional.tmpl b/templates/en_US/mail/process_ack_thanks_additional.tx similarity index 69% rename from templates/en_US/mail/process_ack_thanks_additional.tmpl rename to templates/en_US/mail/process_ack_thanks_additional.tx index 47e7675..f431380 100644 --- a/templates/en_US/mail/process_ack_thanks_additional.tmpl +++ b/templates/en_US/mail/process_ack_thanks_additional.tx @@ -1,2 +1,2 @@ Thank you for the additional information you have supplied regarding -this {$config{bug}} report. +this <: $config.bug :> report. diff --git a/templates/en_US/mail/process_ack_thanks_new.tmpl b/templates/en_US/mail/process_ack_thanks_new.tmpl deleted file mode 100644 index adcb5c0..0000000 --- a/templates/en_US/mail/process_ack_thanks_new.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -Thank you for filing a new {$config{bug}} report with {$config{project}}. - -You can follow progress on this {$config{bug}} here: {bugurl($ref)}. diff --git a/templates/en_US/mail/process_ack_thanks_new.tx b/templates/en_US/mail/process_ack_thanks_new.tx new file mode 100644 index 0000000..538eb50 --- /dev/null +++ b/templates/en_US/mail/process_ack_thanks_new.tx @@ -0,0 +1,3 @@ +Thank you for filing a new <: $config.bug :> report with <:$config.project:>. + +You can follow progress on this <: $config.bug :> here: <: bugurl($ref) :> diff --git a/templates/en_US/mail/process_broken_subject.tmpl b/templates/en_US/mail/process_broken_subject.tx similarity index 63% rename from templates/en_US/mail/process_broken_subject.tmpl rename to templates/en_US/mail/process_broken_subject.tx index b14668d..38275bd 100644 --- a/templates/en_US/mail/process_broken_subject.tmpl +++ b/templates/en_US/mail/process_broken_subject.tx @@ -1,3 +1,3 @@ Your message did not contain a Subject field. They are recommended and -useful because the title of a {$config{bug}} is determined using this field. +useful because the title of a <: $config.bug :> is determined using this field. Please remember to include a Subject field in your messages in future. diff --git a/templates/en_US/mail/process_default_package_selected.tmpl b/templates/en_US/mail/process_default_package_selected.tx similarity index 56% rename from templates/en_US/mail/process_default_package_selected.tmpl rename to templates/en_US/mail/process_default_package_selected.tx index 46cbe54..c5d941e 100644 --- a/templates/en_US/mail/process_default_package_selected.tmpl +++ b/templates/en_US/mail/process_default_package_selected.tx @@ -1,6 +1,6 @@ -The ${gBug} you submitted against package '{$old_package}' has no +The <: $config.bug :> you submitted against package '<: $old_package :>' has no known maintainer. This usually means that you either did not include a Package: pseudoheader, or you filed a bug against a non-existant package. Your bug report has been reassigned to package -'{$new_package}' which is the default package for this bug reporting +'<: $new_package :>' which is the default package for this bug reporting system. diff --git a/templates/en_US/mail/process_mark_as_done.tmpl b/templates/en_US/mail/process_mark_as_done.tmpl deleted file mode 100644 index f764c43..0000000 --- a/templates/en_US/mail/process_mark_as_done.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -Your message dated {$date} -with message-id {$messageid} -and subject line {$subject} -has caused the {$config{project}} {$config{bug}} report #{$ref}, -regarding {$data{subject}} -to be marked as done. - -This means that you claim that the problem has been dealt with. -If this is not the case it is now your responsibility to reopen the -{$config{bug}} report if necessary, and/or fix the problem forthwith. - -{include('mail/serious_mail_misconfiguration')} - diff --git a/templates/en_US/mail/process_mark_as_done.tx b/templates/en_US/mail/process_mark_as_done.tx new file mode 100644 index 0000000..2052094 --- /dev/null +++ b/templates/en_US/mail/process_mark_as_done.tx @@ -0,0 +1,13 @@ +Your message dated <: $date :> +with message-id <: $messageid :> +and subject line <: $subject :> +has caused the <: $config.project :> <: $config.bug :> report #<: $ref:> +regarding <:$data.subject:> +to be marked as done. + +This means that you claim that the problem has been dealt with. +If this is not the case it is now your responsibility to reopen the +<: $config.bug :> report if necessary, and/or fix the problem forthwith. + +: include "mail/serious_mail_misconfiguration" + diff --git a/templates/en_US/mail/process_mark_as_forwarded.tmpl b/templates/en_US/mail/process_mark_as_forwarded.tmpl deleted file mode 100644 index c099230..0000000 --- a/templates/en_US/mail/process_mark_as_forwarded.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -Your message dated {$date} -with message-id {$messageid} -has caused the {$gProject} {$gBug} report #{$ref}, -regarding {$data{subject}} -to be marked as having been forwarded to the upstream software -author(s) {$data{forwarded}} - -{include('mail/serious_mail_misconfiguration')} - diff --git a/templates/en_US/mail/process_mark_as_forwarded.tx b/templates/en_US/mail/process_mark_as_forwarded.tx new file mode 100644 index 0000000..420ac70 --- /dev/null +++ b/templates/en_US/mail/process_mark_as_forwarded.tx @@ -0,0 +1,8 @@ +Your message dated <: $date :> +with message-id <: $messageid :> +has caused the <: $config.project :> <: $config.bug :> report #<: $ref :> +regarding <: $data.subject :> +to be marked as having been forwarded to the upstream software +author(s) <: $data.forwarded :> + +: include "mail/serious_mail_misconfiguration" diff --git a/templates/en_US/mail/process_no_bug_number.tmpl b/templates/en_US/mail/process_no_bug_number.tmpl deleted file mode 100644 index 033d180..0000000 --- a/templates/en_US/mail/process_no_bug_number.tmpl +++ /dev/null @@ -1,22 +0,0 @@ -You sent a message to the {$config{project}} {$config{bug}} tracking system old-style -{$markaswhat} address ({$receivedat}), -without a recognisable $gBug number in the Subject. -Your message has been filed under junk but otherwise ignored. - -If you don't know what I'm talking about then probably either: - -You unwittingly sent a message to {$receivedat} -because you replied to all recipients of the message a developer used -to mark a {$config{bug}} as {$markaswhat} and you modified the Subject. In this case, -please do not be alarmed. To avoid confusion do not do it again, but -there is no need to apologise or mail anyone asking for an explanation. - --or- - -{include('mail/serious_mail_misconfiguration')} - -Your message was dated {$date} and had -message-id {$messageid} -and subject {$subject}. - -If you need any assistance or explanation please contact {$config{maintainer_email}}. diff --git a/templates/en_US/mail/process_no_bug_number.tx b/templates/en_US/mail/process_no_bug_number.tx new file mode 100644 index 0000000..da1ace9 --- /dev/null +++ b/templates/en_US/mail/process_no_bug_number.tx @@ -0,0 +1,22 @@ +You sent a message to the <:$config.project:> <: $config.bug :> tracking system old-style +<: $markaswhat :> address (<: $receivedat :>), +without a recognisable <: $config.bug :> number in the Subject. +Your message has been filed under junk but otherwise ignored. + +If you don't know what I'm talking about then probably either: + +You unwittingly sent a message to <: $receivedat :> +because you replied to all recipients of the message a developer used +to mark a <: $config.bug :> as <: $markaswhat :> and you modified the Subject. In this case, +please do not be alarmed. To avoid confusion do not do it again, but +there is no need to apologise or mail anyone asking for an explanation. + +-or- + +: include('mail/serious_mail_misconfiguration') + +Your message was dated <: $date :> and had +message-id <: $messageid :> +and subject <: $subject :>. + +If you need any assistance or explanation please contact <:$config.maintainer_email:>. diff --git a/templates/en_US/mail/process_no_package.tmpl b/templates/en_US/mail/process_no_package.tx similarity index 64% rename from templates/en_US/mail/process_no_package.tmpl rename to templates/en_US/mail/process_no_package.tx index ccfc486..d6391eb 100644 --- a/templates/en_US/mail/process_no_package.tmpl +++ b/templates/en_US/mail/process_no_package.tx @@ -5,17 +5,17 @@ completely. Without this information we are unable to categorise or otherwise deal with your problem report. Please _resubmit_ your report to -{$baddress}@{$config{email_domain}} and tell us which package the -report is for. For help, check out -{$config{web_domain}}/Reporting{$config{html_suffix}}. +<: $baddress :>@<: $config.email_domain:> and tell us which package the +report is for. For help, check out: +<: $config.web_domain :>/Reporting<: $config.html_suffix :> -Your message was dated {$date} and had -message-id {$messageid} -and subject {$subject}. +Your message was dated <: $date :> and had +message-id <: $messageid :> +and subject <: $subject :>. The complete text of it is attached to this message. If you need any assistance or explanation please contact -{$config{maintainer_email}} and include the the attached +<: $config.maintainer_email :> and include the the attached message. If you didn't send the attached message (spam was sent forging your diff --git a/templates/en_US/mail/process_unknown_bug_number.tmpl b/templates/en_US/mail/process_unknown_bug_number.tmpl deleted file mode 100644 index b3391a1..0000000 --- a/templates/en_US/mail/process_unknown_bug_number.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -You sent a message to the {$config{bug}} tracking system which gave (in the -Subject line or encoded into the recipient at {$config{email_domain}), -the number of a nonexistent {$config{bug}} report (#{$tryref}). -{if ($config{remove_age}){ - $OUT .= "\n". -"This may be because that $config{bug} report has been resolved for more than $config{remove_age}\n". -"days, and the record of it has been archived and made read-only, or\n". -"because you mistyped the $config{bug} report number.\n" - } -} -Your message was dated {$date} and was sent to -{$baddress}@{$config{email_domain}}. It had -Message-ID {$messageid} -and Subject {$subject} - -It has been filed (under junk) but otherwise ignored. - -Please consult your records to find the correct {$config{bug}} report -number, or contact {$config{maintainer_email}} for assistance. - -{include('mail/serious_mail_misconfiguration')} \ No newline at end of file diff --git a/templates/en_US/mail/process_unknown_bug_number.tx b/templates/en_US/mail/process_unknown_bug_number.tx new file mode 100644 index 0000000..0cdba0d --- /dev/null +++ b/templates/en_US/mail/process_unknown_bug_number.tx @@ -0,0 +1,20 @@ +You sent a message to the <: $config.bug :> tracking system which gave (in the +Subject line or encoded into the recipient at <: $config.email_domain :>), +the number of a nonexistent <: $config.bug :> report (#<: $tryref :>). +:if ($config.remove_age) { +This may be because that <: $config.bug :> report has been resolved for more than <: $config.remove_age :> +days, and the record of it has been archived and made read-only, or +because you mistyped the <: $config.bug :> report number. +: } + +Your message was dated <: $date :> and was sent to +< :$baddress :>@<:$config.email_domain:>. It had +Message-ID <: $messageid :> +and Subject <: $subject :> + +It has been filed (under junk) but otherwise ignored. + +Please consult your records to find the correct <: $config.bug :> report +number, or contact <: $config.maintainer_email :> for assistance. + +.include('mail/serious_mail_misconfiguration') \ No newline at end of file diff --git a/templates/en_US/mail/process_your_bug_done.tmpl b/templates/en_US/mail/process_your_bug_done.tmpl deleted file mode 100644 index f01e5b0..0000000 --- a/templates/en_US/mail/process_your_bug_done.tmpl +++ /dev/null @@ -1,12 +0,0 @@ -This is an automatic notification regarding your {$config{bug}} report -which was filed against the {$data{package}} package: - -#{$data{bug_num}}: {$data{subject}} - -It has been closed by {$markedby}. - -Their explanation is attached below along with your original report. -If this explanation is unsatisfactory and you have not received a -better one in a separate message then please contact {$markedby} by -replying to this email. - diff --git a/templates/en_US/mail/process_your_bug_done.tx b/templates/en_US/mail/process_your_bug_done.tx new file mode 100644 index 0000000..faac745 --- /dev/null +++ b/templates/en_US/mail/process_your_bug_done.tx @@ -0,0 +1,12 @@ +This is an automatic notification regarding your <: $config.bug :> report +which was filed against the <: $data.package :> package: + +#<: $data.bug_num :>: <: $data.subject :> + +It has been closed by <: $markedby :> + +Their explanation is attached below along with your original report. +If this explanation is unsatisfactory and you have not received a +better one in a separate message then please contact <: $markedby :> by +replying to this email. + diff --git a/templates/en_US/mail/serious_mail_misconfiguration.tmpl b/templates/en_US/mail/serious_mail_misconfiguration.tx similarity index 60% rename from templates/en_US/mail/serious_mail_misconfiguration.tmpl rename to templates/en_US/mail/serious_mail_misconfiguration.tx index 1a9539f..4f7477c 100644 --- a/templates/en_US/mail/serious_mail_misconfiguration.tmpl +++ b/templates/en_US/mail/serious_mail_misconfiguration.tx @@ -1,4 +1,4 @@ (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system -misconfiguration somewhere. Please contact {$config{maintainer_email}} +misconfiguration somewhere. Please contact <: $config.maintainer_email :> immediately.) \ No newline at end of file diff --git a/templates/en_US/mail/submitter_changed.tmpl b/templates/en_US/mail/submitter_changed.tmpl deleted file mode 100644 index c7032f1..0000000 --- a/templates/en_US/mail/submitter_changed.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -The submitter address recorded for your {$config{bug}} report -#{$data{bug_num}}: {$data{subject}} -has been changed. - -The old submitter address for this report was -{$old_data{originator}}. - -The new submitter address is -{$data{originator}}. - -This change was made by -{$replyto}. -If it was incorrect, please contact them directly. diff --git a/templates/en_US/mail/submitter_changed.tx b/templates/en_US/mail/submitter_changed.tx new file mode 100644 index 0000000..5920c0e --- /dev/null +++ b/templates/en_US/mail/submitter_changed.tx @@ -0,0 +1,13 @@ +The submitter address recorded for your <: $config.bug :> report +#<: $data.bug_num :>: <:$data.subject:> +has been changed. + +The old submitter address for this report was +<: $old_data.originator :>. + +The new submitter address is +<: $data.originator :>. + +This change was made by +<: $replyto :> +If it was incorrect, please contact them directly. diff --git a/templates/en_US/mail/xdebbugscc.tmpl b/templates/en_US/mail/xdebbugscc.tmpl deleted file mode 100644 index cc6e4d3..0000000 --- a/templates/en_US/mail/xdebbugscc.tmpl +++ /dev/null @@ -1,4 +0,0 @@ - -As you requested using X-Debbugs-CC, your message was also forwarded to - { $xcchdr } -(after having been given a { $config{bug} } report number, if it did not have one). diff --git a/templates/en_US/mail/xdebbugscc.tx b/templates/en_US/mail/xdebbugscc.tx new file mode 100644 index 0000000..3641584 --- /dev/null +++ b/templates/en_US/mail/xdebbugscc.tx @@ -0,0 +1,4 @@ + +As you requested using X-Debbugs-CC, your message was also forwarded to + <: $xcchdr :> +(after having been given a <: $config.bug :> report number, if it did not have one). -- 2.39.2