[Cdd-commits] r814 - in cdd/trunk/webtools: . po templates

CDD Subversion Commit noreply at alioth.debian.org
Mon Jun 16 18:49:14 UTC 2008


Author: tille
Date: Mon Jun 16 18:49:14 2008
New Revision: 814

Modified:
   cdd/trunk/webtools/po/cdd-webtools.pot
   cdd/trunk/webtools/po/php-message-strings.pot
   cdd/trunk/webtools/tasks.py
   cdd/trunk/webtools/templates/tasks.xhtml
Log:
Add only those legend items that really occure; polishing


Modified: cdd/trunk/webtools/po/cdd-webtools.pot
==============================================================================
--- cdd/trunk/webtools/po/cdd-webtools.pot	(original)
+++ cdd/trunk/webtools/po/cdd-webtools.pot	Mon Jun 16 18:49:14 2008
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: cdd-webtools 0.1.1\n"
 "Report-Msgid-Bugs-To: debian-custom at lists.debian.org\n"
-"POT-Creation-Date: 2008-06-16 12:12+0200\n"
+"POT-Creation-Date: 2008-06-16 13:30+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -16,35 +16,65 @@
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: tasks.py:72
+#: tasks.py:51
+msgid "Official Debian package"
+msgstr ""
+
+#: tasks.py:52
+msgid "Unofficial Debian package"
+msgstr ""
+
+#: tasks.py:53
+msgid "Debian package not available"
+msgstr ""
+
+#: tasks.py:63
+msgid ""
+"Green: The project is <a href=\"#official-debs\">available as an official "
+"Debian package</a>"
+msgstr ""
+
+#: tasks.py:64
+msgid ""
+"Yellow: The project is <a href=\"#unofficial-debs\">available as an "
+"unofficial Debian package</a>"
+msgstr ""
+
+#: tasks.py:65
+msgid ""
+"Red: The project is <a href=\"#debs-not-available\">not (yet) available as a "
+"Debian package</a>"
+msgstr ""
+
+#: tasks.py:80
 msgid "Maintainer"
 msgstr ""
 
-#: tasks.py:73
+#: tasks.py:81
 msgid "License"
 msgstr ""
 
-#: tasks.py:74
+#: tasks.py:82
 msgid "Version"
 msgstr ""
 
-#: tasks.py:75
+#: tasks.py:83
 msgid "Last update:"
 msgstr ""
 
-#: tasks.py:78
+#: tasks.py:86
 msgid "Official"
 msgstr ""
 
-#: tasks.py:79
+#: tasks.py:87
 msgid "Unofficial"
 msgstr ""
 
-#: tasks.py:80
+#: tasks.py:88
 msgid "Prospective"
 msgstr ""
 
-#: tasks.py:82
+#: tasks.py:90
 msgid "Packages"
 msgstr ""
 

Modified: cdd/trunk/webtools/po/php-message-strings.pot
==============================================================================
--- cdd/trunk/webtools/po/php-message-strings.pot	(original)
+++ cdd/trunk/webtools/po/php-message-strings.pot	Mon Jun 16 18:49:14 2008
@@ -237,32 +237,9 @@
 msgid "For a better overview of the project's availability as a Debian package, each head row has a color code according to this scheme:"
 msgstr ""
 
-#: ../tasks.tmpl:26
-#, php-format
-msgid "Green: The project is %savailable as an official Debian package%s"
-msgstr ""
-
-#: ../tasks.tmpl:27
-#, php-format
-msgid "Yellow: The project is %savailable as an inofficial Debian package%s"
-msgstr ""
-
-#: ../tasks.tmpl:28
-#, php-format
-msgid "Red: The project is %snot (yet) available as a Debian package%s"
-msgstr ""
-
 #: ../tasks.tmpl:31
 #, php-format
 msgid ""
 "If you discover a project which looks like a good candidate for Debian-Med to you, or if you have prepared an inofficial Debian package, please do "
 "not hesitate to send a description of that project to the %sDebian-Med mailing list%s"
 msgstr ""
-
-#: ../tasks.tmpl:74 ../tasks.tmpl:96
-msgid "Responsible"
-msgstr ""
-
-#: ../tasks.tmpl:100
-msgid "Debian package not available"
-msgstr ""

Modified: cdd/trunk/webtools/tasks.py
==============================================================================
--- cdd/trunk/webtools/tasks.py	(original)
+++ cdd/trunk/webtools/tasks.py	Mon Jun 16 18:49:14 2008
@@ -57,6 +57,7 @@
               'debian-science' : HTMLBASE+"/cdd/htdocs/science/tasks/",
             }
 
+
 if not os.access(OUTPUTDIR[CDD], os.W_OK):
 	try:
 		os.mkdir(OUTPUTDIR[CDD])
@@ -70,9 +71,19 @@
 	_ = l10nstring[lang].ugettext
 	data['lang']              = lang
 	data['maintainer']        = _('Maintainer')
