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

Ole Streicher olebole at debian.org
Wed Mar 16 08:02:51 UTC 2016


The following commit has been merged in the master branch:
commit 452e24bc0528f02592c7db8f4dbf577a9543648b
Author: Ole Streicher <olebole at debian.org>
Date:   Wed Mar 16 08:59:43 2016 +0100

    Replace HTML escapes for languages with unicode

diff --git a/webtools/blendslanguages.py b/webtools/blendslanguages.py
index 914812c..b50ad25 100644
--- a/webtools/blendslanguages.py
+++ b/webtools/blendslanguages.py
@@ -1,10 +1,9 @@
+# -*- coding: utf-8 -*-
 '''Define languages which are supported in web sentinel pages
 Copyright 2010: Andreas Tille <tille at debian.org>
 License: GPL
 '''
 
-from genshi import Markup
-
 # 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:
@@ -13,58 +12,52 @@ from genshi import Markup
 #  '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': Markup('English')},
-    'cs': {'short': 'cs', 'htaccess': 'cs', 'title': 'Czech',
-           'printed': Markup('česky')},
-    'da': {'short': 'da', 'htaccess': 'da', 'title': 'Danish',
-           'printed': Markup('dansk')},
-    'de': {'short': 'de', 'htaccess': 'de', 'title': 'German',
-           'printed': Markup('Deutsch')},
-    'es': {'short': 'es', 'htaccess': 'es', 'title': 'Spanish',
-           'printed': Markup('español')},
-    'fi': {'short': 'fi', 'htaccess': 'fi', 'title': 'Finnish',
-           'printed': Markup('suomi')},
-    'fr': {'short': 'fr', 'htaccess': 'fr', 'title': 'French',
-           'printed': Markup('français')},
-    'hu': {'short': 'hu', 'htaccess': 'hu', 'title': 'Hungarian',
-           'printed': Markup('magyar')},
-    'it': {'short': 'it', 'htaccess': 'it', 'title': 'Italian',
-           'printed': Markup('Italiano')},
-    'ja': {'short': 'ja', 'htaccess': 'ja', 'title': 'Japanese',
-           'printed': Markup('日本語 (Nihongo)')},
-    'ko': {'short': 'ko', 'htaccess': 'ko', 'title': 'Korean',
-           'printed': Markup('한국어 (Hangul)')},
-    'nl': {'short': 'nl', 'htaccess': 'nl', 'title': 'Dutch',
-           'printed': Markup('Nederlands')},
-    'pl': {'short': 'pl', 'htaccess': 'pl', 'title': 'Polish',
-           'printed': Markup('polski')},
-    'pt_BR': {'short': 'pt', 'htaccess': 'pt-BR', 'title': 'Portuguese',
-              'printed': Markup('Português')},
+    'en': {'short': 'en', 'htaccess': 'en',
+           'title': 'English', 'printed': 'English'},
+    'cs': {'short': 'cs', 'htaccess': 'cs',
+           'title': 'Czech', 'printed': 'česky'},
+    'da': {'short': 'da', 'htaccess': 'da',
+           'title': 'Danish', 'printed': 'dansk'},
+    'de': {'short': 'de', 'htaccess': 'de',
+           'title': 'German', 'printed': 'Deutsch'},
+    'es': {'short': 'es', 'htaccess': 'es',
+           'title': 'Spanish', 'printed': 'español'},
+    'fi': {'short': 'fi', 'htaccess': 'fi',
+           'title': 'Finnish', 'printed': 'suomi'},
+    'fr': {'short': 'fr', 'htaccess': 'fr',
+           'title': 'French', 'printed': 'français'},
+    'hu': {'short': 'hu', 'htaccess': 'hu',
+           'title': 'Hungarian', 'printed': 'magyar'},
+    'it': {'short': 'it', 'htaccess': 'it',
+           'title': 'Italian', 'printed': 'Italiano'},
+    'ja': {'short': 'ja', 'htaccess': 'ja',
+           'title': 'Japanese', 'printed': '日本語 (Nihongo)'},
+    'ko': {'short': 'ko', 'htaccess': 'ko',
+           'title': 'Korean', 'printed': '한국어 (Hangul)'},
+    'nl': {'short': 'nl', 'htaccess': 'nl',
+           'title': 'Dutch', 'printed': 'Nederlands'},
+    'pl': {'short': 'pl', 'htaccess': 'pl',
+           'title': 'Polish', 'printed': 'polski'},
+    'pt_BR': {'short': 'pt', 'htaccess': 'pt-BR',
+              'title': 'Portuguese', 'printed': 'Português'},
     'ru': {'short': 'ru', 'htaccess': 'ru', 'title': 'Russian',
-           'printed': Markup('Русск\
-           ий (Russkij)')},
-    'uk': {'short': 'uk', 'htaccess': 'uk', 'title': 'Ukrainian',
-           'printed': Markup("украї\
-           нська\
-            (ukrajins'ka)")},
-    'sk': {'short': 'sk', 'htaccess': 'sk', 'title': 'Slovenian',
-           'printed': Markup('slovensky')},
-    'sr': {'short': 'sr', 'htaccess': 'sr', 'title': 'Serbian',
-           'printed': Markup('српск\
-           и(srpski)')},
-    'sv': {'short': 'sv', 'htaccess': 'sv', 'title': 'Swedish',
-           'printed': Markup('svenska')},
-    'vi': {'short': 'vi', 'htaccess': 'vi', 'title': 'Vietnamese',
-           'printed': Markup('Tiếng Việt')},
+           'printed': 'Русский (Russkij)'},
+    'uk': {'short': 'uk', 'htaccess': 'uk',
+           'title': 'Ukrainian', 'printed': "українська (ukrajins'ka)"},
+    'sk': {'short': 'sk', 'htaccess': 'sk',
+           'title': 'Slovenian', 'printed': 'slovensky'},
+    'sr': {'short': 'sr', 'htaccess': 'sr',
+           'title': 'Serbian', 'printed': 'српски (srpski)'},
+    'sv': {'short': 'sv', 'htaccess': 'sv',
+           'title': 'Swedish', 'printed': 'svenska'},
+    'vi': {'short': 'vi', 'htaccess': 'vi',
+           'title': 'Vietnamese', 'printed': 'Tiếng Việt'},
     'zh_CN': {'short': 'zh_cn', 'htaccess': 'zh-CN',
-              'title': 'Chinese (China)',
-              'printed': Markup('中文(简)')},
+              'title': 'Chinese (China)', 'printed': '中文(简)'},
     'zh_TW': {'short': 'zh_tw', 'htaccess': 'zh-TW',
-              'title': 'Chinese (Taiwan)',
-              'printed': Markup('中文(正)')},
+              'title': 'Chinese (Taiwan)', 'printed': '中文(正)'},
 }
 
 # global languages
 # make sure 'en' comes first because the first language determines the default
-languages = ['en'] + sorted(l for l in language_dict.keys() if l != 'en')
+languages = ['en'] + sorted(l for l in language_dict if l != 'en')

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list