Skip to content

Commit 3ad8772

Browse files
committed
Include Serbian spell input files
1 parent 75542ec commit 3ad8772

3 files changed

Lines changed: 276 additions & 0 deletions

File tree

runtime/spell/sr/main.aap

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Aap recipe for Serbian Vim spell files.
2+
3+
# Use a freshly compiled Vim if it exists.
4+
@if os.path.exists('../../../src/vim'):
5+
VIM = ../../../src/vim
6+
@else:
7+
:progsearch VIM vim
8+
9+
SPELLDIR = ..
10+
FILES = sr_RS.aff sr_RS.dic
11+
'sr_RS@latin.aff' 'sr_RS@latin.dic'
12+
13+
all: $SPELLDIR/sr.utf-8.spl $SPELLDIR/'sr@latin.utf-8.spl' ../README_sr.txt
14+
15+
# Original files will be in the subfolder hunspell-sr after unpacking:
16+
# sr.dic original cyrillic dictionary
17+
# sr.aff original cyrillic affix file
18+
# sr-Latn.dic original latin dictionary file
19+
# sr-Latn.aff original latin affix file
20+
# Just before using the dictionary files, the right ones are copied to
21+
# sr_RS.aff
22+
# sr_RS.dic
23+
# and
24+
# sr_RS@latin.aff
25+
# sr_RS@latin.dic
26+
27+
$SPELLDIR/sr.utf-8.spl : $FILES
28+
:sys env LANG=sr_RS.UTF-8
29+
$VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/sr sr_RS" -c q
30+
31+
$SPELLDIR/"sr@latin.utf-8.spl" : $FILES
32+
:sys env LANG=sr_RS@latin.UTF-8
33+
$VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/sr@latin sr_RS@latin" -c q
34+
35+
../README_sr.txt : hunspell-sr/README_sr.txt README_sr_RS.txt
36+
:cat README_sr_RS.txt >!$target
37+
:print >>$target
38+
:print ============================================================== >>$target
39+
:print Следи оригинална README датотека: >>$target
40+
:print >>$target
41+
:cat hunspell-sr/README_sr.txt >>$target
42+
43+
#
44+
# Used to fetch the files.
45+
#
46+
ZIPFILE = http://devbase.net/dict-sr/hunspell-sr-20130715.zip
47+
48+
:attr {fetch = $ZIPFILE} sr_RS.zip
49+
50+
# The files don't depend on the .zip file so that we can delete it.
51+
# Only download the zip file if the targets don't exist.
52+
sr_RS.aff sr_RS.dic: {buildcheck=}
53+
:assertpkg unzip patch
54+
:fetch sr_RS.zip
55+
:sys $UNZIP sr_RS.zip
56+
:delete sr_RS.zip
57+
@if not os.path.exists('sr_RS.orig.aff'):
58+
:copy hunspell-sr/sr.aff sr_RS.orig.aff
59+
@if not os.path.exists('sr_RS.orig.dic'):
60+
:copy hunspell-sr/sr.dic sr_RS.orig.dic
61+
@if os.path.exists('sr_RS.diff'):
62+
:sys patch <sr_RS.diff
63+
:copy sr_RS.orig.aff sr_RS.aff
64+
:copy sr_RS.orig.dic sr_RS.dic
65+
66+
# Remove the 3 misspelled words and update the word count
67+
# :sys $VIM -u NONE -e -c "set enc=utf-8"
68+
# -c "e sr_RS.orig.dic"
69+
# -c "%g/ажуриранје/d"
70+
# -c "%g/вишнја/d"
71+
# -c "%g/вишнјевац/d"
72+
# -c "%s/263909/263906/e"
73+
# -c "w! sr_RS.dic"
74+
# -c q
75+
76+
sr_RS@latin.aff sr_RS@latin.dic: {buildcheck=}
77+
:assertpkg unzip patch
78+
:fetch sr_RS.zip
79+
:sys $UNZIP sr_RS.zip
80+
:delete sr_RS.zip
81+
@if not os.path.exists('sr_RS@latin.orig.aff'):
82+
:copy hunspell-sr/sr-Latn.aff 'sr_RS@latin.orig.aff'
83+
@if not os.path.exists('sr_RS@latin.orig.dic'):
84+
:copy hunspell-sr/sr-Latn.dic 'sr_RS@latin.orig.dic'
85+
@if os.path.exists('sr_RS@latin.diff'):
86+
:sys patch <'sr_RS@latin.diff'
87+
:copy 'sr_RS@latin.orig.aff' 'sr_RS@latin.aff'
88+
:copy 'sr_RS@latin.orig.dic' 'sr_RS@latin.dic'
89+
90+
91+
# Remove the 3 duplicated words and update the word count
92+
# :sys $VIM -u NONE -e -c "set enc=utf-8"
93+
# -c "e sr_RS@latin.orig.dic"
94+
# -c "%g/\v(ažuriranje)(\_.*\1)@=/d"
95+
# -c "%g/\v(višnja)(\_.*\1)@=/d"
96+
# -c "%g/\v(višnjevac)(\_.*\1)@=/d"
97+
# -c "%s/263909/263906/e"
98+
# -c "w! sr_RS@latin.dic"
99+
# -c q
100+
101+
# Generate diff files, so that others can get the files and apply
102+
# the diffs to get the Vim versions.
103+
diff:
104+
:assertpkg diff
105+
:sys {force} diff -a -C 1 sr_RS.orig.aff sr_RS.aff >sr_RS.diff
106+
:sys {force} diff -a -C 1 sr_RS.orig.dic sr_RS.dic >>sr_RS.diff
107+
:sys {force} diff -a -C 1 'sr_RS@latin.orig.aff' 'sr_RS@latin.aff' >'sr_RS@latin.diff'
108+
:sys {force} diff -a -C 1 'sr_RS@latin.orig.dic' 'sr_RS@latin.dic' >>'sr_RS@latin.diff'
109+
110+
# Delete all the unpacked and generated files, including the "orig" files.
111+
clean:
112+
:delete {force} sr_RS.zip sr_RS.dic
113+
sr_RS.orig.aff sr_RS.orig.dic
114+
sr_RS.aff
115+
'sr_RS@latin.dic' 'sr_RS@latin.aff'
116+
'sr_RS@latin.orig.aff' 'sr_RS@latin.orig.dic'
117+
:sys rm -f -r hunspell-sr/
118+
119+
# Check for updated OpenOffice spell files. When there are changes the
120+
# ".new.aff" and ".new.dic" files are left behind for manual inspection.
121+
#
122+
#check:
123+
# :assertpkg unzip diff
124+
# :fetch fr_FR.zip
125+
# :mkdir tmp
126+
# :cd tmp
127+
# @try:
128+
# @import stat
129+
# :sys $UNZIP ../fr_FR.zip
130+
# :sys {force} diff ../fr_FR.orig.aff fr_FR.aff >d
131+
# @if os.stat('d')[stat.ST_SIZE] > 0:
132+
# :copy fr_FR.aff ../fr_FR.new.aff
133+
# :sys {force} diff ../fr_FR.orig.dic fr_FR.dic >d
134+
# @if os.stat('d')[stat.ST_SIZE] > 0:
135+
# :copy fr_FR.dic ../fr_FR.new.dic
136+
# @finally:
137+
# :cd ..
138+
# :delete {r}{f}{q} tmp
139+
# :delete fr_FR.zip
140+
141+
142+
vim: set sts=4 sw=4 :