+	data['responsible']       = _('Responsible')
 	data['license']           = _('License')
 	data['version']           = _('Version')
 	data['updatetimestamp']   = _('Last update:') + ' ' + formatdate(time.mktime(t.timetuple()))
+	data['officialpkg']       = _('Official Debian package')
+        data['unofficialpkg']     = _('Unofficial Debian package')
+        data['nopkgavail']        = _('Debian package not available')
+
+	COLORCODES = { 'official'      : _('Green: The project is <a href="#official-debs">available as an official Debian package</a>'),
+    		       'unofficial'    : _('Yellow: The project is <a href="#unofficial-debs">available as an unofficial Debian package</a>'),
+                       'prospective'   : _('Red: The project is <a href="#debs-not-available">not (yet) available as a Debian package</a>'),
+                       'unknown'       : _('White: The project has an unknown status.')
+            	     }
 
 	typenames = dict (
                       official    = _('Official'),
@@ -82,14 +93,14 @@
         data['packages']          = _('Packages')
 
 	for task in tasks:
-
 		data['task']         = task
 		data['projectkeys']  = cdeps.GetListOfDepsForTask(task, dependencytypes=())
 		data['dependencies'] = []
+		data['colorcodes']   = []
 		for type in ['official', 'prospective', 'unofficial', 'unknown']:
 		    if len(cdeps.tasks[task].dependencies[type]) > 0:
 			data['dependencies'].append(type)
-		print "DEBUG: Dependencies of %s: %s" % (task, str(data['dependencies']))
+			data['colorcodes'].append(Markup(COLORCODES[type]))
 		data['projects']     = cdeps.tasks[task].dependencies
 
 		outputfile = OUTPUTDIR[CDD] + '/' + task + '_' + lang + '.html'

Modified: cdd/trunk/webtools/templates/tasks.xhtml
==============================================================================
--- cdd/trunk/webtools/templates/tasks.xhtml	(original)
+++ cdd/trunk/webtools/templates/tasks.xhtml	Mon Jun 16 18:49:14 2008
@@ -38,9 +38,9 @@
 					For a better overview of the project's availability as a Debian package, each head row has a color code according to this scheme:
 				</p>
 				<ul>
-					<li>Green: The project is <a href="#official-debs">available as an official Debian package</a></li>
-					<li>Yellow: The project is <a href="#inofficial-debs">available as an inofficial Debian package</a></li>
-					<li>Red: The project is <a href="#debs-not-available">not (yet) available as a Debian package</a></li>
+				   <py:for each="color in colorcodes">
+				     <li>${color}</li>
+				   </py:for>
 				</ul>
 				<p>
 					If you discover a project which looks like a good candidate for Debian-Med to you, or if you have prepared an inofficial Debian package, please do not hesitate to send a description of that project to the <a href="mailto:debian-med at lists.debian.org">Debian-Med mailing list</a>				</p>
@@ -65,17 +65,20 @@
              <a py:if="project.wnpp != None" href="http://bugs.debian.org/#${project.wnpp}">wnpp</a>
 	     <em>project.pkgShortDesc - Unicode Problems by Markup in cddtasktools.py</em><br/>
 	     <a href="$project.homepage}">${project.homepage}</a>
-	     <div py:if="project.responsible != None">${maintainer}: ${project.responsible}</div>
+	     <div py:if="project.responsible != None"><span py:choose="type">
+	                                                <span py:when="'official'">${maintainer}</span>
+	                                                <span py:otherwise="">${responsible}</span>
+	                                              </span>: ${project.responsible}</div>
 	   </td>
            <td class="project-license">
              <em py:if="project.version != None">${version}: ${project.version}</em>
              <em>${license}: ${project.license}</em><br/>
                <span py:choose="type">
                  <span py:when="'official'">
-                        <a href="${project.pkgURL}">Official Debian package</a> - <a href="${project.pkgURL}/${project.filename}"><img src="deb-icon.png"/></a>
+                        <a href="${project.pkgURL}">${officialpkg}</a> - <a href="${project.pkgURL}/${project.filename}"><img src="deb-icon.png"/></a>
                  </span>
-                 <span py:when="'prospective'"><a href="${project.pkgURL}">Unofficial Debian package</a></span>
-                 <span py:otherwise="">Debian package not available</span>
+                 <span py:when="'prospective'"><a href="${project.pkgURL}">${unofficialpkg}</a></span>
+                 <span py:otherwise="">${nopkgavail}</span>
                </span>
            </td>
          </tr>
@@ -92,7 +95,5 @@
 </tr>
 </table>
 <address>${updatetimestamp}</address>
-<hr/>
-<address>$ SVN export - rev. 1583 - Last update by <a href="http://alioth.debian.org/users/tille">tille</a> - Fri, 14 Mar 2008 07:32:46 +0000 $</address>
 </body>
 </html>



More information about the Cdd-commits mailing list