diff MoinMoin/i18n/__init__.py @ 4792:7a826f946da3

Groups2009: wikidicts were refactored. request.dict provides access only to WikiDicts. DictBase class was merged with Dict. Group class was removed. DictDict was merged with GroupDict removing methods related to the group functionality. The cache key for dicts changed from 'dicts_groups' to 'dicts'. wikidicts test was refined to capture new functionality. Changes in the other code to use DictDict.__contains__ instead of has_dict and DictDict.__getitem__ in place of dict.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sun, 07 Jun 2009 16:04:05 +0200
parents f0c2ab8ef256
children c16381dd17fe
line wrap: on
line diff
--- a/MoinMoin/i18n/__init__.py	Sun Jun 07 15:25:28 2009 +0200
+++ b/MoinMoin/i18n/__init__.py	Sun Jun 07 16:04:05 2009 +0200
@@ -304,8 +304,8 @@
             language = languages[lang]['x-language-in-english']
             dictpagename = "%sDict" % language.replace(' ', '')
             dicts = request.dicts
-            if dicts.has_dict(dictpagename):
-                userdict = dicts.dict(dictpagename)
+            if dictpagename in dicts:
+                userdict = dicts[dictpagename]
                 translated = userdict[original]
             else:
                 raise KeyError