Author Topic: How to use the spellchecker  (Read 813 times)

Minks

  • Hydlaa Citizen
  • *
  • Posts: 443
    • View Profile
How to use the spellchecker
« on: February 23, 2011, 04:07:49 am »
A little birdy twittered me this:

Quote
Sorry. no idea if or in which binary releases the spellchecker is included...but in case it works with the new version here a short instruction how to use it:

First you will need a dictionary. You can use the openOffice.org dicts for that. Either get one here or just use the en_US one. Now go in your PlaneShift installation directory to the "data" directory and create a new "dict" folder. In that new folder unzip the dictionary (spellchecker looks for planeshift/data/dict/<dict>.dic and planeshift/data/dict/<dict>.aff).

Now you only have to enable the spellchecker in the PS config. To do this go to your configuration directory (linux: "~/.PlaneShift", Windows: "%AppData%\PlaneShift", MacOs: "~/Library/Application Support/PlaneShift") and change there to the "options"-folder. Now open chat.xml in your favorite text editor and edit the "<spellChecker value="0" r="255" g="0" b="0" />" line. Change it to "<spellChecker value="1" r="255" g="0" b="0" />" and the spellchecker should be enabled. With r, g, b values you can define in which color typos are displayed..standard is red but might be useful to change that on non-default skins. After saving the files and restarting PS you should get all typos you make in the input line printed in a different color.

A bit more about the way PS loads dictionaries. PS will look for all available dictionaries in the "data/dict" path and load them...and then use all of them. Meaning if you put an English and a German dictionary there only words that are not recognized by either of them will be shown as errors. So be careful with this as some typos in English might get ignored because there is a matching German word. But this allows something else. You can create a simple dictionary on your own containing some words only known in PS. For that just create a text file like "PSwords.dict" in the "data/dict" folder. Put all words you want the spellchecker to recognize in a separate line of that file...and afterwards count how many words you put in the file, go to the first line and put that number there. Make sure that your dictionary is sorted alphabetically.
Example:
Code: [Select]
4
Gugrontid
Hydlaa
Octarch
Ojaveda
Now it's also important to create a empty "PSwords.aff" file. Afterwards restart PS and this newly created dictionary will be used also.

Oh..and just because I mentioned it before...If you use non-default skins those have to be updated in order to work with the spellchecker (at least if they alter the appearance of the chat window). The type of the Inputline changed from "pawsEditTextBox" to "pawsSpellCheckedEditBox". If the skin is not updated PS won't start. This applies for everyone even if the spellchecker is not enabled.


A bit more info can be found on the bugtracker: http://bugs.hydlaaplaza.com/flyspray/index.php?task_id=4922
« Last Edit: February 26, 2011, 10:43:56 am by Minks »