changeset 5375:97a4b92d2055

language packs: use -- (not _) as separator between language and pageset name, fixes problems with languages that have an underscore
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 13 Dec 2009 21:03:59 +0100
parents 52c4c1bf901d
children af9872c96dcb
files MoinMoin/action/language_setup.py MoinMoin/script/maint/mkpagepacks.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/language_setup.py	Sun Dec 13 19:45:43 2009 +0100
+++ b/MoinMoin/action/language_setup.py	Sun Dec 13 21:03:59 2009 +0100
@@ -35,7 +35,7 @@
         request.theme.add_msg(msg, "error")
         request.page.send_page()
         return ''
-    wiki_languages = list(set([lang_file.split('_')[0] for lang_file in files]) - set(['00']))
+    wiki_languages = list(set([lang_file.split('--')[0] for lang_file in files]) - set(['00_needs_fixing.zip']))
     wiki_languages.sort()
 
     lang = request.values.get('language') or 'English'
@@ -62,7 +62,7 @@
 
     label_install = _("install")
     for pageset_name in i18n.strings.pagesets:
-        attachment = "%s_%s.zip" % (lang, pageset_name)
+        attachment = "%s--%s.zip" % (lang, pageset_name)
         # not_translated_system_pages are in english
         if attachment.endswith(not_translated_system_pages):
             attachment = 'English_not_translated_system_pages.zip'
--- a/MoinMoin/script/maint/mkpagepacks.py	Sun Dec 13 19:45:43 2009 +0100
+++ b/MoinMoin/script/maint/mkpagepacks.py	Sun Dec 13 21:03:59 2009 +0100
@@ -71,7 +71,7 @@
             for pageset_name in pageset_names:
                 pageset_orig = set(getattr(i18n.strings, pageset_name))
                 pageset_trans = set([trans(pn) for pn in pageset_orig])
-                key = u"%s_%s" % (lang_long, pageset_name)
+                key = u"%s--%s" % (lang_long, pageset_name)
                 pageset = pageset_trans
                 if lang != 'en':
                     pageset -= pageset_orig