X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=blobdiff_plain;f=templates%2Fhtml%2Fshow.tmpl;h=37ea4bf1efd2482a9bdd7de3493347b56009a104;hp=88274f4b81dc7bcc3819fe0eb55244edd86303e2;hb=89c17478db69effd1c96f4e284ad46f5b4d72c17;hpb=9f0c86ad48e5ccdd89c2ae10fc35baee286f3adf diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 88274f4..37ea4bf 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -1,14 +1,26 @@ [% PROCESS 'config/archive_layout.tmpl' %] [% PROCESS 'config/mirrors.tmpl' %] -[%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ]; - nav_arr.push( { title => 'Source packages', url=>make_url('/'), name=>'Source' } ) IF is_source; - nav_arr.push( { prefix=>'Section:', title=>'All packages in this section', url=>make_url("$subsection/"), name=>subsection } ); - nav_arr.push( { prefix=>'Package:', name=>pkg } ); -%] +[%- known_vcs = [ [ 'cvs', 'CVS', 'cvs' ], + [ 'svn', 'Subversion', 'subversion' ], + [ 'bzr', 'bzr', 'bzr' ], + [ 'darcs', 'Darcs', 'darcs' ], + [ 'arch', 'arch', 'tla' ], + [ 'git', 'Git', 'git-core' ], + [ 'hg', 'Hg', 'mercurial' ], ]; + vcs_link = page.get_newest("vcs-browser"); +-%] +[%- suite_name = suite; + SET suite_name = suite_name _ ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite; + nav_arr = [ { prefix=>g('Distribution:'), title=>g('Overview over this suite'), url=>make_url('/','','source',''), name=>suite_name }, ]; + nav_arr.push( { title =>g('Source packages'), url=>make_url('/'), name=>g('Source') } ) IF is_source; + nav_arr.push( { prefix=>g('Section:'), title=>g('All packages in this section'), url=>make_url("$subsection/"), name=>subsection } ); + nav_arr.push( { prefix=>g('Package:'), name=>pkg } ); -%] [% desclang = 'en'; - SET desclang = lang IF desc.$lang.long %] + SET desclang = po_lang IF desc.$po_lang.long; + SET desclang = ddtp_lang IF desc.$ddtp_lang.long %] [%- PROCESS 'html/head.tmpl' - title_tag = ( is_source ? "Details of source package $pkg in $suite" - : "Details of package $pkg in $suite" ) + title_tag = is_source ? g('Details of source package %s in %s', pkg, suite) + : g('Details of package %s in %s', pkg, suite) description = desc.$desclang.short keywords = "$suite, $archive, $section, $subsection, $version" print_search_field = 'packages' @@ -18,7 +30,7 @@ navigation = nav_arr -%] -[% PROCESS 'html/menu.inc' %] +[% PROCESS 'html/util.inc' %] [% FOREACH s IN suites %] [% '
' IF loop.first %] [%- IF s == suite -%] @@ -31,101 +43,115 @@ [% IF src %]
-[% PROCESS menuitem prefix='Source:' title='Source package building this package' url=make_url(src.pkg,'','source','source') name=src.pkg %] +[% PROCESS menuitem prefix=g('Source:') title=g('Source package building this package') url=make_url(src.pkg,'','source','source') name=src.pkg %]
[% END %] [%- PROCESS 'html/messages.tmpl' -%] [% IF is_virtual %] -

Virtual Package: [% pkg %] +

[% g('Virtual Package: %s', pkg) %] [% ELSIF is_source %] -

Source Package: [% pkg %] ([% version %]) +

[% g('Source Package: %s (%s)', pkg, version) %] [% ELSE %] -

Package: [% pkg %] ([% versions.short %]) +

[% g('Package: %s (%s)', pkg, versions.short) %] [% END %] -[%- PROCESS marker text=archive IF archive && archive != main_archive %] -[%- PROCESS marker text=subsection IF subsection == 'non-US' and archive != 'non-US' %] -[%- PROCESS marker text=section IF section && section != main_section %] -[%- PROCESS marker text='essential' IF page.get_newest('essential') == 'yes' %]

+[%- PROCESS marker text=archive title=mirrors.$archive.title IF archive && archive != main_archive %] +[%- PROCESS marker text=section title=section_titles.$section IF section && section != main_section %] +[%- PROCESS marker text=g('essential') title=g('package manager will refuse to remove this package by default') IF page.get_newest('essential') == 'yes' %] [% UNLESS is_virtual %]
-

Links for [% pkg %]

-

Debian Resources:

+

[% g('Links for %s', pkg) %]

+

[% g('%s Resources:', organisation) %]

-[% vcs_link = page.get_newest("vcs-browser") %] -[% #FIXME: should this only be used for the PTS? - known_vcs = [ [ 'cvs', 'CVS', 'cvs' ], - [ 'svn', 'Subversion', 'subversion' ], - [ 'bzr', 'bzr', 'bzr' ], - [ 'darcs', 'Darcs', 'darcs' ], - [ 'arch', 'arch', 'tla' ], - [ 'git', 'Git', 'git-core' ], - [ 'hg', 'Hg', 'mercurial' ], ]; - FOREACH vcs IN known_vcs; +[% IF vcs_link %] +
  • [% g('Debian Source Repository') %] +[%- FOREACH vcs IN known_vcs; vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2; vcs_info = page.get_newest("vcs-$vcs_id"); SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info; - IF vcs_info; %] -

    Debian Package Repository (VCS: -[% vcs_name %]):
    [% vcs_info %]

    -[% IF vcs_link %] -

    Debian Package Repository (Browsable):
    [% vcs_link %]

    -[% END; END; END %] + IF vcs_info %] + ([% vcs_name %]) +[% END; END -%] +
  • +[% END -%] + +[% IF patch_tracking_url && src %] + [% FOREACH src.downloads %] + [% IF name.match('\.diff\.(gz|bz2|lzma)$') %] +
  • [% g("%s Patch Tracker", organisation) %]
  • + [% END -%] + [% END -%] +[% ELSIF patch_tracking_url && is_source %] + [% FOREACH srcfiles %] + [% IF filename.match('\.diff\.(gz|bz2|lzma)$') %] +
  • [% g("%s Patch Tracker", organisation) %]
  • + [% END -%] + [% END -%] +[% END -%] + + [% IF src %] -

    Download Source Package [% src.pkg %]: +

    [% g('Download Source Package %s:', src.url, src.pkg) %] [% FOREACH src.downloads %] [% '

    ' IF loop.last %] [% END %] [% IF src.downloads.size == 0 %] - Not found + [% g('Not found') %] [% END %] [% END %] [% IF maintainers.size == 1 -%] -

    Maintainer:

    - [%- FOREACH maintainers -%] - [% name | html %] - (QA Page) - [%- END -%] +

    [% g('Maintainer:') %]

    [%- ELSE -%] -

    Maintainers:

    - [%- FOREACH maintainers -%] - [%- '' IF loop.last -%] - [%- END -%] +

    [% g('Maintainers:') %]

    [%- END %] +[%- FOREACH maintainers; + mailarchiveurl = ''; + IF (matches = mail.match('^(.*)@lists\.debian\.org$')); + mailarchiveurl = 'http://lists.debian.org/' _ uri_escape(matches.0) _ '/'; + ELSIF (matches = mail.match('^(.*)@lists\.alioth\.debian\.org$')); + mailarchiveurl = 'http://lists.alioth.debian.org/pipermail/' _ uri_escape(matches.0) _ '/'; + ELSIF (matches = mail.match('^(.*)@lists\.ubuntu\.com$')); + mailarchiveurl = 'http://lists.ubuntu.com/archives/' _ uri_escape(matches.0) _ '/'; + END -%] + [%- '' IF loop.last -%] +[%- END -%] [% url = page.get_newest('url'); + SET url = page.get_newest('homepage') IF page.get_newest('homepage'); IF url %] -

    External Resources:

    -

    Homepage: [% url | html %]

    +

    [% g('External Resources:') %]

    + [% END %] [% FOREACH sim IN similar %] [% IF loop.first %] -

    Similar packages:

    +

    [% g('Similar packages:') %]