[Cdd-commits] r856 - cdd/trunk/webtools
CDD Subversion Commit
noreply at alioth.debian.org
Tue Jun 24 12:33:04 UTC 2008
Author: tille
Date: Tue Jun 24 12:33:03 2008
New Revision: 856
Modified:
cdd/trunk/webtools/cddtasktools.py
cdd/trunk/webtools/tasks.py
Log:
Let 'en' be a "normal" language and use suffix as well as for other languages.
HELP: Could anybody find a clue why .htaccess "Options +MultiViews" does not work to select proper language???
Modified: cdd/trunk/webtools/cddtasktools.py
==============================================================================
--- cdd/trunk/webtools/cddtasktools.py (original)
+++ cdd/trunk/webtools/cddtasktools.py Tue Jun 24 12:33:03 2008
@@ -62,7 +62,7 @@
'outputdir' : '',
'datadir' : '',
'cachedir' : '/var/lib/gforge/chroot/home/groups/cdd/cache',
- 'advertising' : '',
+ 'advertising' : None, # headline with advertising string is optional
}
for stanza in deb822.Sources.iter_paragraphs(f, shared_storage=False):
ret['CDD'] = stanza['cdd'] # short name of the project
Modified: cdd/trunk/webtools/tasks.py
==============================================================================
--- cdd/trunk/webtools/tasks.py (original)
+++ cdd/trunk/webtools/tasks.py Tue Jun 24 12:33:03 2008
@@ -87,8 +87,9 @@
data['description'] = _("The list to the right includes various software projects which are of some interest to the %s Project. Currently, only a few of them are available as Debian packages. It is our goal, however, to include all software in %s which can sensibly add to a high quality Custom Debian Distribution.") % (data['projectname'], data['projectname'])
data['gtstrTasksPage'] = _('Tasks page')
data['gtstrProject'] = _('Project')
- data['projectadvertising'] = _(data['advertising']) # Hopefully translation will work this way ...
- print "DEBUG", data['projectadvertising'], data['advertising']
+ if data['advertising'] != None:
+ data['projectadvertising'] = _(data['advertising']) # Hopefully translation will work this way ...
+ print "DEBUG", data['projectadvertising'], data['advertising']
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>'),
@@ -113,12 +114,13 @@
# contain several html tags will be marked correctly
VERBATIM=('projectadvertising', )
for verbatim in VERBATIM:
- data[verbatim] = Markup(data[verbatim])
+ if data.has_key(verbatim) and data[verbatim] != None:
+ data[verbatim] = Markup(data[verbatim])
template = loader.load('tasks_idx.xhtml')
outputfile = data['outputdir'] + '/index.html'
- if lang != 'en':
+ if lang != 'xyz': # let 'en' be a language as any other and add suffix to file name
outputfile += '.' + lang
try:
os.unlink(outputfile)
@@ -147,7 +149,7 @@
data['projects'] = cdeps.tasks[task].dependencies
outputfile = data['outputdir'] + '/' + task + '.html'
- if lang != 'en':
+ if lang != 'xyz': # let 'en' be a language as any other and add suffix to file name
outputfile += '.' + lang
try:
os.unlink(outputfile)
More information about the Cdd-commits
mailing list