[Blends-commit] [SCM] website branch, master, updated. 2423a15d835ab6840aa1c1f75c4bc939ae7eef3d
Ole Streicher
olebole at debian.org
Sat Mar 19 13:53:04 UTC 2016
The following commit has been merged in the master branch:
commit 2423a15d835ab6840aa1c1f75c4bc939ae7eef3d
Author: Ole Streicher <olebole at debian.org>
Date: Sat Mar 19 14:51:11 2016 +0100
Use list of dicts instead of dict of dicts in blendstasktools
diff --git a/webtools/blendslanguages.py b/webtools/blendslanguages.py
index 8d930c4..63ba7ec 100644
--- a/webtools/blendslanguages.py
+++ b/webtools/blendslanguages.py
@@ -4,60 +4,55 @@ Copyright 2010: Andreas Tille <tille at debian.org>
License: GPL
'''
-# The keys of the following dictionary are used to
-# address the translation files of DDTP
-# The values contain dictionaries in turn with the following meaning:
+# The list contains dictionaries with the following meaning:
+# 'ddtp' = address the translation files of DDTP
# 'short' = shortcut of language as extension of the output files
# 'htaccess' = language definition in htaccess
# 'title' = English name of the language used in title attribut of link
# 'printed' = printed name for links
-language_dict = {
- 'en': {'short': 'en', 'htaccess': 'en',
- 'title': 'English', 'printed': u'English'},
- 'cs': {'short': 'cs', 'htaccess': 'cs',
- 'title': 'Czech', 'printed': u'česky'},
- 'da': {'short': 'da', 'htaccess': 'da',
- 'title': 'Danish', 'printed': u'dansk'},
- 'de': {'short': 'de', 'htaccess': 'de',
- 'title': 'German', 'printed': u'Deutsch'},
- 'es': {'short': 'es', 'htaccess': 'es',
- 'title': 'Spanish', 'printed': u'español'},
- 'fi': {'short': 'fi', 'htaccess': 'fi',
- 'title': 'Finnish', 'printed': u'suomi'},
- 'fr': {'short': 'fr', 'htaccess': 'fr',
- 'title': 'French', 'printed': u'français'},
- 'hu': {'short': 'hu', 'htaccess': 'hu',
- 'title': 'Hungarian', 'printed': u'magyar'},
- 'it': {'short': 'it', 'htaccess': 'it',
- 'title': 'Italian', 'printed': u'Italiano'},
- 'ja': {'short': 'ja', 'htaccess': 'ja',
- 'title': 'Japanese', 'printed': u'日本語 (Nihongo)'},
- 'ko': {'short': 'ko', 'htaccess': 'ko',
- 'title': 'Korean', 'printed': u'한국어 (Hangul)'},
- 'nl': {'short': 'nl', 'htaccess': 'nl',
- 'title': 'Dutch', 'printed': u'Nederlands'},
- 'pl': {'short': 'pl', 'htaccess': 'pl',
- 'title': 'Polish', 'printed': u'polski'},
- 'pt_BR': {'short': 'pt', 'htaccess': 'pt-BR',
- 'title': 'Portuguese', 'printed': u'Português'},
- 'ru': {'short': 'ru', 'htaccess': 'ru',
- 'title': 'Russian', 'printed': u'Русский (Russkij)'},
- 'uk': {'short': 'uk', 'htaccess': 'uk',
- 'title': 'Ukrainian', 'printed': u"українська (ukrajins'ka)"},
- 'sk': {'short': 'sk', 'htaccess': 'sk',
- 'title': 'Slovenian', 'printed': u'slovensky'},
- 'sr': {'short': 'sr', 'htaccess': 'sr',
- 'title': 'Serbian', 'printed': u'српски (srpski)'},
- 'sv': {'short': 'sv', 'htaccess': 'sv',
- 'title': 'Swedish', 'printed': u'svenska'},
- 'vi': {'short': 'vi', 'htaccess': 'vi',
- 'title': 'Vietnamese', 'printed': u'Tiếng Việt'},
- 'zh_CN': {'short': 'zh_cn', 'htaccess': 'zh-CN',
- 'title': 'Chinese (China)', 'printed': u'中文(简)'},
- 'zh_TW': {'short': 'zh_tw', 'htaccess': 'zh-TW',
- 'title': 'Chinese (Taiwan)', 'printed': u'中文(正)'},
-}
-
-# global languages
-# make sure 'en' comes first because the first language determines the default
-languages = ['en'] + sorted(l for l in language_dict if l != 'en')
+languages = [
+ {'ddtp': 'en', 'short': 'en', 'htaccess': 'en',
+ 'title': 'English', 'printed': u'English'},
+ {'ddtp': 'cs', 'short': 'cs', 'htaccess': 'cs',
+ 'title': 'Czech', 'printed': u'česky'},
+ {'ddtp': 'da', 'short': 'da', 'htaccess': 'da',
+ 'title': 'Danish', 'printed': u'dansk'},
+ {'ddtp': 'de', 'short': 'de', 'htaccess': 'de',
+ 'title': 'German', 'printed': u'Deutsch'},
+ {'ddtp': 'es', 'short': 'es', 'htaccess': 'es',
+ 'title': 'Spanish', 'printed': u'español'},
+ {'ddtp': 'fi', 'short': 'fi', 'htaccess': 'fi',
+ 'title': 'Finnish', 'printed': u'suomi'},
+ {'ddtp': 'fr', 'short': 'fr', 'htaccess': 'fr',
+ 'title': 'French', 'printed': u'français'},
+ {'ddtp': 'hu', 'short': 'hu', 'htaccess': 'hu',
+ 'title': 'Hungarian', 'printed': u'magyar'},
+ {'ddtp': 'it', 'short': 'it', 'htaccess': 'it',
+ 'title': 'Italian', 'printed': u'Italiano'},
+ {'ddtp': 'ja', 'short': 'ja', 'htaccess': 'ja',
+ 'title': 'Japanese', 'printed': u'日本語 (Nihongo)'},
+ {'ddtp': 'ko', 'short': 'ko', 'htaccess': 'ko',
+ 'title': 'Korean', 'printed': u'한국어 (Hangul)'},
+ {'ddtp': 'nl', 'short': 'nl', 'htaccess': 'nl',
+ 'title': 'Dutch', 'printed': u'Nederlands'},
+ {'ddtp': 'pl', 'short': 'pl', 'htaccess': 'pl',
+ 'title': 'Polish', 'printed': u'polski'},
+ {'ddtp': 'pt_BR', 'short': 'pt', 'htaccess': 'pt-BR',
+ 'title': 'Portuguese', 'printed': u'Português'},
+ {'ddtp': 'ru', 'short': 'ru', 'htaccess': 'ru',
+ 'title': 'Russian', 'printed': u'Русский (Russkij)'},
+ {'ddtp': 'uk', 'short': 'uk', 'htaccess': 'uk',
+ 'title': 'Ukrainian', 'printed': u"українська (ukrajins'ka)"},
+ {'ddtp': 'sk', 'short': 'sk', 'htaccess': 'sk',
+ 'title': 'Slovenian', 'printed': u'slovensky'},
+ {'ddtp': 'sr', 'short': 'sr', 'htaccess': 'sr',
+ 'title': 'Serbian', 'printed': u'српски (srpski)'},
+ {'ddtp': 'sv', 'short': 'sv', 'htaccess': 'sv',
+ 'title': 'Swedish', 'printed': u'svenska'},
+ {'ddtp': 'vi', 'short': 'vi', 'htaccess': 'vi',
+ 'title': 'Vietnamese', 'printed': u'Tiếng Việt'},
+ {'ddtp': 'zh_CN', 'short': 'zh_cn', 'htaccess': 'zh-CN',
+ 'title': 'Chinese (China)', 'printed': u'中文(简)'},
+ {'ddtp': 'zh_TW', 'short': 'zh_tw', 'htaccess': 'zh-TW',
+ 'title': 'Chinese (Taiwan)', 'printed': u'中文(正)'},
+]
diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 888c984..2ea73ff 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -1095,15 +1095,16 @@ class TaskDependencies:
if not ddtptranslations:
return
for lang in languages:
- if ddtptranslations['description_' + lang]:
- self.metapkg.desc[lang] = {}
- self.metapkg.desc[lang]['short'] = ddtptranslations['description_' + lang]
+ if ddtptranslations['description_' + lang['ddtp']]:
+ self.metapkg.desc[lang['ddtp']] = {
+ 'short': ddtptranslations['description_' + lang['ddtp']]
+ }
try:
- self.metapkg.desc[lang]['long'] = PrepareMarkdownInput(ddtptranslations['long_description_' + lang])
+ self.metapkg.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.pkg, lang, ddtptranslations['long_description_' + lang], err))
- self.metapkg.desc[lang]['long'] = 'Missing long description'
+ % (self.metapkg.pkg, lang['ddtp'], ddtptranslations['long_description_' + lang['ddtp']], err))
+ self.metapkg.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
@@ -1558,11 +1559,13 @@ class TaskDependencies:
# package versions in all releases
dep.properties['pkg-url'] = PKGURLMASK % dep.pkg
- for l in languages:
- if row.get('description_' + l):
- dep.desc[l] = {'short': row['description_' + l]}
- if row['long_description_' + l]:
- dep.desc[l]['long'] = PrepareMarkdownInput(row['long_description_' + l])
+ for lang in languages:
+ if row.get('description_' + lang['ddtp']):
+ dep.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']:
logger.error("Dep has no English short description: %s", dep.pkg)
dep.desc['en']['short'] = "??? missing short description for package %s :-(" % dep.pkg
diff --git a/webtools/blendstasktools_udd.py b/webtools/blendstasktools_udd.py
index 1577619..ba457a3 100644
--- a/webtools/blendstasktools_udd.py
+++ b/webtools/blendstasktools_udd.py
@@ -1016,15 +1016,16 @@ class TaskDependencies:
if not ddtptranslations:
return
for lang in languages:
- if ddtptranslations['description_' + lang]:
- self.metapkg.desc[lang] = {}
- self.metapkg.desc[lang]['short'] = ddtptranslations['description_' + lang]
+ if ddtptranslations['description_' + lang['ddtp']]:
+ self.metapkg.desc[lang['ddtp']] = {
+ 'short': ddtptranslations['description_' + lang['ddtp']]
+ }
try:
- self.metapkg.desc[lang]['long'] = PrepareMarkdownInput(dtptranslations['long_description_' + lang])
+ self.metapkg.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.pkg, lang, ddtptranslations['long_description_' + lang], err))
- self.metapkg.desc[lang]['long'] = 'Missing long description'
+ % (self.metapkg.pkg, lang, ddtptranslations['long_description_' + lang['ddtp']], err))
+ self.metapkg.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
@@ -1181,12 +1182,13 @@ class TaskDependencies:
# package versions in all releases
dep.properties['pkg-url'] = PKGURLMASK % dep.pkg
- for l in languages:
- if row.get('description_' + l):
- dep.desc[l] = {}
- dep.desc[l]['short'] = row['description_' + l]
- if row['long_description_' + l]:
- dep.desc[l]['long'] = PrepareMarkdownInput(row['long_description_' + l])
+ for lang in languages:
+ if row.get('description_' + lang['ddtp']):
+ dep.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']:
logger.error("Dep has no English short description: %s", dep.pkg)
dep.desc['en']['short'] = "??? missing short description for package %s :-(" % dep.pkg
diff --git a/webtools/tasks.py b/webtools/tasks.py
index a95579b..fb32b7e 100755
--- a/webtools/tasks.py
+++ b/webtools/tasks.py
@@ -15,7 +15,7 @@ from genshi.template import TemplateLoader
from genshi import Markup
from blendstasktools import Tasks, GetDependencies2Use, pkgstatus, pkgstatus_sortedkeys, UnlockBlendsTools, CheckOrCreateOutputDir, SetFilePermissions
-from blendslanguages import languages, language_dict
+from blendslanguages import languages
if len(argv) <= 1:
stderr.write('Usage: {0} <Blend name>\n'.format(argv[0])
@@ -36,8 +36,7 @@ data['taskskeys'] = tasks.metapackagekeys
data['PackageByName'] = tasks.PackageByName
data['pkgcount'] = len(data['PackageByName'])
data['popconsubmit'] = tasks.popconsubmit or 'unknown'
-data['languages'] = languages
-data['language_dict'] = language_dict
+data['languages'] = languages
# Define directories used
current_dir = os.path.dirname(__file__)
@@ -47,8 +46,10 @@ template_dir = os.path.join(current_dir, 'templates')
# Initialize i18n
domain = 'blends-webtools'
gettext.install(domain)
-l10nstring = dict((lang, gettext.translation(domain, locale_dir,
- languages=[lang], fallback=True))
+l10nstring = dict((lang['ddtp'],
+ gettext.translation(domain, locale_dir,
+ languages=[lang['ddtp']],
+ fallback=True))
for lang in languages)
# Translated strings regarding the categorising of dependencies need to
# be translated and because I did not found a working solution to get
@@ -77,10 +78,10 @@ htafp.write("DirectoryIndex index index.html\nOptions +MultiViews\n")
use_dependencystatus = GetDependencies2Use()
for lang in languages:
- htafp.write("AddLanguage {0} .{1}\n".format(language_dict[lang]['htaccess'], lang))
- l10nstring[lang].install()
- _ = l10nstring[lang].ugettext
- data['lang'] = lang
+ htafp.write("AddLanguage {htaccess} .{ddtp}\n".format(**lang))
+ l10nstring[lang['ddtp']].install()
+ _ = l10nstring[lang['ddtp']].ugettext
+ data['lang'] = lang['ddtp']
data['license'] = _('License')
data['version'] = _('Version')
data['summary'] = _('Summary')
@@ -106,7 +107,7 @@ for lang in languages:
data['gtstrThisIsAList'] = _('This is a list of the Tasks %s is made of:') % data['projectname']
data['langavail'] = _('This page is also available in the following languages:')
data['howtosetlang'] = _('How to set <a href="%s">the default document language</a>')
- data['howtosetlang'] = Markup(data['howtosetlang'] % ('http://www.debian.org/intro/cn.%s.html' % lang))
+ data['howtosetlang'] = Markup(data['howtosetlang'] % ('http://www.debian.org/intro/cn.%s.html' % lang['ddtp']))
data['nohomepage'] = _('Homepage not available')
data['translatedesc'] = _('Translate description')
data['fixtranslation'] = _('Fix translated description')
@@ -169,14 +170,14 @@ for lang in languages:
template = loader.load('tasks_idx.xhtml')
outputfile = os.path.join(outputdir,
- 'index.{0}.html'.format(language_dict[lang]['short']))
+ 'index.{0}.html'.format(lang['short']))
with codecs.open(outputfile, 'w', 'utf-8') as f:
- f.write(template.generate(**data).render('xhtml'))
+ f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
try:
template = loader.load('%s_idx.xhtml' % tasks.blendname)
outputfile = os.path.join(tasks.data['outputdir'],
- 'index.{0}.html'.format(language_dict[lang]['short']))
+ 'index.{0}.html'.format(lang['short']))
with codecs.open(outputfile, "w", "utf-8") as f:
f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
@@ -208,7 +209,7 @@ for lang in languages:
if len(tasks.tasks[task].dependencies[status]) > 0:
if status != 'unknown':
data['dependencies'][task].append(status)
- elif lang == 'en':
+ elif lang['short'] == 'en':
# Just print an error message if there are packages with
# unknown status but only once and not per language
for dep in tasks.tasks[task].dependencies[status]:
@@ -225,7 +226,7 @@ for lang in languages:
template = loader.load('tasks.xhtml')
outputfile = os.path.join(
- outputdir, '{0}.{1}.html'.format(task, language_dict[lang]['short']))
+ outputdir, '{0}.{1}.html'.format(task, lang['short']))
with codecs.open(outputfile, "w", "utf-8") as f:
f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
@@ -236,14 +237,14 @@ for lang in languages:
for task in data['taskskeys']:
data['projectsintasks'] = tasks.tasks[task].dependencies
- outputfile = os.path.join(outputdir, 'packagelist.{0}.html'.format(lang))
+ outputfile = os.path.join(outputdir, 'packagelist.{0}.html'.format(lang['short']))
with codecs.open(outputfile, 'w', 'utf-8') as f:
f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
htafp.write("LanguagePriority {0}\n".format(
- ' '.join(language_dict[lang]['htaccess']) for lang in languages))
+ ' '.join(lang['htaccess'] for lang in languages)))
htafp.close()
SetFilePermissions(htaccess)
diff --git a/webtools/tasks_udd.py b/webtools/tasks_udd.py
index 58bf105..7d78148 100755
--- a/webtools/tasks_udd.py
+++ b/webtools/tasks_udd.py
@@ -15,7 +15,7 @@ from genshi.template import TemplateLoader
from genshi import Markup
from blendstasktools_udd import Tasks, GetDependencies2Use, pkgstatus, pkgstatus_sortedkeys, UnlockBlendsTools, CheckOrCreateOutputDir, SetFilePermissions
-from blendslanguages import languages, language_dict
+from blendslanguages import languages
if len(argv) <= 1:
stderr.write('Usage: {0} <Blend name>\n'.format(argv[0])
@@ -36,8 +36,7 @@ data['taskskeys'] = tasks.metapackagekeys
data['PackageByName'] = tasks.PackageByName
data['pkgcount'] = len(data['PackageByName'])
data['popconsubmit'] = tasks.popconsubmit or 'unknown'
-data['languages'] = languages
-data['language_dict'] = language_dict
+data['languages'] = languages
# Define directories used
current_dir = os.path.dirname(__file__)
@@ -47,8 +46,10 @@ template_dir = os.path.join(current_dir, 'templates')
# Initialize i18n
domain = 'blends-webtools'
gettext.install(domain)
-l10nstring = dict((lang, gettext.translation(domain, locale_dir,
- languages=[lang], fallback=True))
+l10nstring = dict((lang['ddtp'],
+ gettext.translation(domain, locale_dir,
+ languages=[lang['ddtp']],
+ fallback=True))
for lang in languages)
# Translated strings regarding the categorising of dependencies need to
# be translated and because I did not found a working solution to get
@@ -77,10 +78,10 @@ htafp.write("DirectoryIndex index index.html\nOptions +MultiViews\n")
use_dependencystatus = GetDependencies2Use()
for lang in languages:
- htafp.write("AddLanguage {0} .{1}\n".format(language_dict[lang]['htaccess'], lang))
- l10nstring[lang].install()
- _ = l10nstring[lang].ugettext
- data['lang'] = lang
+ htafp.write("AddLanguage {htaccess} .{ddtp}\n".format(**lang))
+ l10nstring[lang['ddtp']].install()
+ _ = l10nstring[lang['ddtp']].ugettext
+ data['lang'] = lang['ddtp']
data['license'] = _('License')
data['version'] = _('Version')
data['summary'] = _('Summary')
@@ -106,7 +107,7 @@ for lang in languages:
data['gtstrThisIsAList'] = _('This is a list of the Tasks %s is made of:') % data['projectname']
data['langavail'] = _('This page is also available in the following languages:')
data['howtosetlang'] = _('How to set <a href="%s">the default document language</a>')
- data['howtosetlang'] = Markup(data['howtosetlang'] % ('http://www.debian.org/intro/cn.%s.html' % lang))
+ data['howtosetlang'] = Markup(data['howtosetlang'] % ('http://www.debian.org/intro/cn.%s.html' % lang['ddtp']))
data['nohomepage'] = _('Homepage not available')
data['translatedesc'] = _('Translate description')
data['fixtranslation'] = _('Fix translated description')
@@ -169,14 +170,14 @@ for lang in languages:
template = loader.load('tasks_idx.xhtml')
outputfile = os.path.join(outputdir,
- 'index.{0}.html'.format(language_dict[lang]['short']))
+ 'index.{0}.html'.format(lang['short']))
with codecs.open(outputfile, 'w', 'utf-8') as f:
f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
try:
template = loader.load('%s_idx.xhtml' % tasks.blendname)
outputfile = os.path.join(tasks.data['outputdir'],
- 'index.{0}.html'.format(language_dict[lang]['short']))
+ 'index.{0}.html'.format(lang['short']))
with codecs.open(outputfile, "w", "utf-8") as f:
f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
@@ -208,7 +209,7 @@ for lang in languages:
if len(tasks.tasks[task].dependencies[status]) > 0:
if status != 'unknown':
data['dependencies'][task].append(status)
- elif lang == 'en':
+ elif lang['short'] == 'en':
# Just print an error message if there are packages with
# unknown status but only once and not per language
for dep in tasks.tasks[task].dependencies[status]:
@@ -225,7 +226,7 @@ for lang in languages:
template = loader.load('tasks.xhtml')
outputfile = os.path.join(
- outputdir, '{0}.{1}.html'.format(task, language_dict[lang]['short']))
+ outputdir, '{0}.{1}.html'.format(task, lang['short']))
with codecs.open(outputfile, "w", "utf-8") as f:
f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
@@ -236,14 +237,14 @@ for lang in languages:
for task in data['taskskeys']:
data['projectsintasks'] = tasks.tasks[task].dependencies
- outputfile = os.path.join(outputdir, 'packagelist.{0}.html'.format(lang))
+ outputfile = os.path.join(outputdir, 'packagelist.{0}.html'.format(lang['short']))
with codecs.open(outputfile, 'w', 'utf-8') as f:
f.write(template.generate(**data).render('xhtml'))
SetFilePermissions(outputfile)
htafp.write("LanguagePriority {0}\n".format(
- ' '.join(language_dict[lang]['htaccess']) for lang in languages))
+ ' '.join(lang['htaccess'] for lang in languages)))
htafp.close()
SetFilePermissions(htaccess)
diff --git a/webtools/templates/debian-astro_idx.xhtml b/webtools/templates/debian-astro_idx.xhtml
index 443fad5..7d9a404 100644
--- a/webtools/templates/debian-astro_idx.xhtml
+++ b/webtools/templates/debian-astro_idx.xhtml
@@ -102,8 +102,8 @@
<hr class="hidecss" />
<p>${langavail}</p>
<py:for each="l in languages">
- <span py:if="lang != l" class="navpara">
- <a href="index.${language_dict[l]['short']}.html" title="${language_dict[l]['title']}" hreflang="${language_dict[l]['htaccess']}" lang="${language_dict[l]['htaccess']}" rel="alternate">${language_dict[l]['printed']}</a>
+ <span py:if="lang != l['short']" class="navpara">
+ <a href="index.${l['short']}.html" title="${l['title']}" hreflang="${l['htaccess']}" lang="${l['htaccess']}" rel="alternate">${l['printed']}</a>
</span>
</py:for>
<p>${howtosetlang}</p>
diff --git a/webtools/templates/packagelist.xhtml b/webtools/templates/packagelist.xhtml
index 55b054f..ab0d37f 100644
--- a/webtools/templates/packagelist.xhtml
+++ b/webtools/templates/packagelist.xhtml
@@ -81,8 +81,8 @@
<hr class="hidecss" />
<p>${langavail}</p>
<py:for each="l in languages">
- <span py:if="lang != l" class="navpara">
- <a href="packagelist.${language_dict[l]['short']}.html" title="${language_dict[l]['title']}" hreflang="${language_dict[l]['htaccess']}" lang="${language_dict[l]['htaccess']}" rel="alternate">${language_dict[l]['printed']}</a>
+ <span py:if="lang != l['short']" class="navpara">
+ <a href="${task}.${l['short']}.html" title="${l['title']}" hreflang="${l['htaccess']}" lang="${l['htaccess']}" rel="alternate">${l['printed']}</a>
</span>
</py:for>
<p>${howtosetlang}</p>
diff --git a/webtools/templates/packages.xhtml b/webtools/templates/packages.xhtml
index 44be6c0..855f75b 100644
--- a/webtools/templates/packages.xhtml
+++ b/webtools/templates/packages.xhtml
@@ -639,8 +639,8 @@ function show_fulldesc(hash) {
<hr class="hidecss" />
<p>${langavail}</p>
<py:for each="l in languages">
- <span py:if="lang != l" class="navpara">
- <a href="${task}.${language_dict[l]['short']}.html" title="${language_dict[l]['title']}" hreflang="${language_dict[l]['htaccess']}" lang="${language_dict[l]['htaccess']}" rel="alternate">${language_dict[l]['printed']}</a>
+ <span py:if="lang != l['short']" class="navpara">
+ <a href="${task}.${l['short']}.html" title="${l['title']}" hreflang="${l['htaccess']}" lang="${l['htaccess']}" rel="alternate">${l['printed']}</a>
</span>
</py:for>
<p>${howtosetlang}</p>
diff --git a/webtools/templates/tasks.xhtml b/webtools/templates/tasks.xhtml
index 224a870..5725da3 100644
--- a/webtools/templates/tasks.xhtml
+++ b/webtools/templates/tasks.xhtml
@@ -238,8 +238,8 @@
<hr class="hidecss" />
<p>${langavail}</p>
<py:for each="l in languages">
- <span py:if="lang != l" class="navpara">
- <a href="${task}.${language_dict[l]['short']}.html" title="${language_dict[l]['title']}" hreflang="${language_dict[l]['htaccess']}" lang="${language_dict[l]['htaccess']}" rel="alternate">${language_dict[l]['printed']}</a>
+ <span py:if="lang != l['short']" class="navpara">
+ <a href="${task}.${l['short']}.html" title="${l['title']}" hreflang="${l['htaccess']}" lang="${l['htaccess']}" rel="alternate">${l['printed']}</a>
</span>
</py:for>
<p>${howtosetlang}</p>
diff --git a/webtools/templates/tasks_idx.xhtml b/webtools/templates/tasks_idx.xhtml
index 5c63e98..87e25c2 100644
--- a/webtools/templates/tasks_idx.xhtml
+++ b/webtools/templates/tasks_idx.xhtml
@@ -98,8 +98,8 @@ table {
<hr class="hidecss" />
<p>${langavail}</p>
<py:for each="l in languages">
- <span py:if="lang != l" class="navpara">
- <a href="index.${language_dict[l]['short']}.html" title="${language_dict[l]['title']}" hreflang="${language_dict[l]['htaccess']}" lang="${language_dict[l]['htaccess']}" rel="alternate">${language_dict[l]['printed']}</a>
+ <span py:if="lang != l['short']" class="navpara">
+ <a href="index.${l['short']}.html" title="${l['title']}" hreflang="${l['htaccess']}" lang="${l['htaccess']}" rel="alternate">${l['printed']}</a>
</span>
</py:for>
<p>${howtosetlang}</p>
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list