Commits

Scott Lawrence committed 626ce76

Unpack the zip files and package just the .dic and .aff contents, fix names to match dictionary.xml

Comments (0)

Files changed (3)

           <array>
             <string>dictionaries/dictionaries.xml</string>
             <string>dictionaries/*.dic</string>
-            <string>dictionaries/*.oxt</string>
-            <string>dictionaries/*.zip</string>
+            <string>dictionaries/*.aff</string>
             <string>LICENSES/*.txt</string>
           </array>
           <key>name</key>
 cp -v "${SRC_DIR}/sl.dic" "${DICT_DIR}/sl.dic"
 
 # American English
-cp -v "${SRC_DIR}/en_US.oxt" "${DICT_DIR}/en_US.oxt"
-unzip -jaa "${SRC_DIR}/en_US.oxt" README_en_US.txt
-mv -v README_en_US.txt "${LICENSE_DIR}/en_US-dictionary-license.txt"
+mkdir en_US
+unzip -j -aa -d en_US        "${SRC_DIR}/en_US.oxt" 
+cp -v en_US/en_US.dic        "${DICT_DIR}/en_us.dic"
+cp -v en_US/en_US.aff        "${DICT_DIR}/en_us.aff"
+cp -v en_US/README_en_US.txt "${LICENSE_DIR}/en_us-dictionary-license.txt"
 
 # British English
-cp -v "${SRC_DIR}/en-GB.zip" "${DICT_DIR}/en_GB.zip"
-unzip -jaa "${SRC_DIR}/en-GB.zip" README_en_GB.txt
-mv -v README_en_GB.txt "${LICENSE_DIR}/en_GB-dictionary-license.txt"
+mkdir en_UK
+unzip -j -aa -d en_UK        "${SRC_DIR}/en-GB.zip"
+cp -v en_UK/en-GB.dic        "${DICT_DIR}/en_gb.dic"
+cp -v en_UK/en-GB.aff        "${DICT_DIR}/en_gb.aff"
+cp -v en_UK/README_en_GB.txt "${LICENSE_DIR}/en_gb-dictionary-license.txt"
 
 # Spanish Spanish
-cp -v "${SRC_DIR}/es_ES.oxt" "${DICT_DIR}/es_ES.oxt"
-unzip -jaa "${SRC_DIR}/es_ES.oxt" README.txt
-mv -v README.txt "${LICENSE_DIR}/es_ES-dictionary-license.txt"
+mkdir es_ES
+unzip -j -aa -d es_ES  "${SRC_DIR}/es_ES.oxt" 
+cp -v es_ES/es_ES.dic  "${DICT_DIR}/es_es.dic"
+cp -v es_ES/es_ES.aff  "${DICT_DIR}/es_es.aff"
+cp -v es_ES/README.txt "${LICENSE_DIR}/es_es-dictionary-license.txt"
 
 # Brazillian Portugese
-cp -v "${SRC_DIR}/Vero_pt_BR_V208AOC.oxt" "${DICT_DIR}/pt_BR.oxt"
-unzip -jaa "${SRC_DIR}/Vero_pt_BR_V208AOC.oxt" README_en.TXT
-mv -v README_en.TXT "${LICENSE_DIR}/pt_BR-dictionary-license.txt"
+mkdir pt_BR
+unzip -j -aa -d pt_BR     "${SRC_DIR}/Vero_pt_BR_V208AOC.oxt"
+cp -v pt_BR/pt_BR.dic     "${DICT_DIR}/pt_br.dic"
+cp -v pt_BR/pt_BR.aff     "${DICT_DIR}/pt_br.aff"
+cp -v pt_BR/README_en.TXT "${LICENSE_DIR}/pt_br-dictionary-license.txt"
 
 pass
 

src/dictionaries.xml

 <?xml version="1.0" encoding="utf-8"?>
 <llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="llsd.xsd">
-    <array>
-        <map>
-        <key>name</key>
-            <string>en_gb</string>
-        <key>is_primary</key>
-            <boolean>1</boolean>
-        <key>language</key>
-            <string>English (United Kingdom)</string>
-        </map>
-        <map>
-        <key>name</key>
-            <string>en_us</string>
-        <key>is_primary</key>
-            <boolean>1</boolean>
-        <key>language</key>
-            <string>English (United States)</string>
-        </map>
-        <map>
-        <key>name</key>
-            <string>es_es</string>
-        <key>is_primary</key>
-            <boolean>1</boolean>
-        <key>language</key>
-            <string>Español (España)</string>
-        </map>
-        <map>
-        <key>name</key>
-            <string>pt_br</string>
-        <key>is_primary</key>
-            <boolean>1</boolean>
-        <key>language</key>
-            <string>Português (Brasil)</string>
-        </map>
-        <map>
-        <key>name</key>
-            <string>sl</string>
-        <key>is_primary</key>
-            <boolean>0</boolean>
-        <key>language</key>
-            <string>Second Life Glossary</string>
-        </map>
-    </array>
+  <array>
+    <map>
+      <key>name</key>
+      <string>en_gb</string>
+      <key>is_primary</key>
+      <boolean>1</boolean>
+      <key>language</key>
+      <string>English (United Kingdom)</string>
+    </map>
+    <map>
+      <key>name</key>
+      <string>en_us</string>
+      <key>is_primary</key>
+      <boolean>1</boolean>
+      <key>language</key>
+      <string>English (United States)</string>
+    </map>
+    <map>
+      <key>name</key>
+      <string>es_es</string>
+      <key>is_primary</key>
+      <boolean>1</boolean>
+      <key>language</key>
+      <string>Español (España)</string>
+    </map>
+    <map>
+      <key>name</key>
+      <string>pt_br</string>
+      <key>is_primary</key>
+      <boolean>1</boolean>
+      <key>language</key>
+      <string>Português (Brasil)</string>
+    </map>
+    <map>
+      <key>name</key>
+      <string>sl</string>
+      <key>is_primary</key>
+      <boolean>0</boolean>
+      <key>language</key>
+      <string>Second Life Glossary</string>
+    </map>
+  </array>
 </llsd>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.