Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 1 | The spell files included here are in Vim's special format. You can't edit |
| 2 | them. See ":help spell" for more information. |
| 3 | |
| 4 | |
Bram Moolenaar | 53180ce | 2005-07-05 21:48:14 +0000 | [diff] [blame^] | 5 | COPYRIGHT |
Bram Moolenaar | 402d2fe | 2005-04-15 21:00:38 +0000 | [diff] [blame] | 6 | |
| 7 | The files used as input for the spell files come from the OpenOffice.org spell |
| 8 | files. Most of them go under the LGPL or a similar license. |
| 9 | |
Bram Moolenaar | 7d1f5db | 2005-07-03 21:39:27 +0000 | [diff] [blame] | 10 | Copyright notices for specific languages are in README_??.txt. Note that the |
| 11 | files for different regions are merged, both to save space and to make it |
| 12 | possible to highlight words for another region different from bad words. |
Bram Moolenaar | 53180ce | 2005-07-05 21:48:14 +0000 | [diff] [blame^] | 13 | |
| 14 | |
| 15 | GENERATING .SPL FILES |
| 16 | |
| 17 | This involves downloading the files from the OpenOffice.org server, applying a |
| 18 | patch and running Vim to generate the .spl file. To do this all in one go use |
| 19 | the Aap program (www.a-a-p.org). It's simple to install, it only requires |
| 20 | Python. |
| 21 | |
| 22 | You can also do it manually: |
| 23 | 1. Fetch the right spell file from: |
| 24 | http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries |
| 25 | |
| 26 | 2. Unzip the archive: |
| 27 | unzip LL_RR.zip |
| 28 | |
| 29 | 3. Apply the patch: |
| 30 | patch < LL_RR.diff |
| 31 | |
| 32 | 4. If the language has multiple regions do the above for each region. E.g., |
| 33 | for English there are five regions: US, CA, AU, NZ and GB. |
| 34 | |
| 35 | 5. Run Vim and execute ":mkspell". Make sure you do this with the correct |
| 36 | locale, that influences the upper/lower case letters and word characters. |
| 37 | On Unix it's something like: |
| 38 | env LANG=en_US.UTF-8 vim |
| 39 | mkspell! en en_US en_AU en_CA en_GB en_NZ |
| 40 | |
| 41 | 6. Repeat step 5 for other locales. For English you could generate a spell |
| 42 | file for latin1, utf-8 and ASCII. ASCII only makes sense for languages |
| 43 | that have very few words with non-ASCII letters. |
| 44 | |
| 45 | Now you understand why I prefer using the Aap recipe :-). |
| 46 | |
| 47 | |
| 48 | MAINTAINING A LANGUAGE |
| 49 | |
| 50 | Every language should have a maintainer. His tasks are to track the changes |
| 51 | in the OpenOffice.org spell files and make updated patches. Words that |
| 52 | haven't been added/removed from the OpenOffice lists can also be handled by |
| 53 | the patches. |
| 54 | |
| 55 | It is important to keep the version of the .dic and .aff files that you |
| 56 | started with. When OpenOffice brings out new versions of these files you can |
| 57 | find out what changed and take over these changes in your patch. When there |
| 58 | are very many changes you can do it the other way around: re-apply the changes |
| 59 | for Vim to the new versions of the .dic and .aff files. |
| 60 | |
| 61 | This procedure should work well: |
| 62 | |
| 63 | 1. Obtain the zip archive with the .aff and .dic files. Unpack it as |
| 64 | explained above and copy (don't rename!) the .aff and .dic files to |
| 65 | .orig.aff and .orig.dic. Using the Aap recipe should work, it will make |
| 66 | the copies for you. |
| 67 | |
| 68 | 2. Tweak the .aff and .dic files to generate the perfect .spl file. Don't |
| 69 | change too much, the OpenOffice people are not stupid. However, you may |
| 70 | want to remove obvious mistakes. And remove single-letter words that |
| 71 | aren't really words, they mess up the suggestions (English has this |
| 72 | problem). |
| 73 | |
| 74 | 3. Make the diff file. "aap diff" will do this for you. If a diff would be |
| 75 | too big you might consider writing a Vim script to do systematic changes. |
| 76 | Do check that someone else can reproduce building the spell file. Send the |
| 77 | result to Bram for inclusion in the distribution. Bram will generate the |
| 78 | .spl file and upload it to the ftp server (if he can't generate it you will |
| 79 | have to send him the .spl file too). |
| 80 | |
| 81 | 4. When OpenOffice makes a new zip file available you need to update the |
| 82 | patch. "aap check" should do most of the work for you: if there are |
| 83 | changes the .new.dic and .new.aff files will appear. You can now figure |
| 84 | out the differences with .orig.dic and .orig.aff, adjust the .dic and .aff |
| 85 | files and finally move the .new.dic to .orig.dic and .new.aff to .orig.aff. |
| 86 | |
| 87 | 5. Repeat step 4. regularly. |