diff MoinMoin/PageGraphicalEditor.py @ 1880:b07b4c102d3d

began refactoring send_page(): processing instruction extraction, getting meta/data part of page only, fixed related problems with language detection. Removed lots of duplicate or unused code.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 12 Mar 2007 14:10:45 +0100
parents 64507f46beb2
children 8bd4b581cc60
line wrap: on
line diff
--- a/MoinMoin/PageGraphicalEditor.py	Mon Mar 12 12:50:21 2007 +0100
+++ b/MoinMoin/PageGraphicalEditor.py	Mon Mar 12 14:10:45 2007 +0100
@@ -280,10 +280,7 @@
         self.sendconfirmleaving() # TODO update state of flgChange to make this work, see PageEditor
 
         # Add textarea with page text
-
-        # TODO: currently self.language is None at this point.
-        # We have to do processing instructions parsing earlier, or move page language into meta file.
-        lang = self.language or request.cfg.language_default
+        lang = self.pi.get('language', request.cfg.language_default)
         contentlangdirection = i18n.getDirection(lang) # 'ltr' or 'rtl'
         uilanguage = request.lang
         url_prefix_static = request.cfg.url_prefix_static