[Blends-commit] [SCM] website branch, master, updated. fee6695d591460d4515e4545e4d9d185a24bdced

Ole Streicher olebole at debian.org
Sun Mar 20 20:51:06 UTC 2016


The following commit has been merged in the master branch:
commit fee6695d591460d4515e4545e4d9d185a24bdced
Author: Ole Streicher <olebole at debian.org>
Date:   Sun Mar 20 21:49:44 2016 +0100

    Move desc into properties as well
    Now, all attributes  are in properties, and we could use the "properties" dict
    instead of the DependantPackage.

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 1433c60..e4a8c55 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -729,10 +729,7 @@ class DependantPackage:
                                           # because Enhances relations are quite seldom
         self.properties['stable_testing_version'] = []  # (release, version) tuples where release is codename for stable and testing
         self.properties['version'] = []  # list of {'release', 'version', 'archs'} dictionary containing version and architecture information
-        self.desc           = {}    # Prospective packages should have a description ...
-                                    # ... which could be copied to (or from if exists)
-                                    # WNPP bug and finally can be used for packaging
-        self.desc['en']     = {}    # An English description should be available in any case
+        self.properties['desc'] = {'en': {}}  # An English description should be available in any case
 
     # sort these objects according to the package name
     def __cmp__(self, other):
@@ -744,8 +741,6 @@ class DependantPackage:
 
     def __str__(self):
         ret = "pkg:"    + self.properties['name']
-        if self.desc:
-            ret += ", desc: "         + str(self.desc)
         for prop in self.properties:
             ret += ", %s: %s" % (prop, str(self.properties[prop]))
 
@@ -1065,15 +1060,15 @@ class TaskDependencies:
             return
         for lang in languages:
             if ddtptranslations['description_' + lang['ddtp']]:
-                self.metapkg.desc[lang['ddtp']] = {
+                self.metapkg.properties['desc'][lang['ddtp']] = {
                     'short': ddtptranslations['description_' + lang['ddtp']]
                 }
                 try:
-                    self.metapkg.desc[lang['ddtp']]['long'] = PrepareMarkdownInput(ddtptranslations['long_description_' + lang['ddtp']])
+                    self.metapkg.properties['desc'][lang['ddtp']]['long'] = PrepareMarkdownInput(ddtptranslations['long_description_' + lang['ddtp']])
                 except AttributeError as err:
                     logger.error("===> AttributeError in metapackage long %s (lang='%s'): '%s'; ErrTxt: %s"
                                  % (self.metapkg.properties['name'], lang['ddtp'], ddtptranslations['long_description_' + lang['ddtp']], err))
-                    self.metapkg.desc[lang['ddtp']]['long'] = 'Missing long description'
+                    self.metapkg.properties['desc'][lang['ddtp']]['long'] = 'Missing long description'
 
     def _AppendDependency2List(self, dep, source):
         # Append dependency which was found in the tasks file if not Ignore / Avoid and
@@ -1123,8 +1118,8 @@ class TaskDependencies:
                         logger.error("Duplicate description entry in task %s; you probably want to use Pkg-Description field instead!" % self.task)
                     else:
                         (shortDesc, longDesc) = SplitDescription(stanza['description'])
-                        self.metapkg.desc['en']['short'] = shortDesc
-                        self.metapkg.desc['en']['long']  = longDesc
+                        self.metapkg.properties['desc']['en']['short'] = shortDesc
+                        self.metapkg.properties['desc']['en']['long']  = longDesc
                         found_description = True
                     continue
                 if key == 'Meta-Depends':
@@ -1318,10 +1313,10 @@ class TaskDependencies:
                                      % stanza['pkg-description'].splitlines()[0])
                     else:
                         # Only update use description from task file if not known from official package
-                        if dep.desc['en'] == {}:
+                        if dep.properties['desc']['en'] == {}:
                             (shortDesc, longDesc) = SplitDescription(stanza['pkg-description'])
-                            dep.desc['en']['short'] = shortDesc
-                            dep.desc['en']['long']  = longDesc
+                            dep.properties['desc']['en']['short'] = shortDesc
+                            dep.properties['desc']['en']['long']  = longDesc
                         else:
                             fields_obsolete.append(key)
                             continue
