]> git.deb.at Git - deb/packages.git/blobdiff - templates/html/show.tmpl
Make short descriptions translatable
[deb/packages.git] / templates / html / show.tmpl
index 082079efcd7f0e76b3784a65337e87ef3acaaa57..0c27c00849c734ffd9e6160fd381224695b2a20d 100644 (file)
@@ -67,9 +67,9 @@
 <li><a href="[% (is_source ? src_bugs_url : bugs_url) _ pkg | uri %]">[% g('Bug Reports') %]</a></li>
 
 [% IF src.pkg -%]
-<li><a href="[% pts_url _ src.pkg | uri %]">g('Developer Information (PTS)') %]</a></li>
+<li><a href="[% pts_url _ src.pkg | uri %]">[% g('Developer Information (PTS)') %]</a></li>
 [% ELSIF is_source %]
-<li><a href="[% pts_url _ pkg | uri %]">g('Developer Information (PTS)') %]</a></li>
+<li><a href="[% pts_url _ pkg | uri %]">[% g('Developer Information (PTS)') %]</a></li>
 [%- END %]
 
 [% IF files && (!archive or archive == main_archive or archive == 'security') %]
 [% changelog_link = 'changelog';
    changelog_link = "$changelogs_url$files.changelog.path" %] 
 <h2>[% g('Experimental package') %]</h2>
