Hi

Attached patch adds the AAP files to build the Breton dictionary for Vim
in utf-8 and latin1 encoding from the OpenOffice-3.x Breton dictionary.

Breton (Brezhoneg, language code "br") is a Celtic language spoken in
Brittany (west of France) which is closely related to Cornish and Welsh
For more information about Breton, see:
  http://en.wikipedia.org/wiki/Breton_language

One odd thing which I did not understand: I had to put "set spell"
in vim/runtime/spell/br/main.aap at line 19 or else the generated
br.utf-8.spl was somehow incorrect?!  Why? The incorrect br.utf-8/spl
gave error: "E763: Word characters differ between spell files"  when
trying to use it. Somehow the "set spell" in main.aap fixes it.

Cheers
-- Dominique

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -r 24100651daa9 runtime/spell/br/main.aap
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/spell/br/main.aap	Sun Apr 11 23:26:57 2010 +0200
@@ -0,0 +1,82 @@
+# Aap recipe for Breton Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+...@if os.path.exists('../../../src/vim'):
+    VIM = ../../../src/vim
+...@else:
+    :progsearch VIM vim
+
+SPELLDIR = ..
+FILES    = br_FR.aff br_FR.dic
+
+all: $SPELLDIR/br.latin1.spl $SPELLDIR/br.utf-8.spl ../README_br.txt
+
+$SPELLDIR/br.latin1.spl : $FILES
+        :sys $VIM -u NONE -e -c "set enc=latin1 spell"
+                -c "mkspell! $SPELLDIR/br br_FR" -c q
+
+$SPELLDIR/br.utf-8.spl : $FILES
+        :sys $VIM -u NONE -e -c "set enc=UTF-8 spell"
+                -c "mkspell! $SPELLDIR/br br_FR" -c q
+
+../README_br.txt : package-description.txt
+        :copy $source $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://extensions.services.openoffice.org/e-files/2207/3
+:attr {fetch = $OODIR/%file%} dict-br_0.3.oxt
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+br_FR.aff br_FR.dic: {buildcheck=}
+        :assertpkg unzip patch
+        :fetch dict-br_0.3.oxt
+        :sys $UNZIP dict-br_0.3.oxt
+        :delete dict-br_0.3.oxt
+        :copy dictionaries/br_FR.aff br_FR.aff
+        :copy dictionaries/br_FR.dic br_FR.dic
+        # The br_FR.aff file contains a BOM.
+        # Remove it since Vim does not like
+        :sys $VIM -u NONE -e -c "set enc=utf-8"
+                    -c "e br_FR.aff"
+                    -c "set nobomb"
+                    -c "w! br_FR.aff"
+                    -c q
+        @if os.path.exists('br_FR.diff'):
+            :sys patch <br_FR.diff
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+        :assertpkg diff
+        :sys {force} diff -a -C 1 dictionaries/br_FR.aff br_FR.aff >br_FR.diff
+        :sys {force} diff -a -C 1 dictionaries/br_FR.dic br_FR.dic >>br_FR.diff
+
+
+# Check for updated OpenOffice spell files.  When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+        :assertpkg unzip diff
+        :fetch dict-br_0.3.oxt
+        :mkdir tmp
+        :cd tmp
+        @try:
+            @import stat
+            :sys $UNZIP ../dict-br_0.3.oxt
+            :sys {force} diff ../dictionaries/br_FR.aff br_FR.aff >d
+            @if os.stat('d')[stat.ST_SIZE] > 0:
+                :copy br_FR.aff ../br_FR.new.aff
+            :sys {force} diff ../dictionaries/br_FR.dic br_FR.dic >d
+            @if os.stat('d')[stat.ST_SIZE] > 0:
+                :copy br_FR.dic ../br_FR.new.dic
+        @finally:
+            :cd ..
+            :delete {r}{f}{q} tmp
+            :delete dict-br_0.3.oxt
+
+
+# vim: set sts=4 sw=4 :
diff -r 24100651daa9 runtime/spell/main.aap
--- a/runtime/spell/main.aap	Tue Mar 23 18:22:46 2010 +0100
+++ b/runtime/spell/main.aap	Sun Apr 11 23:26:57 2010 +0200
@@ -5,8 +5,8 @@
 # aap diff   create all the diff files
 
 # "hu" is at the end, because it takes a very long time.
-LANG = af am bg ca cs cy da de el en eo es fr fo ga gd gl he hr id it ku
-       la lt lv mg mi ms nb nl nn ny pl pt ro ru rw sk sl sv sw
+LANG = af am bg br ca cs cy da de el en eo es fr fo ga gd gl he hr id it 
+       ku la lt lv mg mi ms nb nl nn ny pl pt ro ru rw sk sl sv sw
        tet th tl tn uk yi zu hu
 
 # TODO:

Raspunde prin e-mail lui