runtime/spell/sr/sr_RS.diff

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
*** sr_RS.orig.aff Fri Feb 23 20:04:41 2018
2+
--- sr_RS.aff Fri Feb 23 18:18:48 2018
3+
***************
4+
*** 1,10 ****
5+
! SET UTF-8
6+
7+
! LANG sr
8+
! TRY аиоенртсвумклпјдгзбшчцхћњљжфђџАИОЕНРТСВУМКЛПЈДГЗБШЧЦХЋЊЉЖФЂЏ
9+
! KEY љњертжуиопшђж|асдфгхјклчћ|зџцвбнм|жшђ|ћшч|жчђ|ђћж|зж|љањседрфтгжхуј|јиколпч|азсџдцфвгбх|хнјмк
10+
!
11+
! MAP 4
12+
! MAP цћ
13+
! MAP цч
14+
MAP зж
15+
--- 1,5 ----
16+
! SET utf-8
17+
18+
! MAP 3
19+
! MAP цћч
20+
MAP зж
21+
***************
22+
*** 12,14 ****
23+
24+
! REP 8
25+
REP дј ђ
26+
--- 7,11 ----
27+
28+
! MIDWORD -’
29+
!
30+
! REP 4
31+
REP дј ђ
32+
***************
33+
*** 17,28 ****
34+
REP дж џ
35+
- REP ц с # Ако хоћу да откуцам слово „С“ могу се залетети за ознаком на тастатури и уписати „Ц“ (C)
36+
- REP п р # Ако хоћу да откуцам слово „В“ могу се залетети за ознаком и уписати „Б“ (B)
37+
- REP џ х # Ако хоћу да откуцам слово „Р“ могу се залетети за ознаком и уписати „П“ (P)
38+
- REP х н # Ако хоћу да откуцам слово „Х“ могу се залетети за ознаком и уписати „Џ“ (X)
39+
- # Ако хоћу да откуцам слово „В“ могу се залетети за ознаком и уписати „Б“ (B) (покривено KEY паром „в - б“)
40+
-
41+
- ICONV 3
42+
- ICONV ҵ тц
43+
- ICONV ҥ нг
44+
- ICONV ӕ ае
45+
46+
--- 14,15 ----
47+
*** sr_RS.orig.dic Fri Feb 23 20:04:42 2018
48+
--- sr_RS.dic Fri Feb 23 20:04:46 2018
49+
***************
50+
*** 1,2 ****
51+
! 263909
52+
а
53+
--- 1,2 ----
54+
! 263906
55+
а
56+
***************
57+
*** 882,884 ****
58+
ажурираних
59+
- ажуриранје
60+
ажурирано
61+
--- 882,883 ----
62+
***************
63+
*** 22177,22180 ****
64+
вишку
65+
- вишнја
66+
- вишнјевац
67+
Вишну
68+
--- 22176,22177 ----

