Package: python-sphinxcontrib.spelling Version: 1.4-1 Severity: normal Tags: patch
Hi, there is a problem with using (defining) another language than "en", because the same variable is used to load the tokenizer and for dictionary, but the python-enchant package has only the "en.py" tokenizer, which is good for other languages (at least for Slovak) too. Setting to "en" language works, but wrong dictionary is used ;-) There is small patch to fallback into "en" tokenizer, when no one exists for defined language. Regards --- System information. --- Architecture: amd64 Kernel: Linux 3.10-2-amd64 Debian Release: jessie/sid --- Package information. --- Depends (Version) | Installed ===============================-+-============ python | 2.7.5-2 python-support (>= 0.90.0) | 1.0.15 python-docutils | 0.10-3 python-enchant | 1.6.5-2 python-sphinx | 1.1.3+dfsg-8 -- Slavko http://slavino.sk
--- /usr/share/pyshared/sphinxcontrib/spelling.py 2013-08-20 18:58:10.000000000 +0200 +++ /tmp/spelling.py 2013-08-20 18:47:42.000000000 +0200 @@ -179,7 +179,10 @@ def __init__(self, lang, suggest, word_list_filename, filters=[]): self.dictionary = enchant.DictWithPWL(lang, word_list_filename) - self.tokenizer = get_tokenizer(lang, filters) + try: + self.tokenizer = get_tokenizer(lang, filters) + except enchant.tokenize.TokenizerNotFoundError: + self.tokenizer = get_tokenizer("en", filters) self.original_tokenizer = self.tokenizer self.suggest = suggest
signature.asc
Description: OpenPGP digital signature