annotate runtime/spell/README.txt @ 18486:9d887cad7315

Added tag v8.1.2237 for changeset 63ee3c2b140fe1b4801389872a8e47aec19d028b
author Bram Moolenaar <Bram@vim.org>
date Thu, 31 Oct 2019 20:00:04 +0100
parents 7cfe57329284
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
1 The spell files included here are in Vim's special format. You can't edit
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
2 them. See ":help spell" for more information.
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
3
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
4
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
5 COPYRIGHT
236
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
6
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
7 The files used as input for the spell files come from the OpenOffice.org spell
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
8 files. Most of them go under the LGPL or a similar license.
4707450c2b33 updated for version 7.0066
vimboss
parents:
diff changeset
9
388
f92bb1845823 updated for version 7.0101
vimboss
parents: 236
diff changeset
10 Copyright notices for specific languages are in README_??.txt. Note that the
f92bb1845823 updated for version 7.0101
vimboss
parents: 236
diff changeset
11 files for different regions are merged, both to save space and to make it
f92bb1845823 updated for version 7.0101
vimboss
parents: 236
diff changeset
12 possible to highlight words for another region different from bad words.
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
13
536
c1d5993c7d9f updated for version 7.0152
vimboss
parents: 486
diff changeset
14 Most of the soundslike mappings come from Aspell ??_phonet.dat files:
c1d5993c7d9f updated for version 7.0152
vimboss
parents: 486
diff changeset
15 ftp://ftp.gnu.org/gnu/aspell/dict/. Most go under the GPL or LGPL copyright.
c1d5993c7d9f updated for version 7.0152
vimboss
parents: 486
diff changeset
16
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
17
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
18 GENERATING .SPL FILES
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
19
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
20 This involves downloading the files from the github server, applying a
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
21 patch and running Vim to generate the .spl file. To do this all in one go use
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
22 the Aap program (www.a-a-p.org). It's simple to install, it only requires
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
23 Python (http://www.a-a-p.org/download.html)
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
24
2293
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
25 Before generating spell files, verify your system has the required locale
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
26 support. Source the check_locales.vim script to find out. If something is
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
27 missing, see LOCALE below.
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
28
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
29
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
30 You can also do it manually:
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
31 1. Fetch the right spell file from:
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
32 https://github.com/LibreOffice/dictionaries
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
33
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
34 2. Unzip the archive:
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
35 unzip LL_RR.zip
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
36
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
37 3. Apply the patch:
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
38 patch < LL_RR.diff
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
39
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
40 4. If the language has multiple regions do the above for each region. E.g.,
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
41 for English there are five regions: US, CA, AU, NZ and GB.
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
42
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
43 5. Run Vim and execute ":mkspell". Make sure you do this with the correct
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
44 locale, that influences the upper/lower case letters and word characters.
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
45 On Unix it's something like:
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
46 env LANG=en_US.UTF-8 vim
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
47 mkspell! en en_US en_AU en_CA en_GB en_NZ
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
48
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
49 6. Repeat step 5 for other locales. For English you could generate a spell
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
50 file for latin1, utf-8 and ASCII. ASCII only makes sense for languages
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
51 that have very few words with non-ASCII letters.
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
52
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
53 Now you understand why I prefer using the Aap recipe :-).
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
54
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
55
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
56 MAINTAINING A LANGUAGE
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
57
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
58 Every language should have a maintainer. His tasks are to track the changes
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
59 in the spell files and make updated patches. Words that haven't been
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
60 added/removed from the LibreOffice lists can also be handled by the patches.
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
61
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
62 It is important to keep the version of the .dic and .aff files that you
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
63 started with. When LibreOffice brings out new versions of these files you can
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
64 find out what changed and take over these changes in your patch. When there
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
65 are very many changes you can do it the other way around: re-apply the changes
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
66 for Vim to the new versions of the .dic and .aff files.
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
67
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
68 This procedure should work well:
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
69
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
70 1. Obtain the zip archive with the .aff and .dic files. Unpack it as
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
71 explained above and copy (don't rename!) the .aff and .dic files to
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
72 .orig.aff and .orig.dic. Using the Aap recipe should work, it will make
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
73 the copies for you.
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
74
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
75 2. Tweak the .aff and .dic files to generate the perfect .spl file. Don't
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
76 change too much, the OpenOffice people are not stupid. However, you may
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
77 want to remove obvious mistakes. And remove single-letter words that
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
78 aren't really words, they mess up the suggestions (English has this
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 536
diff changeset
79 problem). You can use the "fixdup.vim" Vim script to find duplicate words.
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
80
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
81 3. Include needed parts from the aspell phonetic dictionary to the aff files. For
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
82 example add the relevant SAL lines to the .aff file (this is needed to make good
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
83 suggestions). The aspell dictionaries can be found here:
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
84 https://ftp.gnu.org/gnu/aspell/dict/0index.html
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
85
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
86 4. Make the diff file. "aap diff" will do this for you. If a diff would be
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
87 too big you might consider writing a Vim script to do systematic changes.
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
88 Do check that someone else can reproduce building the spell file. Send the
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
89 result to Bram for inclusion in the distribution. Bram will generate the
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
90 .spl file and upload it to the ftp server (if he can't generate it you will
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
91 have to send him the .spl file too).
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
92
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
93 5. When OpenOffice makes a new zip file available you need to update the
391
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
94 patch. "aap check" should do most of the work for you: if there are
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
95 changes the .new.dic and .new.aff files will appear. You can now figure
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
96 out the differences with .orig.dic and .orig.aff, adjust the .dic and .aff
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
97 files and finally move the .new.dic to .orig.dic and .new.aff to .orig.aff.
289b19a6f2ed updated for version 7.0103
vimboss
parents: 388
diff changeset
98
15640
7cfe57329284 Updated runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2293
diff changeset
99 6. Repeat step 5. regularly.
2293
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
100
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
101
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
102 LOCALE
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
103
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
104 For proper spell file generation the required locale must be installed.
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
105 Otherwise Vim doesn't know what are letters and upper-lower case differences.
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
106 Modern systems use UTF-8, but we also generate spell files for 8-bit locales
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
107 for users with older systems.
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
108
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
109 On Ubuntu the default is to only support locales for your own language. To
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
110 add others you need to do this:
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
111 sudo vim /var/lib/locales/supported.d/local
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
112 Add needed lines from /usr/share/i18n/SUPPORTED
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
113 sudo dpkg-reconfigure locales
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
114
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
115 When using the check_locales.vim script, you need to exit Vim and restart it
e0fabd886db6 Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
116 to pickup the newly installed locales.