runtime/spell/sr/sr_RS@latin.diff

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
*** sr_RS@latin.orig.aff Fri Feb 23 20:08:28 2018
2+
--- sr_RS@latin.aff Fri Feb 23 18:18:48 2018
3+
***************
4+
*** 1,10 ****
5+
! SET UTF-8
6+
7+
! LANG sr-Latn
8+
! TRY aioenrtsvumklpjdgzbščchćnjljžfđdžAIOENRTSVUMKLPJDGZBŠČCHĆNJLJŽFĐDŽ
9+
! KEY qwertyuiopšđž|asdfghjklčć|zxcvbnm|žšđ|ćšč|žčđ|đćž|zy|qawsedrftgyhuj|jikolpč|azsxdcfvgbh|hnjmk
10+
!
11+
! MAP 4
12+
! MAP cć
13+
! MAP cč
14+
MAP zž
15+
--- 1,5 ----
16+
! SET utf-8
17+
18+
! MAP 3
19+
! MAP cćč
20+
MAP zž
21+
***************
22+
*** 12,20 ****
23+
24+
! REP 1
25+
! REP dj đ
26+
27+
! ICONV fi fi
28+
! ICONV fl fl
29+
! ICONV st st
30+
! ICONV ij ij
31+
! ICONV œ oe
32+
--- 7,14 ----
33+
34+
! MIDWORD -’
35+
36+
! REP 4
37+
! REP dj đ
38+
! REP fl fl
39+
! REP ff ff
40+
! REP fi fi
41+
*** sr_RS@latin.orig.dic Fri Feb 23 20:08:28 2018
42+
--- sr_RS@latin.dic Fri Feb 23 20:08:53 2018
43+
***************
44+
*** 1,2 ****
45+
! 263909
46+
a
47+
--- 1,2 ----
48+
! 263906
49+
a
50+
***************
51+
*** 882,884 ****
52+
ažuriranih
53+
- ažuriranje
54+
ažurirano
55+
--- 882,883 ----
56+
***************
57+
*** 22177,22184 ****
58+
višku
59+
- višnja
60+
- višnjevac
61+
Višnu
62+
višnja
63+
višnjama
64+
višnjare
65+
višnje
66+
--- 22176,22181 ----

0 commit comments

Comments
 (0)