@@ -1348,7 +1343,7 @@ class TaskDependencies:
             # seek for certain field set in the tasks file to move the dependency into different
             # categories of development status of not yet included packages provided that there
             # is at least a package description given
-            if dep.properties['pkgstatus'] == 'unknown' and dep.desc['en'] != {}:
+            if dep.properties['pkgstatus'] == 'unknown' and dep.properties['desc']['en'] != {}:
                 flag = 0
                 # first check those packages where some work was just done
                 for status in ['pkgvcs', 'unofficial', 'wnpp', 'prospective']:
@@ -1428,7 +1423,7 @@ class TaskDependencies:
                     self.dependencies[dep.properties['pkgstatus']].append(dep)
 
                 # Warn about remaining information of prospective package
-                if dep.desc['en'] and dep.desc['en']['short'] and 'debtags' not in dep.properties:
+                if dep.properties['desc']['en'] and dep.properties['desc']['en']['short'] and 'debtags' not in dep.properties:
                     # prevent informing about packages which are just duplicated because of a broken query
                     logger.info("WNPP for package %s just closed - extra information can be removed from task file %s."
                                 % (dep.properties['name'], self.task))
@@ -1516,14 +1511,14 @@ class TaskDependencies:
 
                 for lang in languages:
                     if row.get('description_' + lang['ddtp']):
-                        dep.desc[lang['ddtp']] = {
+                        dep.properties['desc'][lang['ddtp']] = {
                             'short': row['description_' + lang['ddtp']]
                         }
                         if row['long_description_' + lang['ddtp']]:
-                            dep.desc[lang['ddtp']]['long'] = PrepareMarkdownInput(row['long_description_' + lang['ddtp']])
-                if 'short' not in dep.desc['en']:
+                            dep.properties['desc'][lang['ddtp']]['long'] = PrepareMarkdownInput(row['long_description_' + lang['ddtp']])
+                if 'short' not in dep.properties['desc']['en']:
                     logger.error("Dep has no English short description: %s", dep.properties['name'])
-                    dep.desc['en']['short'] = "??? missing short description for package %s :-(" % dep.properties['name']
+                    dep.properties['desc']['en']['short'] = "??? missing short description for package %s :-(" % dep.properties['name']
 
                 if row['maintainer']:
                     (_name, _url) = email.utils.parseaddr(row['maintainer'])
@@ -1575,12 +1570,12 @@ class TaskDependencies:
                                                   'version':row['version']})
                 dep.properties['pkg-url'] = 'http://ftp-master.debian.org/new/%s_%s.html' % (row['source'], row['version'])
                 # Warn about remaining information of prospective package
-                if (dep.desc['en'] and dep.desc['en']['short']) or dep.properties['homepage'] != HOMEPAGENONE:
+                if (dep.properties['desc']['en'] and dep.properties['desc']['en']['short']) or dep.properties['homepage'] != HOMEPAGENONE:
                     logger.info("The package %s is not yet in Debian but it is just in the new queue. (Task %s)" % (dep.properties['name'], self.task))
                 for prop in PROPERTIES:
                     dep.properties[prop] = row[prop]
-                dep.desc['en']['short'] = row['description_en']
-                dep.desc['en']['long']  = PrepareMarkdownInput(row['long_description_en'])
+                dep.properties['desc']['en']['short'] = row['description_en']
+                dep.properties['desc']['en']['long']  = PrepareMarkdownInput(row['long_description_en'])
                 if row['maintainer']:
                     (_name, _url) = email.utils.parseaddr(row['maintainer'])
                     dep.properties['maintainer'] = {'name': _name, 'email': _url}
@@ -1653,7 +1648,7 @@ class TaskDependencies:
                 dep.properties['version'].append({'archs':'all', 'release':'VCS',
                                                   'version':row['version']})
                 # Warn about remaining information of prospective package
-                if (dep.desc['en'] and dep.desc['en']['short']) or dep.properties['homepage'] != HOMEPAGENONE:
+                if (dep.properties['desc']['en'] and dep.properties['desc']['en']['short']) or dep.properties['homepage'] != HOMEPAGENONE:
                     logger.info("The package %s is not yet in Debian but it is just in Blends %s Vcs. (Task %s)" % (dep.properties['name'], row['blend'], self.task))
                 for prop in PROPERTIES:
                     dep.properties[prop] = row[prop]