-<p>[% g('Warning: This package is from the <strong>experimental</strong> distribution.
-That means it is likely unstable or buggy, and it may even cause data loss.
-Please be sure to consult the <a href="%s">changelog</a> and other possible documentation before
-using it.', changelog_link) %]</p>
+<p>[% g('Warning: This package is from the <strong>experimental</strong> distribution. That means it is likely unstable or buggy, and it may even cause data loss. Please be sure to consult the <a href="%s">changelog</a> and other possible documentation before using it.',
+       changelog_link) %]</p>
 [% END %]
 [% IF subsection == "debian-installer" %]
 <h2>[% g('debian-installer udeb package') %]</h2>
-<p>[% g('Warning: This package is intended for the use in building
-<a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only.
-Do not install it on a normal %s system.', organisation ) %]</p>
+<p>[% g('Warning: This package is intended for the use in building <a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only. Do not install it on a normal %s system.',
+       organisation ) %]</p>
 [% END %]
 </div>
 [% END %]
@@ -179,14 +176,16 @@ Do not install it on a normal %s system.', organisation ) %]</p>
     <div id="ptags"><p>
     <a href="[% tags_url %]edit.html?pkg=[% pkg | uri %]">[% g('Tags') %]</a>:
   [%- END %]
-  [% facet = tag.0;
-     facet_name = debtags_voc.$facet;
-     tag_id = "$tag.0::$tag.1";
-     tag_name = debtags_voc.$tag_id;
+  [% facet = tag.0; lfacet = "$facet-$lang"; 
+     facet_name = debtags_voc.$lfacet;
+     SET facet_name = debtags_voc.$facet UNLESS facet_name;
+     tag_id = "$tag.0::$tag.1"; ltag = "$tag_id-$lang";
+     tag_name = debtags_voc.$ltag;
+     SET tag_name = debtags_voc.$tag_id UNLESS tag_name;
    %]
   [% facet_name _ ': ' UNLESS old_facet && facet == old_facet %]
   [% IF tag_name %]
-   <a href="/about/debtags#[% string2id(tag_id) %]">[% tag_name %]</a>[% ', ' UNLESS loop.last %]
+   <a href="/about/debtags#[% string2id(tag_id) %]">[% tag_name | html %]</a>[% ', ' UNLESS loop.last %]
   [% ELSE %]
   [% tag_id %][% ', ' UNLESS loop.last %]
   [% END %]
@@ -197,19 +196,19 @@ Do not install it on a normal %s system.', organisation ) %]</p>
   [%- END %]
 [% END %]
 
-[% FOREACH providers %]
+[% FOREACH p IN providers %]
   [% IF loop.first %]<div id="pdeps"><h2>[% g('Packages providing %s', pkg) %]</h2><dl>[% END %]
-    <dt>[% IF available %]<a href="[% make_url(name,'','source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]</dt>
-    <dd>[% desc %]</dd>
+    <dt>[% IF p.available %]<a href="[% make_url(name,'','source','') %]">[% p.name %]</a>[% ELSE; p.name; END %]</dt>
+    <dd>[% IF p.trans_desc.$lang; p.trans_desc.$lang | html; ELSE; p.desc | html; END %]</dd>
   [% '</dl></div>' IF loop.last %]
 [% END %]
 </div> <!-- pdesctab -->
 [% END %]
 
-[% FOREACH binaries %]
+[% FOREACH b IN binaries %]
   [% IF loop.first %]<div id="pbinaries">[% g('The following binary packages are built from this source package:') %]<dl>[% END %]
-    <dt>[% IF available %]<a href="[% make_url(name,'','source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]</dt>
-    <dd>[% desc %]</dd>    
+    <dt>[% IF b.available %]<a href="[% make_url(name,'','source','') %]">[% b.name %]</a>[% ELSE; b.name; END %]</dt>
+    <dd>[% IF b.trans_desc.$lang; b.trans_desc.$lang | html; ELSE; b.desc | html; END %]</dd>
   [% '</dl></div>' IF loop.last %]
 [% END %]
 
@@ -218,14 +217,14 @@ Do not install it on a normal %s system.', organisation ) %]</p>
     <div id="pdeps">
     <h2>[% g('Other Packages Related to %s', pkg) %]</h2>
 
-    <table id="pdeplegend" class="visual" summary="legend"><tr>
+    <table id="pdeplegend" class="visual" summary="[% g('legend') %]"><tr>
     [% IF is_source %]
-    <td><ul class="uladep"><li>build-depends</li></ul></td>
-    <td><ul class="ulidep"><li>build-depends-indep</li></ul></td>
+    <td><ul class="uladep"><li>[% g('build-depends') %]</li></ul></td>
+    <td><ul class="ulidep"><li>[% g('build-depends-indep') %]</li></ul></td>
     [% ELSE %]
-    <td><ul class="uldep"><li>depends</li></ul></td>
-    <td><ul class="ulrec"><li>recommends</li></ul></td>
-    <td><ul class="ulsug"><li>suggests</li></ul></td>
+    <td><ul class="uldep"><li>[% g('depends') %]</li></ul></td>
+    <td><ul class="ulrec"><li>[% g('recommends') %]</li></ul></td>
+    <td><ul class="ulsug"><li>[% g('suggests') %]</li></ul></td>
     [% END %]
     </tr></table>
   [%- END %]
@@ -235,14 +234,18 @@ Do not install it on a normal %s system.', organisation ) %]</p>
     [% '<li>' UNLESS is_old_pkgs %]
     [% FOREACH alternatives %]
       [% '<dl>' IF loop.first %]
-      <dt>[% IF loop.first %]<span class="nonvisual">[% id %]:</span>[% ELSE %]or [% END %]
+      <dt>[% IF loop.first %]<span class="nonvisual">[% id %]:</span>[% ELSE %][% g('or ') %][% END %]
        [% IF suite %]<a href="[% make_url(name,'','suite',suite,'source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]
        [% ' (' _ version _ ')' IF version %]
         [% ' [' _ arch_str _ ']' IF arch_str %]</dt>
       [%- IF !is_old_pkgs -%]
-        <dd>[% desc -%]
+        <dd>[% IF trans_desc.$lang; trans_desc.$lang | html; ELSE; desc | html; END -%]
         [%- IF providers.pkgs.size > 0 -%]
-          [% '<br>also a ' IF providers.also %][% g('virtual package provided by') %]
+         [% IF providers.also;
+               '<br>' _ g('also a virtual package provided by');
+            ELSE;
+               g('virtual package provided by');
+            END; %]
          [% js_id = name %]
            <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]">[% FOREACH provider IN providers.pkgs %]<a href="[% make_url(provider,'','suite',suite,'source','') %]">[% provider %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
        [% IF providers.pkgs.size > 10 %]
@@ -264,7 +267,7 @@ Do not install it on a normal %s system.', organisation ) %]</p>
 [% FOREACH d IN downloads %]
   [% IF loop.first -%]
     <div id="pdownload">
-    <h2>Download [% pkg %]</h2>
+    <h2>[% g('Download %s', pkg) %]</h2>
     
     <table summary="[% g('The download table links to the download of the package and a file overview. In addition it gives information about the package size and the installed size.') %]">
     <caption class="hidecss">[% g('Download for all available architectures') %]</caption>