changeset 123:0e91f640f242

local dict support, inspired by the Debian patch imported from: moin--main--1.5--patch-125
author Thomas Waldmann <tw@waldmann-edv.de>
date Thu, 20 Oct 2005 07:17:51 +0000
parents f5f443df60cb
children c97db64bbe7b
files MoinMoin/action/SpellCheck.py docs/CHANGES
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SpellCheck.py	Thu Oct 20 06:45:11 2005 +0000
+++ b/MoinMoin/action/SpellCheck.py	Thu Oct 20 07:17:51 2005 +0000
@@ -30,10 +30,11 @@
     candidates = []
 
     # load a list of possible word files
-    localdict = os.path.join(request.cfg.moinmoin_dir, 'dict')
-    if os.path.isdir(localdict):
-        candidates.extend(map(
-            lambda f, d=localdict: os.path.join(d, f), os.listdir(localdict)))
+    for basedir in (request.cfg.moinmoin_dir, request.cfg.data_dir):
+        localdict = os.path.join(basedir, 'dict')
+        if os.path.isdir(localdict):
+            candidates.extend(map(
+                lambda f, d=localdict: os.path.join(d, f), os.listdir(localdict)))
 
     # validate candidate list (leave out directories!)
     wordsfiles = []
--- a/docs/CHANGES	Thu Oct 20 06:45:11 2005 +0000
+++ b/docs/CHANGES	Thu Oct 20 07:17:51 2005 +0000
@@ -165,6 +165,8 @@
     * Added thread count to SystemInfo macro.
     * Added Petr's newest patch against the DocBook code. It allows you to use macros (esp. the include macro) in DocBook pages in order to build larger documents.
     * Added a RenderAsDocbook action which redirects to the DocBook formatter.
+    * Added searching for wiki-local words lists under <data_dir>/dict/.
+      They are used additionally to the global lists in MoinMoin/dict/.
 
   International support:    
     * mail_from can be now a unicode name-address