From 1412845b1f5c4e70957d10eb78042d54fbcc8564 Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Fri, 29 Dec 2017 12:50:21 -0700 Subject: [PATCH] Initial document for adding a spellcheck language dictionary to manuskript --- ...check-Language-Dictionary-to-Manuskript.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Adding-a-Spellcheck-Language-Dictionary-to-Manuskript.md diff --git a/Adding-a-Spellcheck-Language-Dictionary-to-Manuskript.md b/Adding-a-Spellcheck-Language-Dictionary-to-Manuskript.md new file mode 100644 index 0000000..d9b1c53 --- /dev/null +++ b/Adding-a-Spellcheck-Language-Dictionary-to-Manuskript.md @@ -0,0 +1,78 @@ +# Adding a Spellcheck Language Dictionary to Manuskript + +The spellcheck feature of manuskript is provided by the [PyEnchant](https://pythonhosted.org/pyenchant/) package. Additional language dictionaries can be added to Manuskript to enable spell check to work with other languages. + +Following are instructions to add dictionaries based on which Operating System you use. + + +## GNU/Linux + +Identify the language code and install the dictionary package. + + +### Debian based (Debian, Ubuntu, Mint, etc.) + +1. Search for desired language dictionary (e.g. Brazilian Portuguese) + + ``` + apt-cache search aspell | grep -i portuguese + ``` + + Sample output: + ``` + aspell-pt - Portuguese dictionaries for GNU Aspell (old package) + aspell-pt-br - Brazilian Portuguese dictionary for GNU Aspell + aspell-pt-pt - European Portuguese dictionary for GNU Aspell + ``` + +2. Install the desired language dictionary package: + + ``` + sudo apt install aspell-pt-br + ``` + + +### Fedora based (Fedora, CentOS, etc) + +1. Search for desired language dictionary (e.g. Spanish) + + ``` + su -c "dnf search aspell | grep -i spanish" + ``` + + Sample output: + ``` + aspell-es.x86_64 : Spanish dictionaries for Aspell + ``` + +2. Install the desired language dictionary package: + + ``` + su -c "dnf install aspell-es" + ``` + + +## Windows + +These instructions assume you are using the Windows binary package which is built using PyInstaller. The default dictionary languages installed are shown in the following screen shot: + +![manuskript-windows-default-dictionaries](https://user-images.githubusercontent.com/10405019/34446110-cc639024-ec95-11e7-94b1-bb1685b7f5e6.png) + +With the Windows PyInstaller package the enchant dictionary files are stored under the "`manuskript/enchant/share/enchant/myspell/`" directory. The dictionary files have a pair of names: `*.aff` and `*.dic` + +1. Locate the desired language at the following link: [LibreOffice dictionaries](https://cgit.freedesktop.org/libreoffice/dictionaries/tree/). + +2. Download the two files `*.aff` and `*.dic` for the desired language. + + For example for Hebrew there is the [he_IL](https://cgit.freedesktop.org/libreoffice/dictionaries/tree/he_IL) directory which contains the `he_IL.aff` and `he_IL.dic` files. + +3. Copy these two files to the "`manuskript/enchant/share/enchant/myspell/`" directory where you unzipped manuskript. + +4. Now when you run `manuskript.exe` the Hebrew dictionaries are available under the **Tools -> Dictionary** menu. + + ![manuskript-windows-added-hebrew-dictionary](https://user-images.githubusercontent.com/10405019/34446122-dbd83668-ec95-11e7-996a-91f4426de026.png) + +## Mac OS X + +*To be filled out by someone with access to Mac OS X*. +