@@ -1665,8 +1660,8 @@ class TaskDependencies:
                 if int(row['wnpp']) > 0:
                     dep.properties['wnpp'] = row['wnpp']
                 dep.SetPublications(self.task, row)
-                dep.desc['en']['short'] = row['description_en']
-                dep.desc['en']['long'] = PrepareMarkdownInput(row['long_description_en'])
+                dep.properties['desc']['en']['short'] = row['description_en']
+                dep.properties['desc']['en']['long'] = PrepareMarkdownInput(row['long_description_en'])
                 if row['maintainer']:
                     (_name, _url) = email.utils.parseaddr(row['maintainer'])
                     dep.properties['maintainer'] = {'name': _name, 'email': _url}
@@ -1686,17 +1681,17 @@ class TaskDependencies:
             for dep in self.dependencies[status]:
                 if dep.properties['name'] not in pkgs_in_pool and dep.properties['name'] not in pkgs_in_new and dep.properties['name'] not in pkgs_virtual and dep.properties['pkgstatus'] in ('unknown', 'pkgvcs'):
                     # If only Vcs fields are given than we currently do not know enough to print package information
-                    if dep.properties['pkgstatus'] == 'pkgvcs' and (dep.properties['homepage'] == HOMEPAGENONE or dep.desc['en'] == {}):
+                    if dep.properties['pkgstatus'] == 'pkgvcs' and (dep.properties['homepage'] == HOMEPAGENONE or dep.properties['desc']['en'] == {}):
                         logger.error("Package %s in task %s has only Vcs information - please provide more information" % (dep.properties['name'], self.task))
                         self.dependencies[status].remove(dep)
                         # dep.properties['pkgstatus'] == 'unknown'
                     if dep.properties['homepage'] == HOMEPAGENONE:
-                        if dep.desc['en'] == {}:
+                        if dep.properties['desc']['en'] == {}:
                             logger.error("Package %s in task %s neither in pool nor new and is lacking homepage and description - ignored" % (dep.properties['name'], self.task))
                         else:
                             logger.error("Package %s in task %s neither in pool nor new and has no homepage information - ignored (%s)" % (dep.properties['name'], self.task, dep.properties['pkgstatus']))
                     else:
-                        if dep.desc['en'] == {}:
+                        if dep.properties['desc']['en'] == {}:
                             logger.error("Package %s neither in pool nor new and has no description - ignored" % dep.properties['name'])
                 else:
                     # prevent printing WNPP of packages inside Debian
diff --git a/webtools/blendstasktools_udd.py b/webtools/blendstasktools_udd.py
index 8237603..81dd9cd 100644
--- a/webtools/blendstasktools_udd.py
+++ b/webtools/blendstasktools_udd.py
@@ -690,10 +690,7 @@ class DependantPackage:
         self.screenshots    = []    # list of {'version', 'url'} dictionary containing screenshot information
         self.icon           = None  # URL of small screenshot icon
         self.screenshot_url = None  # URL to screenshots.debian.net
-        self.desc           = {}    # Prospective packages should have a description ...
-                                    # ... which could be copied to (or from if exists)
-                                    # WNPP bug and finally can be used for packaging
-        self.desc['en']     = {}    # An English description should be available in any case
+        self.properties['desc'] = {'en': {}}  # An English description should be available in any case
         self.dep_strength   = 0     # Type of Dependency (Depends, Recommends, Suggests, Experimental, New, Avoid, Ignore, WNPP
 
     # sort these objects according to the package name
@@ -706,18 +703,12 @@ class DependantPackage:
 
     def __str__(self):
         ret = "pkg:"    + self.properties['name']
-        if self.dep_strength:
-            ret += ", Dep_strength: " + self.dep_strength
-        if self.desc:
-            ret += ", desc: "         + str(self.desc)
         for prop in self.properties:
             ret += ", %s: %s" % (prop, str(self.properties[prop]))
         ret += ", debtags = " + str(self.debtags)
         if self.icon:
             ret += ", screenshoticon = " + self.icon
 
