P2O2 WWW
Polish in NetBSD:
Dictionaries in Applications
Created - Apr 31, 2007 | Modified - Sep 20, 2007
P2O2 WWW Homepage -> Polish in NetBSD -> Dictionaries in Applications
Applications with Polish Dictionary
- Polish/English Dictionaries in Nedit Editor
Nedit Editor
Nedit has spell checking ability build-in as an option under Shell menu. Alas, the code for this action in NetBSD version is idiotic, to say the least. What's more it uses old "spell" application. What we have to do is to change the code to make use of aspell and its dictionaries. We will make two options - for two languages: English and Polish.
Nedit uses ~/.nedit/nedit.rc configuration file to store all its parameters. This file is created when we choose "Save Defaults" option found in "Preferences" main menu.
Oryginal code:
==================
nedit.fileVersion: 5.5
nedit.shellCommands: \
spell.pl::l:ED:\n\
(cat; echo "") > spell\n\
wc::w:ED:\n\
wc | awk '{print $1 " lines, " $2 " words, " $3 " characters"}'\n\
New code:
==================
nedit.fileVersion: 5.5
nedit.shellCommands: \
spell.pl::l:ED:\n\
cat>spellTmpPl; xterm -e aspell -l pl -d pl.rws -c spellTmpPl; \
cat spellTmpPl > %; rm spellTmpPl\n\
spell.en::e:ED:\n\
cat>spellTmpEn; xterm -e aspell -c spellTmpEn; \
cat spellTmpEn > %; rm spellTmpEn\n\
wc::w:ED:\n\
wc | awk '{print $1 " lines, " $2 " words, " $3 " characters"}'\n\
Options: -l defines language, -d describes language database, % - defines current filename (edited)
Please pay attention to two spell commands - spell.pl and spell.en. You can add another spelling commmand for your language. English language is not directly declared as it is default language of the editor (there's no need for -l and -d options).
ATTENTION:
Edited file has to be named before spell-checking. When you make all corrections Nedit will ask you whether to reload the edited file or not. You can allow this command to be performed without any fear of losing edited file. You'll not be left without oryginal file.
First, Nedit creates safety copy of the current file with .bck extension.
Second, aspell also makes safety copy naming it spellTmpEn.bak (spellTmpPl.bak).
Picture 1: Nedit window with dictionary commands
Picture 2: Aspell window with this article
Download Files
1.) No files
|