changeset 5397:6e7f1b059a3c

merged moin/1.7
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 25 Dec 2009 20:11:32 +0100
parents d944c9b537dc (current diff) a8c445a6d37e (diff)
children 66e4e61300dc bf05a6ae61ea
files MoinMoin/macro/__init__.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py	Thu Dec 24 20:50:35 2009 +0100
+++ b/MoinMoin/macro/__init__.py	Fri Dec 25 20:11:32 2009 +0100
@@ -74,11 +74,6 @@
         "GetVal": ["pages"],
         }
 
-    # we need the lang macros to execute when html is generated,
-    # to have correct dir and lang html attributes
-    for lang in i18n.wikiLanguages():
-        Dependencies[lang] = []
-
 
     def __init__(self, parser):
         self.parser = parser
@@ -91,6 +86,12 @@
         # Initialized on execute
         self.name = None
 
+        # we need the lang macros to execute when html is generated,
+        # to have correct dir and lang html attributes
+        # note: i18n needs to be initialized first before .wikiLanguages() will work
+        for lang in i18n.wikiLanguages():
+            self.Dependencies[lang] = []
+
     def _wrap(self, function, args, fixed=[]):
         try:
             return wikiutil.invoke_extension_function(self.request, function,