-        # if self.desc['en']:
-        #    ret += ", desc['en']:"   + str(self.desc['en'])
         return ret
 
     def SetPublications(self, taskname, row):
@@ -989,15 +980,15 @@ class TaskDependencies:
             return
         for lang in languages:
             if ddtptranslations['description_' + lang['ddtp']]:
-                self.metapkg.desc[lang['ddtp']] = {
+                self.metapkg.properties['desc'][lang['ddtp']] = {
                     'short': ddtptranslations['description_' + lang['ddtp']]
                 }
                 try:
-                    self.metapkg.desc[lang['ddtp']]['long'] = PrepareMarkdownInput(dtptranslations['long_description_' + lang['ddtp']])
+                    self.metapkg.properties['desc'][lang['ddtp']]['long'] = PrepareMarkdownInput(dtptranslations['long_description_' + lang['ddtp']])
                 except AttributeError as err:
                     logger.error("===> AttributeError in metapackage long %s (lang='%s'): '%s'; ErrTxt: %s"
                                  % (self.metapkg.properties['name'], lang, ddtptranslations['long_description_' + lang['ddtp']], err))
-                    self.metapkg.desc[lang['ddtp']]['long'] = 'Missing long description'
+                    self.metapkg.properties['desc'][lang['ddtp']]['long'] = 'Missing long description'
 
     def _AppendDependency2List(self, dep):
         # Append dependency which was found in the tasks file if not Ignore / Avoid and
@@ -1156,14 +1147,14 @@ class TaskDependencies:
 
             for lang in languages:
                 if row.get('description_' + lang['ddtp']):
-                    dep.desc[lang['ddtp']] = {
+                    dep.properties['desc'][lang['ddtp']] = {
                         'short': row['description_' + lang['ddtp']]
                     }
                     if row['long_description_' + lang['ddtp']]:
-                        dep.desc[lang['ddtp']]['long'] = PrepareMarkdownInput(row['long_description_' + lang['ddtp']])
-            if 'short' not in dep.desc['en']:
+                        dep.properties['desc'][lang['ddtp']]['long'] = PrepareMarkdownInput(row['long_description_' + lang['ddtp']])
+            if 'short' not in dep.properties['desc']['en']:
                 logger.error("Dep has no English short description: %s", dep.properties['name'])
-                dep.desc['en']['short'] = "??? missing short description for package %s :-(" % dep.properties['name']
+                dep.properties['desc']['en']['short'] = "??? missing short description for package %s :-(" % dep.properties['name']
                     
             (_name, _url) = email.utils.parseaddr(row['maintainer'])
             dep.properties['maintainer'] = {'name': _name, 'email': _url}
@@ -1194,8 +1185,8 @@ class TaskDependencies:
         if curs.rowcount > 0:
             printedName, shortDesc, longDesc = curs.fetchone()
             self.metapkg.properties['PrintedName'] = printedName
-            self.metapkg.desc['en']['short'] = shortDesc
-            self.metapkg.desc['en']['long']  = PrepareMarkdownInput(longDesc)
+            self.metapkg.properties['desc']['en']['short'] = shortDesc
+            self.metapkg.properties['desc']['en']['long']  = PrepareMarkdownInput(longDesc)
 
 
         # Get the package_name, license, dependency of the official dependencies of the task
diff --git a/webtools/templates/debian-astro_idx.xhtml b/webtools/templates/debian-astro_idx.xhtml
index 8775b5b..c49d63b 100644
--- a/webtools/templates/debian-astro_idx.xhtml
+++ b/webtools/templates/debian-astro_idx.xhtml
@@ -75,8 +75,8 @@
 			<strong>${pkg_name.capitalize()}:</strong>
 			<span py:choose="">
 			  <span py:when="pkg is None"> </span>
-			  <span py:when="lang in pkg.desc">${pkg.desc[lang].get('short', '')}</span>
-			  <span py:otherwise="">${pkg.desc['en'].get('short', '')}</span>
+			  <span py:when="lang in pkg.properties['desc']">${pkg.properties['desc'][lang].get('short', '')}</span>
+			  <span py:otherwise="">${pkg.properties['desc']['en'].get('short', '')}</span>
 			</span>
 		      </p>
 		      <p style="margin-bottom:0;">
diff --git a/webtools/templates/packagelist.xhtml b/webtools/templates/packagelist.xhtml
index 3ac0b7b..6268a44 100644
--- a/webtools/templates/packagelist.xhtml
+++ b/webtools/templates/packagelist.xhtml
@@ -45,12 +45,12 @@
       <py:for each="task in taskskeys">
 	<a name="${task}" id="${task}"/>
 	<h2><a href="${task}" name="${task}" id="${task}">${tasks[task].metapkg.properties['PrintedName'].capitalize()} - <span py:choose="">
-	<span py:when="lang in tasks[task].metapkg.desc">${tasks[task].metapkg.desc[lang]['short']}</span>
-	<span py:otherwise="">${tasks[task].metapkg.desc['en']['short']}</span>
+	<span py:when="lang in tasks[task].metapkg.properties['desc']">${tasks[task].metapkg.properties['desc'][lang]['short']}</span>
+	<span py:otherwise="">${tasks[task].metapkg.properties['desc']['en']['short']}</span>
 	</span></a></h2>
 	<p py:choose="">
-	  <span py:when="lang in tasks[task].metapkg.desc">${render_longdesc(tasks[task].metapkg.desc[lang].get('long', ''))}</span>
-	  <span py:otherwise="">${render_longdesc(tasks[task].metapkg.desc['en'].get('long', ''))}</span>
+	  <span py:when="lang in tasks[task].metapkg.properties['desc']">${render_longdesc(tasks[task].metapkg.properties['desc'][lang].get('long', ''))}</span>
+	  <span py:otherwise="">${render_longdesc(tasks[task].metapkg.properties['desc']['en'].get('long', ''))}</span>
 	</p>
 	<py:for each="pstatus in dependencies[task]">
 	  <h3>${headline[pstatus]}</h3>
@@ -65,8 +65,8 @@
                   </span>
 		  </dt>
 		  <dd><span py:choose="">
-		    <span py:when="lang in project.desc">${project.desc[lang]['short']}</span>
-		    <span py:otherwise="">${project.desc['en']['short']}</span>
+		    <span py:when="lang in project.properties['desc']">${project.properties['desc'][lang]['short']}</span>
+		    <span py:otherwise="">${project.properties['desc']['en']['short']}</span>
 		  </span>
 		  </dd>
 	    </py:for>
diff --git a/webtools/templates/packages.xhtml b/webtools/templates/packages.xhtml
index 7d6f0c3..783b082 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -213,26 +213,26 @@ function show_fulldesc(hash) {
 	</h1>
 	<em>
 	  <py:choose>
-	    <py:when test="lang in tasks[task].metapkg.desc">
-	      ${tasks[task].metapkg.desc[lang]['short']}
+	    <py:when test="lang in tasks[task].metapkg.properties['desc']">
+	      ${tasks[task].metapkg.properties['desc'][lang]['short']}
 	    </py:when>
 	    <py:otherwise>
-	      ${tasks[task].metapkg.desc['en']['short']}
+	      ${tasks[task].metapkg.properties['desc']['en']['short']}
 	    </py:otherwise>
 	  </py:choose>
 	</em>
 	<py:choose>
-	  <py:when test="lang in tasks[task].metapkg.desc">
+	  <py:when test="lang in tasks[task].metapkg.properties['desc']">
 	    <a class="editlink" title="${fixtranslation}" href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${tasks[task].metapkg.properties['name']}" py:if="lang != 'en'">
 	      ✏
 	    </a>
-	    ${render_longdesc(tasks[task].metapkg.desc[lang].get('long', ''))}
+	    ${render_longdesc(tasks[task].metapkg.properties['desc'][lang].get('long', ''))}
 	  </py:when>
 	  <py:otherwise>
 	    <a class="editlink" title="${translatedesc}" href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${tasks[task].metapkg.properties['name']}" py:if="lang != 'en'">
 	      ✏
 	    </a>
-	    ${render_longdesc(tasks[task].metapkg.desc['en'].get('long', ''))}
+	    ${render_longdesc(tasks[task].metapkg.properties['desc']['en'].get('long', ''))}
 	  </py:otherwise>
 	</py:choose>
 	<table width="90%">
@@ -320,8 +320,8 @@ function show_fulldesc(hash) {
 		  <a onclick="toggle_visibility('${project.properties['name']}');"
 		     style="cursor:pointer;" title="Click to toggle details">
 		    <py:choose>
-	              <py:when test="lang in project.desc">${project.desc[lang]['short']}</py:when>
-	              <py:otherwise>${project.desc['en']['short']}</py:otherwise>
+	              <py:when test="lang in project.properties['desc']">${project.properties['desc'][lang]['short']}</py:when>
+	              <py:otherwise>${project.properties['desc']['en']['short']}</py:otherwise>
 		    </py:choose>
 		  </a>
 		</td>
@@ -332,8 +332,8 @@ function show_fulldesc(hash) {
 		  <h3>
 		    ${project.properties['name'].capitalize()}:
 		    <py:choose>
-	              <py:when test="lang in project.desc">${project.desc[lang]['short']}</py:when>
-	              <py:otherwise>${project.desc['en']['short']}</py:otherwise>
+	              <py:when test="lang in project.properties['desc']">${project.properties['desc'][lang]['short']}</py:when>
+	              <py:otherwise>${project.properties['desc']['en']['short']}</py:otherwise>
 		    </py:choose>
 		  </h3>
 		  <dl class="pkgdesc">
@@ -362,13 +362,13 @@ function show_fulldesc(hash) {
 		    </py:choose>
 		    <dd>
 		      <py:choose>
-			<py:when test="lang != 'en' and lang in project.desc">
+			<py:when test="lang != 'en' and lang in project.properties['desc']">
 			  <a class="editlink" title="${fixtranslation}" href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.properties['name']}">
 			    ✏
 			  </a>
-			  ${render_longdesc(project.desc[lang].get('long', ''))}
+			  ${render_longdesc(project.properties['desc'][lang].get('long', ''))}
 			</py:when>
-			<py:otherwise>${render_longdesc(project.desc['en'].get('long',''))}</py:otherwise>
+			<py:otherwise>${render_longdesc(project.properties['desc']['en'].get('long',''))}</py:otherwise>
 		      </py:choose>
 		    </dd>
 		    <py:if test="'published' in project.properties">
@@ -602,7 +602,7 @@ function show_fulldesc(hash) {
 		    <py:if test="project.properties['component'] == 'main'
 				 and project.properties['pkgstatus'] in ('official_high', 'official_low', 'experimental')
 				 and (not 'screenshot' in project.properties or 'debtags' not in project.properties
-				      or (lang != 'en' and lang not in project.desc))">
+				      or (lang != 'en' and lang not in project.properties['desc']))">
 		      <dt>Improve entry</dt>
 		      <dd>
 			<ul class="desc-inline">
@@ -616,7 +616,7 @@ function show_fulldesc(hash) {
 			      Create tags
 			    </a>
 			  </li>
-			  <li py:if="lang != 'en' and lang not in project.desc">
+			  <li py:if="lang != 'en' and lang not in project.properties['desc']">
 			    <a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${project.properties['name']}">
 			      ${translatedesc}
 			    </a>
diff --git a/webtools/templates/tasks.xhtml b/webtools/templates/tasks.xhtml
index 7444e5d..dd85f9b 100644
--- a/webtools/templates/tasks.xhtml
+++ b/webtools/templates/tasks.xhtml
@@ -31,14 +31,14 @@
 			<div class="row">
 				<div class="pkgname">${tasks[task].metapkg.properties['PrintedName'].capitalize()}</div>
 				<div class="pkgdesc" py:choose="">
-				  <div py:when="lang in tasks[task].metapkg.desc">${tasks[task].metapkg.desc[lang]['short']}</div>
-				  <div py:otherwise="">${tasks[task].metapkg.desc['en']['short']}</div>
+				  <div py:when="lang in tasks[task].metapkg.properties['desc']">${tasks[task].metapkg.properties['desc'][lang]['short']}</div>
+				  <div py:otherwise="">${tasks[task].metapkg.properties['desc']['en']['short']}</div>
 				</div>
 				<p><span py:choose="">
-	           <span py:when="lang in tasks[task].metapkg.desc">${render_longdesc(tasks[task].metapkg.desc[lang].get('long', ''))}
+	           <span py:when="lang in tasks[task].metapkg.properties['desc']">${render_longdesc(tasks[task].metapkg.properties['desc'][lang].get('long', ''))}
                      <div class="transmpkg" py:if="lang != 'en'"><a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${tasks[task].metapkg.properties['name']}">${fixtranslation}</a></div>
                    </span>
-	           <span py:otherwise="">${render_longdesc(tasks[task].metapkg.desc['en'].get('long', ''))}
+	           <span py:otherwise="">${render_longdesc(tasks[task].metapkg.properties['desc']['en'].get('long', ''))}
                      <div class="transmpkg" py:if="lang != 'en'"><a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${tasks[task].metapkg.properties['name']}">${translatedesc}</a></div>
                    </span>
                  </span></p>
@@ -85,8 +85,8 @@
 	       <span class="wnpp" py:if="'wnpp' in project.properties"> - <a href="http://bugs.debian.org/${project.properties['wnpp']}">wnpp</a></span>
 	     </div>
 	     <div class="pkgdesc" py:choose="">
-	           <div py:when="lang in project.desc">${project.desc[lang]['short']}</div>
-	           <div py:otherwise="">${project.desc['en']['short']}</div>
+	           <div py:when="lang in project.properties['desc']">${project.properties['desc'][lang]['short']}</div>
+	           <div py:otherwise="">${project.properties['desc']['en']['short']}</div>
 	     </div>
 	     <div py:choose="project.properties['homepage']">
                 <span py:when="'#'">${nohomepage}</span>
@@ -146,7 +146,7 @@
 	     </div>
             <div py:if="lang != 'en' and project.properties['component'] == 'main' and project.properties['pkgstatus'] != 'new' and project.properties['pkgstatus'] != 'pkgvcs'">
 	       <div py:choose="">
-	           <div class="trans" py:when="lang in project.desc"><a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.properties['name']}">${fixtranslation}</a></div>
+	           <div class="trans" py:when="lang in project.properties['desc']"><a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/forexternalreview/${project.properties['name']}">${fixtranslation}</a></div>
 	           <div class="trans-missing" py:otherwise=""><a href="http://ddtp.debian.net/ddtss/index.cgi/${lang}/fetch?package=${project.properties['name']}">${translatedesc}</a></div>
                </div>
             </div>
@@ -156,8 +156,8 @@
          </tr>
          <tr>
            <td colspan="2" class="project-description"><span py:choose="">
-	           <span py:when="lang in project.desc">${render_longdesc(project.desc[lang].get('long', ''))}</span>
-	           <span py:otherwise="">${render_longdesc(project.desc['en'].get('long', ''))}</span>
+	           <span py:when="lang in project.properties['desc']">${render_longdesc(project.properties['desc'][lang].get('long', ''))}</span>
+	           <span py:otherwise="">${render_longdesc(project.properties['desc']['en'].get('long', ''))}</span>
 	         </span>
 	     <div class="enhanced-by" py:if="project.properties['Enhances'] != {}">
 	       The package is enhanced by the following packages: <py:for each="enh in sorted(project.properties['Enhances'].keys())">
diff --git a/webtools/templates/tasks_idx.xhtml b/webtools/templates/tasks_idx.xhtml
index 6830119..8d64c06 100644
--- a/webtools/templates/tasks_idx.xhtml
+++ b/webtools/templates/tasks_idx.xhtml
@@ -81,11 +81,11 @@ table {
 	      </td>
 	      <td>
 		<span py:choose="">
-	          <span py:when="lang in tasks[task].metapkg.desc">
-		    ${tasks[task].metapkg.desc[lang]['short']}
+	          <span py:when="lang in tasks[task].metapkg.properties['desc']">
+		    ${tasks[task].metapkg.properties['desc'][lang]['short']}
 		  </span>
 	          <span py:otherwise="">
-		    ${tasks[task].metapkg.desc['en']['short']}
+		    ${tasks[task].metapkg.properties['desc']['en']['short']}
 		  </span>
 		</span>
 	      </td>

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list