]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Faster multi search, exact search, moved Normalization around.
authorThad Hughes <thad.hughes@gmail.com>
Tue, 31 Jan 2012 22:55:40 +0000 (14:55 -0800)
committerThad Hughes <thad.hughes@gmail.com>
Tue, 31 Jan 2012 22:55:40 +0000 (14:55 -0800)
19 files changed:
res/layout/dictionary_activity.xml
res/raw-de/whats_new.html
res/raw/dictionary_info.txt
res/raw/help.html
res/raw/whats_new.html
res/values-de/arrays.xml [moved from res/_values-de/arrays.xml with 100% similarity]
res/values-de/strings.xml [moved from res/_values-de/strings.xml with 60% similarity]
res/values/strings.xml
src/com/hughes/android/dictionary/AboutActivity.java
src/com/hughes/android/dictionary/DictionaryActivity.java
src/com/hughes/android/dictionary/DictionaryApplication.java
src/com/hughes/android/dictionary/DictionaryManagerActivity.java
src/com/hughes/android/dictionary/DownloadActivity.java
src/com/hughes/android/dictionary/HelpActivity.java
src/com/hughes/android/dictionary/PreferenceActivity.java
src/com/hughes/android/dictionary/engine/EntrySource.java
src/com/hughes/android/dictionary/engine/Index.java
src/com/hughes/android/dictionary/engine/Language.java
src/com/hughes/android/dictionary/engine/NormalizeComparator.java [new file with mode: 0644]

index 1afaa70559d2c5b2d0eee3c109948e4179293192..de5ae67c04291cbf0f63024c0a15e803bba5b3db 100644 (file)
@@ -23,7 +23,7 @@
                                
       <Button 
         android:id="@+id/ClearSearchTextButton"
-        android:drawableLeft="@+drawable/ic_input_delete"
+        android:drawableLeft="@drawable/ic_input_delete"
         android:background="#00000000"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
                                android:id="@+id/LangButton"
                                android:text=""
                                android:minWidth="50dip"
+        android:maxLines="1"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                />
                                
                        <Button
                    android:id="@+id/DownButton"
-        android:drawableLeft="@+drawable/arrow_down_float"
+        android:drawableLeft="@drawable/arrow_down_float"
         android:background="#00000000"
         android:minWidth="30dip" 
         android:minHeight="30dip"
@@ -49,7 +50,7 @@
                                
                        <Button 
                                android:id="@+id/UpButton"
-        android:drawableLeft="@+drawable/arrow_up_float"
+        android:drawableLeft="@drawable/arrow_up_float"
         android:background="#00000000"
         android:minWidth="30dip"
         android:minHeight="30dip"
@@ -71,6 +72,6 @@
   <TextView android:id="@android:id/empty"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:text="@+string/noSearchResults"/>
+    android:text="@string/noSearchResults"/>
 
 </LinearLayout>
index 1f4440a65ab59be349f775264a0f93b7fdd5e64f..8fcd866f54bde33464f71eeef73574ec63b9707c 100644 (file)
@@ -5,14 +5,13 @@
 <body>
   <!-- Don't use links in the text below, it crashes the app. -->
 
-  Thanks for updating to QuickDic 3.1.
-  <p> New features:
+  Vielen Dank für die Aktualisierung auf QuickDic 3.1.
+  <p> Neue Funktionen:
   <ul>
-    <li> Long-press any word in a dictionary to lookup that word.
-    <li> Long-press the search text to see search history. 
-    <li> Long-press the switch-language button to change dictionaries.
-    <li> New English dictionaries: Tagalog, Urdu. (based on enwiktionary.com data).
-    <li> All dictionaries updated (mostly with better formatting), and can be re-downloaded at your leisure (previously downloaded dictionaries will still work).
-  </ul>
+    <li> Suche nach mehreren Begriffen gleichzeitig (durch Leerzeichen getrennt).
+    <li> Long-drücken jedes Wort in einem Wörterbuch, um dieses Wort zu suchen.
+    <li> Long-drücken den Sprache-Taste, um das aktuelle Wörterbuch zu wechseln.
+    <li> New English Wörterbücher: Tagalog, Urdu. (ab enwiktionary.com Daten).
+    <li> Alle Wörterbücher aktualisiert (vor allem mit einer besseren Formatierung), und können in Ihrer Freizeit (zuvor heruntergeladene Wörterbücher wird immer noch funktionieren) erneut heruntergeladen werden.  </ul>
 </body>
 </html>
index 8220982879de516b9e4ea94f120ff8390ade4e5d..d6ea217ad5683ee07ab25ba21f99b015d5a32242 100644 (file)
@@ -1,64 +1,73 @@
-# LANG_1       %LANG_2 FILENAME        VERSION_CODE    FILESIZE        NUM_MAIN_WORDS_1        NUM_MAIN_WORDS_2        NUM_ALL_WORDS_1 NUM_ALL_WORDS_2
-DE-EN_chemnitz_enwiktionary.quickdic   http://quickdic-dictionary.googlecode.com/files/DE-EN_chemnitz_enwiktionary.quickdic.v002.zip   1327452225789   50883531        -1      2       DE      262836  144927  EN      119133  51756   German-English dictionary dedicated to my parents Bob and Judy Hughes, my German teachers, Suzanne Blount and Steven Sidore, my friends Max Haeberlin, Severin Obertuefer, and Ben Keck, and all my friends and students at Munich International School. Und Die Toten Hosen.\n\nGerman-English dictionary contains information from:\nde-en.txt - a German-English dictionary\nVersion: devel 2011-06-21\nSource: http://dict.tu-chemnitz.de/\nThanks to Frank Richter.\nAnd from:\n(EN)Wiktionary\n
-EN-AF_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-AF_enwiktionary.quickdic.v002.zip    1327445608997   532666  -1      2       EN      4883    1536    AF      2770    1764    (EN)Wikitionary-based EN-AF dictionary.\n\nAfrikaans dictionary dedicated to Heiko and Mariëtte Horn.
-EN-AR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-AR_enwiktionary.quickdic.v002.zip    1327445706295   4104354 -1      2       EN      16619   7238    AR      23838   8365    (EN)Wikitionary-based EN-AR dictionary.\n\n
-EN-BE_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BE_enwiktionary.quickdic.v002.zip    1327445844710   731773  -1      2       EN      4560    1979    BE      5451    2168    (EN)Wikitionary-based EN-BE dictionary.\n\n
-EN-BG_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BG_enwiktionary.quickdic.v002.zip    1327445988012   13069122        -1      2       EN      19651   8265    BG      54883   44879   (EN)Wikitionary-based EN-BG dictionary.\n\n
-EN-BN_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BN_enwiktionary.quickdic.v002.zip    1327445892712   720068  -1      2       EN      4490    1375    BN      1890    180     (EN)Wikitionary-based EN-BN dictionary.\n\n
-EN-BO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BO_enwiktionary.quickdic.v002.zip    1327451661402   84453   -1      2       EN      780     154     BO      430     32      (EN)Wikitionary-based EN-BO dictionary.\n\n
-EN-BS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BS_enwiktionary.quickdic.v002.zip    1327445938848   534979  -1      2       EN      5007    1899    BS      2931    2199    (EN)Wikitionary-based EN-BS dictionary.\n\n
-EN-CA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-CA_enwiktionary.quickdic.v002.zip    1327446092369   10100203        -1      2       EN      16896   7534    CA      55738   51122   (EN)Wikitionary-based EN-CA dictionary.\n\n
-EN-CI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-CI_enwiktionary.quickdic.v002.zip    1327452040807   766542  -1      2       EN      5931    2070    CI      3813    2450    (EN)Wikitionary-based EN-CI dictionary.\n\n
-EN-CS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-CS_enwiktionary.quickdic.v002.zip    1327446267191   5920500 -1      2       EN      24378   12892   CS      23206   19083   (EN)Wikitionary-based EN-CS dictionary.\n\n
-EN-DA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-DA_enwiktionary.quickdic.v002.zip    1327446816640   5367230 -1      2       EN      17490   6455    DA      30625   11078   (EN)Wikitionary-based EN-DA dictionary.\n\n
-EN-EL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-EL_enwiktionary.quickdic.v002.zip    1327447616975   12274928        -1      2       EN      24497   9331    EL      49007   30423   (EN)Wikitionary-based EN-EL dictionary.\n\nGreek dictionary dedicated to Noah Egge.
-EN-EO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-EO_enwiktionary.quickdic.v002.zip    1327447011746   11940087        -1      2       EN      17006   7399    EO      101749  99633   (EN)Wikitionary-based EN-EO dictionary.\n\n
-EN-ES_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ES_enwiktionary.quickdic.v002.zip    1327450972586   67284073        -1      2       EN      37916   19856   ES      241705  225691  (EN)Wikitionary-based EN-ES dictionary.\n\nSpanish dictionary made especially for Carolina Tropini! <3 XoXoXXXXX!
-EN-ET_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ET_enwiktionary.quickdic.v002.zip    1327447127450   1497335 -1      2       EN      9925    3766    ET      7843    6206    (EN)Wikitionary-based EN-ET dictionary.\n\n
-EN-FA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-FA_enwiktionary.quickdic.v002.zip    1327450137849   2305749 -1      2       EN      11321   3743    FA      11622   5668    (EN)Wikitionary-based EN-FA dictionary.\n\n
-EN-FI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-FI_enwiktionary.quickdic.v002.zip    1327447183330   24824519        -1      2       EN      51327   22753   FI      127053  103251  (EN)Wikitionary-based EN-FI dictionary.\n\n
-EN-FR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-FR_enwiktionary.quickdic.v002.zip    1327447370154   39001444        -1      2       EN      44871   21787   FR      210534  41904   (EN)Wikitionary-based EN-FR dictionary.\n\n
-EN-GA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-GA_enwiktionary.quickdic.v002.zip    1327448123774   2285279 -1      2       EN      12349   3953    GA      9011    6920    (EN)Wikitionary-based EN-GA dictionary.\n\n
-EN-HE_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HE_enwiktionary.quickdic.v002.zip    1327447798303   3701779 -1      2       EN      15714   5687    HE      18877   6440    (EN)Wikitionary-based EN-HE dictionary.\n\n
-EN-HI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HI_enwiktionary.quickdic.v002.zip    1327447865368   1628901 -1      2       EN      8581    3193    HI      5721    540     (EN)Wikitionary-based EN-HI dictionary.\n\n
-EN-HR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HR_enwiktionary.quickdic.v002.zip    1327446173307   12192252        -1      2       EN      21336   6395    HR      45390   41229   (EN)Wikitionary-based EN-HR dictionary.\n\nCroatian dictionary dedicated to Ines Viskic and Miro Kresonja.
-EN-HU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HU_enwiktionary.quickdic.v002.zip    1327447919902   6770087 -1      2       EN      22755   9577    HU      36489   26656   (EN)Wikitionary-based EN-HU dictionary.\n\n
-EN-HY_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HY_enwiktionary.quickdic.v002.zip    1327445773830   4695810 -1      2       EN      16706   5902    HY      20695   11087   (EN)Wikitionary-based EN-HY dictionary.\n\n
-EN-ID_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ID_enwiktionary.quickdic.v002.zip    1327448072696   870169  -1      2       EN      6941    2376    ID      4402    2837    (EN)Wikitionary-based EN-ID dictionary.\n\n
-EN-IS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-IS_enwiktionary.quickdic.v002.zip    1327448007095   3595017 -1      2       EN      16826   5069    IS      16630   12127   (EN)Wikitionary-based EN-IS dictionary.\n\n
-EN-IT_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-IT_enwiktionary.quickdic.v002.zip    1327448185123   67614568        -1      2       EN      83052   16783   IT      459408  117886  (EN)Wikitionary-based EN-IT dictionary.\n\nItalian dictionary dedicated to Carolina Tropini, my favorite stardust in the whole universe!  Ti amo!
-EN-JA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-JA_enwiktionary.quickdic.v002.zip    1327449274028   14439626        -1      2       EN      32267   12057   JA      75213   46415   (EN)Wikitionary-based EN-JA dictionary.\n\n
-EN-KO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-KO_enwiktionary.quickdic.v002.zip    1327449634294   3844702 -1      2       EN      18832   6743    KO      24240   11484   (EN)Wikitionary-based EN-KO dictionary.\n\nKorean dictionary dedicated to Ande Elwood--fall fashion und Fernsehturms!
-EN-KU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-KU_enwiktionary.quickdic.v002.zip    1327449730030   996334  -1      2       EN      5891    2282    KU      5511    2428    (EN)Wikitionary-based EN-KU dictionary.\n\n
-EN-LA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-LA_enwiktionary.quickdic.v002.zip    1327448673629   99886281        -1      2       EN      22750   4753    LA      518421  116223  (EN)Wikitionary-based EN-LA dictionary.\n\n
-EN-LT_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-LT_enwiktionary.quickdic.v002.zip    1327449209766   2993495 -1      2       EN      7987    2963    LT      18153   16433   (EN)Wikitionary-based EN-LT dictionary.\n\n
-EN-LV_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-LV_enwiktionary.quickdic.v002.zip    1327449154812   908770  -1      2       EN      6547    2751    LV      4720    3316    (EN)Wikitionary-based EN-LV dictionary.\n\n
-EN-MI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MI_enwiktionary.quickdic.v002.zip    1327449849147   124596  -1      2       EN      1320    348     MI      640     398     (EN)Wikitionary-based EN-MI dictionary.\n\n
-EN-MN_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MN_enwiktionary.quickdic.v002.zip    1327449899425   304762  -1      2       EN      2256    886     MN      2309    742     (EN)Wikitionary-based EN-MN dictionary.\n\n
-EN-MS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MS_enwiktionary.quickdic.v002.zip    1327449791244   676418  -1      2       EN      5067    1846    MS      3504    1622    (EN)Wikitionary-based EN-MS dictionary.\n\n
-EN-NE_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-NE_enwiktionary.quickdic.v002.zip    1327449967331   57169   -1      2       EN      498     165     NE      314     17      (EN)Wikitionary-based EN-NE dictionary.\n\n
-EN-NL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-NL_enwiktionary.quickdic.v002.zip    1327446886578   13090833        -1      2       EN      32341   14787   NL      65428   58073   (EN)Wikitionary-based EN-NL dictionary.\n\nDutch dictionary dedicated to Mike LeBeau.
-EN-NO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-NO_enwiktionary.quickdic.v002.zip    1327450046011   3856718 -1      2       EN      16789   6629    NO      19447   16280   (EN)Wikitionary-based EN-NO dictionary.\n\n
-EN-PA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-PA_enwiktionary.quickdic.v002.zip    1327450398728   82782   -1      2       EN      747     223     PA      425     52      (EN)Wikitionary-based EN-PA dictionary.\n\n
-EN-PL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-PL_enwiktionary.quickdic.v002.zip    1327450206639   8404145 -1      2       EN      22477   11281   PL      42156   18853   (EN)Wikitionary-based EN-PL dictionary.\n\n
-EN-PT_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-PT_enwiktionary.quickdic.v002.zip    1327450301019   10969707        -1      2       EN      22086   11552   PT      50210   46051   (EN)Wikitionary-based EN-PT dictionary.\n\nPortuguese dictionary dedicated to Carlos Melo, one Tough Mudder.
-EN-RO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-RO_enwiktionary.quickdic.v002.zip    1327450454240   4195425 -1      2       EN      17918   7831    RO      18832   15261   (EN)Wikitionary-based EN-RO dictionary.\n\nRomanian dictionary dedicated to Radu Teodorescu.
-EN-RU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-RU_enwiktionary.quickdic.v002.zip    1327450541799   13386017        -1      2       EN      37336   19159   RU      70351   28756   (EN)Wikitionary-based EN-RU dictionary.\n\nRussian dictionary dedicated to Maxim Aronin--best friend always!.
-EN-SA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SA_enwiktionary.quickdic.v002.zip    1327450733898   1530428 -1      2       EN      7959    428     SA      3672    224     (EN)Wikitionary-based EN-SA dictionary.\n\n
-EN-SK_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SK_enwiktionary.quickdic.v002.zip    1327450859336   1032783 -1      2       EN      7851    2853    SK      5082    3240    (EN)Wikitionary-based EN-SK dictionary.\n\n
-EN-SO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SO_enwiktionary.quickdic.v002.zip    1327450918497   30114   -1      2       EN      326     84      SO      169     100     (EN)Wikitionary-based EN-SO dictionary.\n\n
-EN-SQ_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SQ_enwiktionary.quickdic.v002.zip    1327445660276   834057  -1      2       EN      6172    2064    SQ      4127    2976    (EN)Wikitionary-based EN-SQ dictionary.\n\n
-EN-SR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SR_enwiktionary.quickdic.v002.zip    1327450797420   1365668 -1      2       EN      7964    3134    SR      9198    2952    (EN)Wikitionary-based EN-SR dictionary.\n\nSerbian dictionary dedicated to Filip Crnogorac--thanks for the honey.
-EN-SV_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SV_enwiktionary.quickdic.v002.zip    1327451340951   15554222        -1      2       EN      26571   10828   SV      98465   94852   (EN)Wikitionary-based EN-SV dictionary.\n\nSwedish dictionary dedicated to Kajsa Palmblad--björn kramar!
-EN-SW_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SW_enwiktionary.quickdic.v002.zip    1327451274937   1209656 -1      2       EN      7867    2460    SW      3528    3061    (EN)Wikitionary-based EN-SW dictionary.\n\n
-EN-TG_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TG_enwiktionary.quickdic.v002.zip    1327451535427   336046  -1      2       EN      2073    653     TG      1824    898     (EN)Wikitionary-based EN-TG dictionary.\n\n
-EN-TH_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TH_enwiktionary.quickdic.v002.zip    1327451591681   1423514 -1      2       EN      7722    2506    TH      8823    1280    (EN)Wikitionary-based EN-TH dictionary.\n\n
-EN-TL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TL_enwiktionary.quickdic.v002.zip    1327451476112   518434  -1      2       EN      4739    1110    TL      2791    1591    (EN)Wikitionary-based EN-TL dictionary.\n\n
-EN-TR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TR_enwiktionary.quickdic.v002.zip    1327451721096   3482725 -1      2       EN      15816   6828    TR      18075   14506   (EN)Wikitionary-based EN-TR dictionary.\n\n
-EN-UK_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-UK_enwiktionary.quickdic.v002.zip    1327451801430   1356376 -1      2       EN      7571    3108    UK      9559    3756    (EN)Wikitionary-based EN-UK dictionary.\n\n
-EN-UR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-UR_enwiktionary.quickdic.v002.zip    1327451878626   1037399 -1      2       EN      5959    1833    UR      5392    2525    (EN)Wikitionary-based EN-UR dictionary.\n\n
-EN-VI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-VI_enwiktionary.quickdic.v002.zip    1327451971896   1248647 -1      2       EN      9117    3189    VI      4777    2834    (EN)Wikitionary-based EN-VI dictionary.\n\n
-EN-YI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-YI_enwiktionary.quickdic.v002.zip    1327452101832   427067  -1      2       EN      2965    865     YI      2816    690     (EN)Wikitionary-based EN-YI dictionary.\n\n
-EN-ZH_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ZH_enwiktionary.quickdic.v002.zip    1327446342409   13406464        -1      2       EN      28298   11596   ZH      73573   48861   (EN)Wikitionary-based EN-ZH dictionary.\n\n
-EN-ZU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ZU_enwiktionary.quickdic.v002.zip    1327452165634   41734   -1      2       EN      485     132     ZU      225     117     (EN)Wikitionary-based EN-ZU dictionary.\n\n
-EN-haw_enwiktionary.quickdic   http://quickdic-dictionary.googlecode.com/files/EN-haw_enwiktionary.quickdic.v002.zip   1327447753530   232752  -1      2       EN      1800    436     haw     962     743     (EN)Wikitionary-based EN-haw dictionary.\n\n
+DE-EN_chemnitz_enwiktionary.quickdic   http://quickdic-dictionary.googlecode.com/files/DE-EN_chemnitz_enwiktionary.quickdic.v003.zip   1327937669357   50904504        18418694        2       DE      262859  144963  EN      119138  51756   German-English dictionary dedicated to my parents Bob and Judy Hughes, my German teachers, Suzanne Blount and Steven Sidore, my friends Max Haeberlin, Severin Obertuefer, and Ben Keck, and all my friends and students at Munich International School. Und Die Toten Hosen.\n\nGerman-English dictionary contains information from:\nde-en.txt - a German-English dictionary\nVersion: devel 2011-06-21\nSource: http://dict.tu-chemnitz.de/\nThanks to Frank Richter.\nAnd from:\n(EN)Wiktionary\n
+EN-AF_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-AF_enwiktionary.quickdic.v003.zip    1327904472379   533451  220766  2       EN      4885    1536    AF      2770    1764    (EN)Wikitionary-based EN-AF dictionary.\n\nAfrikaans dictionary dedicated to Heiko and Mariëtte Horn.
+EN-AR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-AR_enwiktionary.quickdic.v003.zip    1327904603133   4145391 1649947 2       EN      16620   7238    AR      24041   8408    (EN)Wikitionary-based EN-AR dictionary.\n\n
+EN-AZ_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-AZ_enwiktionary.quickdic.v003.zip    1327937185027   508491  192191  2       EN      3453    1164    AZ      2731    2230    (EN)Wikitionary-based EN-AZ dictionary.\n\n
+EN-BE_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BE_enwiktionary.quickdic.v003.zip    1327904755502   733225  302873  2       EN      4563    1979    BE      5452    2170    (EN)Wikitionary-based EN-BE dictionary.\n\n
+EN-BG_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BG_enwiktionary.quickdic.v003.zip    1327904893654   13072416        2856997 2       EN      19653   8265    BG      54884   44882   (EN)Wikitionary-based EN-BG dictionary.\n\n
+EN-BN_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BN_enwiktionary.quickdic.v003.zip    1327904802520   721956  269603  2       EN      4492    1375    BN      1890    180     (EN)Wikitionary-based EN-BN dictionary.\n\n
+EN-BO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BO_enwiktionary.quickdic.v003.zip    1327936783247   85302   33342   2       EN      781     154     BO      430     32      (EN)Wikitionary-based EN-BO dictionary.\n\n
+EN-BR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BR_enwiktionary.quickdic.v003.zip    1327937276250   469588  187308  2       EN      3684    1323    BR      2631    1293    (EN)Wikitionary-based EN-BR dictionary.\n\n
+EN-BS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-BS_enwiktionary.quickdic.v003.zip    1327904848907   535923  219673  2       EN      5009    1899    BS      2934    2202    (EN)Wikitionary-based EN-BS dictionary.\n\n
+EN-CA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-CA_enwiktionary.quickdic.v003.zip    1327904999015   10103475        2515177 2       EN      16899   7534    CA      55738   51125   (EN)Wikitionary-based EN-CA dictionary.\n\n
+EN-CI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-CI_enwiktionary.quickdic.v003.zip    1327937049190   768674  315555  2       EN      5932    2070    CI      3816    2450    (EN)Wikitionary-based EN-CI dictionary.\n\n
+EN-CS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-CS_enwiktionary.quickdic.v003.zip    1327905181442   5925889 2302196 2       EN      24380   12892   CS      23220   19096   (EN)Wikitionary-based EN-CS dictionary.\n\n
+EN-DA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-DA_enwiktionary.quickdic.v003.zip    1327905747520   5370560 1763518 2       EN      17491   6455    DA      30626   11082   (EN)Wikitionary-based EN-DA dictionary.\n\n
+EN-EL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-EL_enwiktionary.quickdic.v003.zip    1327906507330   12281757        3597501 2       EN      24499   9331    EL      49013   30430   (EN)Wikitionary-based EN-EL dictionary.\n\nGreek dictionary dedicated to Noah Egge.
+EN-EO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-EO_enwiktionary.quickdic.v003.zip    1327905926155   11942536        3333582 2       EN      17007   7399    EO      101750  99634   (EN)Wikitionary-based EN-EO dictionary.\n\n
+EN-ES_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ES_enwiktionary.quickdic.v003.zip    1327909822010   67298965        11069329        2       EN      37918   19856   ES      241760  225740  (EN)Wikitionary-based EN-ES dictionary.\n\nSpanish dictionary made especially for Carolina Tropini! <3 XoXoXXXXX!
+EN-ET_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ET_enwiktionary.quickdic.v003.zip    1327906023125   1499183 599581  2       EN      9927    3766    ET      7846    6209    (EN)Wikitionary-based EN-ET dictionary.\n\n
+EN-EU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-EU_enwiktionary.quickdic.v003.zip    1327937230554   544371  220351  2       EN      4584    1738    EU      2702    1939    (EN)Wikitionary-based EN-EU dictionary.\n\n
+EN-FA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-FA_enwiktionary.quickdic.v003.zip    1327908998938   2313266 918141  2       EN      11322   3743    FA      11660   5677    (EN)Wikitionary-based EN-FA dictionary.\n\n
+EN-FI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-FI_enwiktionary.quickdic.v003.zip    1327906073522   24872797        8336578 2       EN      51329   22753   FI      127495  103772  (EN)Wikitionary-based EN-FI dictionary.\n\n
+EN-FO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-FO_enwiktionary.quickdic.v003.zip    1327937366976   865789  351804  2       EN      6528    1176    FO      4289    4065    (EN)Wikitionary-based EN-FO dictionary.\n\n
+EN-FR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-FR_enwiktionary.quickdic.v003.zip    1327906251191   39021684        10380447        2       EN      44872   21787   FR      210540  41908   (EN)Wikitionary-based EN-FR dictionary.\n\n
+EN-GA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-GA_enwiktionary.quickdic.v003.zip    1327907056813   3857572 1301420 2       EN      14361   5355    GA      11085   6207    (EN)Wikitionary-based EN-GA dictionary.\n\n
+EN-GL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-GL_enwiktionary.quickdic.v003.zip    1327937414285   3181788 849500  2       EN      6089    1641    GL      19215   3527    (EN)Wikitionary-based EN-GL dictionary.\n\n
+EN-HE_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HE_enwiktionary.quickdic.v003.zip    1327906705085   3736342 1513945 2       EN      15720   5687    HE      18912   6445    (EN)Wikitionary-based EN-HE dictionary.\n\n
+EN-HI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HI_enwiktionary.quickdic.v003.zip    1327906779962   1633508 637601  2       EN      8583    3193    HI      5721    540     (EN)Wikitionary-based EN-HI dictionary.\n\n
+EN-HR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HR_enwiktionary.quickdic.v003.zip    1327905083274   12482323        3751520 2       EN      21338   6395    HR      49495   44334   (EN)Wikitionary-based EN-HR dictionary.\n\nCroatian dictionary dedicated to Ines Viskic and Miro Kresonja.
+EN-HT_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HT_enwiktionary.quickdic.v003.zip    1327937520849   210718  85736   2       EN      1899    555     HT      963     865     (EN)Wikitionary-based EN-HT dictionary.\n\n
+EN-HU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HU_enwiktionary.quickdic.v003.zip    1327906838694   6774018 2537694 2       EN      22755   9577    HU      36491   26658   (EN)Wikitionary-based EN-HU dictionary.\n\n
+EN-HY_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-HY_enwiktionary.quickdic.v003.zip    1327904680574   4699665 1739072 2       EN      16706   5902    HY      20715   11098   (EN)Wikitionary-based EN-HY dictionary.\n\n
+EN-ID_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ID_enwiktionary.quickdic.v003.zip    1327906999582   877267  357469  2       EN      6942    2376    ID      4498    2947    (EN)Wikitionary-based EN-ID dictionary.\n\n
+EN-IS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-IS_enwiktionary.quickdic.v003.zip    1327906928742   3607726 1451687 2       EN      16827   5069    IS      16735   12191   (EN)Wikitionary-based EN-IS dictionary.\n\n
+EN-IT_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-IT_enwiktionary.quickdic.v003.zip    1327907128704   67853414        18179132        2       EN      83058   16783   IT      459410  117893  (EN)Wikitionary-based EN-IT dictionary.\n\nItalian dictionary dedicated to Carolina Tropini, my favorite stardust in the whole universe!  Ti amo!
+EN-JA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-JA_enwiktionary.quickdic.v003.zip    1327908193238   14507841        5398018 2       EN      32267   12057   JA      75950   47196   (EN)Wikitionary-based EN-JA dictionary.\n\n
+EN-KA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-KA_enwiktionary.quickdic.v003.zip    1327937472137   1145898 442550  2       EN      6567    2456    KA      7510    3036    (EN)Wikitionary-based EN-KA dictionary.\n\n
+EN-KO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-KO_enwiktionary.quickdic.v003.zip    1327908546314   3856911 1625973 2       EN      18834   6743    KO      24355   11600   (EN)Wikitionary-based EN-KO dictionary.\n\nKorean dictionary dedicated to Ande Elwood--fall fashion und Fernsehturms!
+EN-KU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-KU_enwiktionary.quickdic.v003.zip    1327908644834   997400  388717  2       EN      5894    2282    KU      5512    2429    (EN)Wikitionary-based EN-KU dictionary.\n\n
+EN-LA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-LA_enwiktionary.quickdic.v003.zip    1327907607488   99947312        19044395        2       EN      22753   4753    LA      519181  117297  (EN)Wikitionary-based EN-LA dictionary.\n\n
+EN-LB_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-LB_enwiktionary.quickdic.v003.zip    1327937564852   943234  368642  2       EN      6318    1442    LB      4698    4071    (EN)Wikitionary-based EN-LB dictionary.\n\n
+EN-LT_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-LT_enwiktionary.quickdic.v003.zip    1327908125753   2998092 882651  2       EN      7988    2963    LT      18205   16476   (EN)Wikitionary-based EN-LT dictionary.\n\n
+EN-LV_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-LV_enwiktionary.quickdic.v003.zip    1327908066887   910741  358313  2       EN      6548    2751    LV      4720    3316    (EN)Wikitionary-based EN-LV dictionary.\n\n
+EN-MI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MI_enwiktionary.quickdic.v003.zip    1327908757313   125253  52590   2       EN      1322    348     MI      640     398     (EN)Wikitionary-based EN-MI dictionary.\n\n
+EN-MK_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MK_enwiktionary.quickdic.v003.zip    1327937611964   2375681 920096  2       EN      10951   4462    MK      16687   6783    (EN)Wikitionary-based EN-MK dictionary.\n\n
+EN-MN_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MN_enwiktionary.quickdic.v003.zip    1327908811166   305972  128687  2       EN      2258    886     MN      2311    743     (EN)Wikitionary-based EN-MN dictionary.\n\n
+EN-MR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MR_enwiktionary.quickdic.v003.zip    1327937321619   208205  83100   2       EN      1644    602     MR      982     98      (EN)Wikitionary-based EN-MR dictionary.\n\n
+EN-MS_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-MS_enwiktionary.quickdic.v003.zip    1327908702001   677188  272923  2       EN      5068    1846    MS      3504    1622    (EN)Wikitionary-based EN-MS dictionary.\n\n
+EN-NE_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-NE_enwiktionary.quickdic.v003.zip    1327908866138   57724   23227   2       EN      499     165     NE      314     17      (EN)Wikitionary-based EN-NE dictionary.\n\n
+EN-NL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-NL_enwiktionary.quickdic.v003.zip    1327905818024   13099030        4511767 2       EN      32341   14787   NL      65445   58089   (EN)Wikitionary-based EN-NL dictionary.\n\nDutch dictionary dedicated to Mike LeBeau.
+EN-NO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-NO_enwiktionary.quickdic.v003.zip    1327908921672   3860539 1416454 2       EN      16793   6629    NO      19449   16281   (EN)Wikitionary-based EN-NO dictionary.\n\n
+EN-PA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-PA_enwiktionary.quickdic.v003.zip    1327909269031   83404   33999   2       EN      749     223     PA      425     52      (EN)Wikitionary-based EN-PA dictionary.\n\n
+EN-PL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-PL_enwiktionary.quickdic.v003.zip    1327909070261   8411311 2563672 2       EN      22479   11281   PL      42171   18870   (EN)Wikitionary-based EN-PL dictionary.\n\n
+EN-PT_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-PT_enwiktionary.quickdic.v003.zip    1327909166895   10975314        2878560 2       EN      22088   11552   PT      50221   46055   (EN)Wikitionary-based EN-PT dictionary.\n\nPortuguese dictionary dedicated to Carlos Melo, one Tough Mudder.
+EN-RO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-RO_enwiktionary.quickdic.v003.zip    1327909325082   4202409 1564155 2       EN      17924   7831    RO      18845   15272   (EN)Wikitionary-based EN-RO dictionary.\n\nRomanian dictionary dedicated to Radu Teodorescu.
+EN-RU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-RU_enwiktionary.quickdic.v003.zip    1327909405908   13462814        5225809 2       EN      37337   19159   RU      71102   28914   (EN)Wikitionary-based EN-RU dictionary.\n\nRussian dictionary dedicated to Maxim Aronin--best friend always!.
+EN-SA_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SA_enwiktionary.quickdic.v003.zip    1327909567149   1531553 573373  2       EN      7962    428     SA      3672    224     (EN)Wikitionary-based EN-SA dictionary.\n\n
+EN-SK_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SK_enwiktionary.quickdic.v003.zip    1327909695753   1034490 423666  2       EN      7853    2853    SK      5084    3243    (EN)Wikitionary-based EN-SK dictionary.\n\n
+EN-SO_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SO_enwiktionary.quickdic.v003.zip    1327909757518   30702   12372   2       EN      328     84      SO      169     100     (EN)Wikitionary-based EN-SO dictionary.\n\n
+EN-SQ_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SQ_enwiktionary.quickdic.v003.zip    1327904537954   835554  330537  2       EN      6173    2064    SQ      4128    2976    (EN)Wikitionary-based EN-SQ dictionary.\n\n
+EN-SR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SR_enwiktionary.quickdic.v003.zip    1327909631938   1368813 523632  2       EN      7965    3134    SR      9232    2965    (EN)Wikitionary-based EN-SR dictionary.\n\nSerbian dictionary dedicated to Filip Crnogorac--thanks for the honey.
+EN-SV_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SV_enwiktionary.quickdic.v003.zip    1327910196587   15561874        4613053 2       EN      26573   10828   SV      98486   94868   (EN)Wikitionary-based EN-SV dictionary.\n\nSwedish dictionary dedicated to Kajsa Palmblad--björn kramar!
+EN-SW_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-SW_enwiktionary.quickdic.v003.zip    1327910120523   1210779 456669  2       EN      7869    2460    SW      3530    3063    (EN)Wikitionary-based EN-SW dictionary.\n\n
+EN-TG_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TG_enwiktionary.quickdic.v003.zip    1327910411558   336735  126336  2       EN      2075    653     TG      1825    899     (EN)Wikitionary-based EN-TG dictionary.\n\n
+EN-TH_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TH_enwiktionary.quickdic.v003.zip    1327910474670   1425455 576449  2       EN      7724    2506    TH      8824    1280    (EN)Wikitionary-based EN-TH dictionary.\n\n
+EN-TL_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TL_enwiktionary.quickdic.v003.zip    1327910342356   519615  217284  2       EN      4741    1110    TL      2797    1597    (EN)Wikitionary-based EN-TL dictionary.\n\n
+EN-TR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-TR_enwiktionary.quickdic.v003.zip    1327936830409   3490987 1315919 2       EN      15816   6828    TR      18163   14571   (EN)Wikitionary-based EN-TR dictionary.\n\n
+EN-UK_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-UK_enwiktionary.quickdic.v003.zip    1327936894505   1358996 550232  2       EN      7574    3108    UK      9570    3760    (EN)Wikitionary-based EN-UK dictionary.\n\n
+EN-UR_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-UR_enwiktionary.quickdic.v003.zip    1327936945925   1040629 413275  2       EN      5962    1833    UR      5403    2527    (EN)Wikitionary-based EN-UR dictionary.\n\n
+EN-VI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-VI_enwiktionary.quickdic.v003.zip    1327936995018   1252449 525233  2       EN      9119    3189    VI      4777    2834    (EN)Wikitionary-based EN-VI dictionary.\n\n
+EN-YI_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-YI_enwiktionary.quickdic.v003.zip    1327937095953   429027  174380  2       EN      2967    865     YI      2826    695     (EN)Wikitionary-based EN-YI dictionary.\n\n
+EN-ZH_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ZH_enwiktionary.quickdic.v003.zip    1327905258297   13464176        5093649 2       EN      28300   11596   ZH      74298   49599   (EN)Wikitionary-based EN-ZH dictionary.\n\n
+EN-ZU_enwiktionary.quickdic    http://quickdic-dictionary.googlecode.com/files/EN-ZU_enwiktionary.quickdic.v003.zip    1327937141689   42294   17628   2       EN      486     132     ZU      225     117     (EN)Wikitionary-based EN-ZU dictionary.\n\n
+EN-haw_enwiktionary.quickdic   http://quickdic-dictionary.googlecode.com/files/EN-haw_enwiktionary.quickdic.v003.zip   1327906652176   233740  85126   2       EN      1802    436     haw     962     743     (EN)Wikitionary-based EN-haw dictionary.\n\n
index 3813f6dbb679d165e4a9faf98ba5148fd736af4b..ac9362cad368669b754e092cd4920826ab92813c 100644 (file)
   This screen shows dictionary entries.  This is a massive list that you can
   scroll all the way through, or you can type in the search text to jump 
   there in the list.  Entries in the list are filed in multiple places,
-  under all relevant words.
+  under all the relevant words.
   <h3>Searching</h3>
   <ul>
-    <li> Type a single word to search for it (multi-word searches not yet supported).
+    <li> Type a single word to search for it.  QuickDic searches as you type, jumping to the relevant position in the list.
+    <li> (NEW) Type multiple words separated by spaces.  QuickDic finds all the rows containing all of the words and displays them.
     <li> QuickDic tries to sort words using a romanized transliteration, so you can try searching for non-Latin words using the Latin alphabet.
+    <li> If the search text box isn't focused, you can start typing and its contents will be replaced.
   </ul>
   <h3>Other</h3>
   <ul>
-    <li> If the search text box isn't focused, you can start typing and its contents will be replaced.
     <li> Click the button to the right of the search box to switch dictionary directions: EN-&gt;DE to DE-&gt;EN.
-    <li> Long-click the button to the right of the search box to pick a new dictionary.
-    <li> Long-click any entry to bring up the context menu.
+    <li> (NEW) Long-click the button to the right of the search box to pick a new dictionary.
+    <li> Long-click any entry to bring up the context menu, from which you can:
+    <ul>
+      <li> Add the current row to the wordList.txt file for later study.
+      <li> Copy the current row to the clipboard.
+      <li> (NEW) Long-click a particular word to jump to that word in the dictionary.
+    </ul>
     <!-- Long-click in the search text to open the search history. -->
   </ul>
 
index 7f3562ab1064514286611dd9ee133f2471284588..623bfdb6c6746d4856db5b2918fd509854720f02 100644 (file)
@@ -8,10 +8,10 @@
   Thanks for updating to QuickDic 3.1.
   <p> New features:
   <ul>
+    <li> Search for multiple words at once (separated by spaces).
     <li> Long-press any word in a dictionary to lookup that word.
-    <li> Long-press the search text to see search history. 
-    <li> Long-press the switch-language button to change dictionaries.
-    <li> New English dictionaries: Tagalog, Urdu. (based on enwiktionary.com data).
+    <li> Long-press the switch-language button to switch the current dictionary.
+    <li> New English dictionaries: Tagalog, Urdu. (from enwiktionary.com data).
     <li> All dictionaries updated (mostly with better formatting), and can be re-downloaded at your leisure (previously downloaded dictionaries will still work).
   </ul>
 </body>
similarity index 60%
rename from res/_values-de/strings.xml
rename to res/values-de/strings.xml
index 1854d92fa35602ca542fb1f0b03b36d29f942a8d..97f92faa06e6aab56d97f5e7e5b208e08f623052 100644 (file)
@@ -3,6 +3,12 @@
 
        <string name="app_name">QuickDic</string>
  
+  <!-- Global. -->
+  <string name="about">Über QuickDic…</string>
+  <string name="preferences">Einstellungen…</string>
+  <string name="help">Hilfe</string>
+  
+  
   <!-- DictionaryManagerActivity -->
   <string name="dictionaryManager">Wörterbuch-Liste</string>
   <string name="helpText">Long-drücken, um weitere Möglichkeiten zu sehen.</string>
   <string name="updateButton">Neuladen</string>
   <string name="moveToTop">Nach Anfang ziehen</string>
   <string name="deleteDictionary">Wörterbuch entfernen</string>
-  <string name="nameFormat2">%1$s (%2$s=%3$d, %4$s=%5$d Einträge)</string>
+  <string name="indexInfo">%1$s: %2$,d Wörter</string>
 
-  <string name="thanksForUpdatingVersion">3.1</string>
-  <!-- Don't use links in the text below, it crashes the app. -->
-  <string name="thanksForUpdating"><![CDATA[
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
-</head>
-<body>
-  Danke, da&szlig; Sie QuickDic 3.1 heruntergeladen haben.
-  <p> Neue Funktionen:
-  <ul>
-    <li> QuickDic ist Open-Source!
-    <li> Neue Einstellungen:
-    <ul>
-      <li> W&ouml;rterbuch Schriftgr&ouml;&szlig;e ist einstellbar.
-      <li> Kurze Klicks auf W&ouml;rterbucheintr&auml;ge &ouml;ffnen Kontextmen&uuml; nicht mehr standardm&auml;&szlig;ig.
-    </ul>
-    <li> 17 neue Englische W&ouml;rterb&uuml;cher: Albanian, Armenian, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Esperanto, Estonian, Hungarian, Indonesian, Latin, Latvian, Polish, Punjabi, Slovak, Swahili. (von enwiktionary.com).
-    <li> Alle W&ouml;rterb&uuml;cher sind updated (meist mit besseren Formatierung) und k&ouml;nnen wiederheruntergeladen werden (zuvor heruntergeladene W&ouml;rterb&uuml;cher wird immer noch funktionieren).
-  </ul>
-</body>
-</html> 
-]]>
-  </string>
-  <!-- DictionaryEditActivity -->
-  <string name="dictionaryName">Wörterbuch Name</string>
-  <string name="downloadUrl">Wörterbuch URL</string>
-  
-  <string name="openButton">Öffnen</string>
-  <string name="dictionaryInfo">Wörterbuch Info:</string>
-  <string name="localFile">Wörterbuch Datei</string>
-  <string name="wordListFile">Wortliste-Datei</string>
-  <string name="fileNotFound">Datei nicht gefunden: \'%s\'</string>
-  <string name="invalidDictionary">Ungültige Wörterbuch: file=%1$s, error=%2$s</string>
-  <string name="numPairEntries">Einträge: %,d</string>
+  <string name="thanksForUpdatingVersion">3.1_a</string>
 
-  <!-- Main -->
+  <!-- DictionaryActivity -->
   <string name="searchText">Suchtext</string>
-  <string name="downloadDictionary">Wörterbuch herunterladen…</string>
+  <string name="selectDictionary">Wörterbuch wählen…</string>
   <string name="switchToLanguage">Zu %s wechseln</string>
-  <string name="preferences">Einstellungen…</string>
-  <string name="about">Über QuickDic…</string>
   <string name="addToWordList">Zum Wortliste hinzufügen: %s</string>
   <string name="searchForSelection">Suche: %s</string>
   <string name="failedAddingToWordList">Fehler beim Hinzufügen zur Wortliste: %s</string>
   <string name="unzippingDictionary">Wörterbuch entpacken…</string>
   <string name="failedToUnzipDictionary">Fehler beim Entpackung der Wörterbuch…</string>
-
+  <string name="invalidDictionary">Invalid dictionary: file=%1$s, error=%2$s</string>
+  <string name="noSearchResults">Keine Treffe.</string>
+  <string name="aboutDictionary">Über Wörterbuch…</string> 
+  
+  
+  <!-- About dictionary. -->
+  <string name="dictionaryPath">Datei: %s</string> 
+  <string name="dictionarySize">Grosse: %,d bytes</string> 
+  <string name="dictionaryCreationTime">Hergestellt: %tc</string> 
+  <string name="indexName">Index: %s</string> 
+  <string name="mainTokenCount">Wortzahl: %,d</string> 
+  <string name="sources">Quellen</string> 
+  <string name="sourceInfo">%1$s : %2$,d Einträge</string> 
+  
+  
        <!-- About. -->
-       <string name="titleWithVersion">QuickDic 3.0.1</string>
-       <string name="thadHughes">Thad Hughes</string>
-       <string name="contactMe">
+  <string name="titleWithVersion">QuickDic 3.1</string>
+  <string name="thadHughes">Thad Hughes</string>
+  <string name="contactMe">
      Wenn Sie QuickDic benutzen, würde ich gerne von Ihnen hören.
      Leider kann ich keine Verantwortung für die Wörterbücher (außer Formatierung) nehmen, weil sie aus anderen Quellen erzeugt werden.
-     Bitte senden Sie Kommentare, Anregungen, Bug-Reports, oder einfach nur ein schnelles Hallo an:
+     Bitte senden Sie Kommentare, Anregungen, Bug-Reports, oder einfach nur ein kurzes Hallo an:
   </string>
-       <string name="myEmail" formatted="false">thad.hughes@gmail.com</string>
+  <string name="myEmail" formatted="false">thad.hughes@gmail.com</string>
   <string name="webPage">Weitere Informationen finden Sie unter:</string>
   <string name="webPageUrl">http://code.google.com/p/quickdic-dictionary/</string>
   
  
        <!-- Download. -->
   <string name="openingConnection">Verbindungsaufbau…</string>
-       <string name="downloading">Herunterladen: %1$,d von %2$,d Bytes.</string>
+  <string name="downloading">Herunterladen: %1$,d von %2$,d Bytes.</string>
   <string name="unzipping">Entpackung: %1$,d von %2$,d Bytes.</string>
-       <string name="downloadFinished">Fertig: %,d Bytes.</string>
-       <string name="errorDownloadingFile">"Fehler beim Herunterladen: \n%s"</string>
+  <string name="downloadFinished">Fertig: %,d Bytes.</string>
+  <string name="errorDownloadingFile">"Fehler beim Herunterladen: \n%s"</string>
 
        <!-- Preferences -->
        <string name="wordListFileKey">wordListFile</string>
index 17f0efd678cdd279430834d0992a2038c4d610e9..779d3b9cf1931606ce32133e8fa5fe593ace859c 100644 (file)
@@ -1,39 +1,31 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-       <string name="app_name">QuickDic</string>
+  <string name="app_name">QuickDic</string>
  
-  <!-- DictionaryManagerActivity -->
+  <!-- Global. -->
+  <string name="about">About QuickDic…</string> 
+  <string name="preferences">Preferences…</string>
+  <string name="help">Help</string>
+  
+  
+   <!-- DictionaryManagerActivity -->
   <string name="dictionaryManager">Dictionary manager</string>
   <string name="helpText">Long-press for more options.</string>
   <string name="downloadButton">Download (%.1fMB)</string>
   <string name="updateButton">Update (%.1fMB)</string>
   <string name="moveToTop">Move to top</string>
   <string name="deleteDictionary">Delete dictionary</string>
-  <string name="indexInfo">%1$s: %2$d words</string>
-  
+  <string name="indexInfo">%1$s: %2$,d words</string>
 
   <string name="thanksForUpdatingVersion">3.1_a</string>
-  <!-- DictionaryEditActivity -->
-  <!-- 
-  <string name="dictionaryName">Dictionary name</string>
-  <string name="downloadUrl">Dictionary download URL</string>
-  <string name="openButton">Open</string>
-  <string name="dictionaryInfo">Dictionary info:</string>
-  <string name="indexInfo">Index %1$s, %2$d words</string>
-  <string name="localFile">Dictionary file</string>
-  <string name="wordListFile">Word list file</string>
-  <string name="fileNotFound">File not found: \'%s\'</string>
-  <string name="numPairEntries">Entries: %,d</string>
- -->
+
   <!-- DictionaryActivity -->
   <string name="searchText">Search Text</string>
   <string name="selectDictionary">Select dictionary…</string>
   <string name="switchToLanguage">Switch to %s</string>
   <string name="addToWordList">Add to word list: %s</string>
-  <string name="searchForSelection">Search: "%s"</string>
+  <string name="searchForSelection">Search: %s</string>
   <string name="failedAddingToWordList">Failure adding to word list: %s</string>
   <string name="unzippingDictionary">Unzipping dictionary…</string>
   <string name="failedToUnzipDictionary">Failed to unzip dictionary…</string>
   <string name="noSearchResults">No search results.</string>
   <string name="aboutDictionary">About dictionary…</string> 
 
+
   <!-- About dictionary. -->
   <string name="dictionaryPath">File: %s</string> 
-  <string name="dictionarySize">Size: %d bytes</string> 
+  <string name="dictionarySize">Size: %,d bytes</string> 
   <string name="dictionaryCreationTime">Created: %tc</string> 
   <string name="indexName">Index: %s</string> 
-  <string name="mainTokenCount">Num words: %d</string> 
+  <string name="mainTokenCount">Word count: %,d</string> 
+  <string name="sources">Sources</string> 
+  <string name="sourceInfo">%1$s : %2$,d entries</string> 
   
+
   
        <!-- About. -->
-       <string name="titleWithVersion">QuickDic 3.1</string>
-       <string name="thadHughes">Thad Hughes</string>
-       <string name="contactMe">If you\'re using QuickDic, I\'d love to hear from you.  Unfortunately, I cannot take responsibility for dictionary content (other than formatting), as it is generated from other sources. Please send comments, suggestions, bug reports, or just a quick hello to:</string>
-       <string name="myEmail" formatted="false">thad.hughes@gmail.com</string>
+  <string name="titleWithVersion">QuickDic 3.1</string>
+  <string name="thadHughes">Thad Hughes</string>
+  <string name="contactMe">If you\'re using QuickDic, I\'d love to hear from you.
+  Unfortunately, I cannot take responsibility for dictionary content (other than formatting), as it is generated from other sources.
+  Please send comments, suggestions, bug reports, or just a quick hello to:</string>
+  <string name="myEmail" formatted="false">thad.hughes@gmail.com</string>
   <string name="webPage">For more information, see:</string>
   <string name="webPageUrl">http://code.google.com/p/quickdic-dictionary/</string>
   
   <string name="license">QuickDic contains code copyrighted by Google and released under the Apache 2.0 license.</string>
   <string name="licenseUrl">http://www.apache.org/licenses/LICENSE-2.0</string>
  
        <!-- Download. -->
   <string name="openingConnection">Opening connection…</string>
-       <string name="downloading">Downloading: %1$,d of %2$,d bytes.</string>
+  <string name="downloading">Downloading: %1$,d of %2$,d bytes.</string>
   <string name="unzipping">Unzipping: %1$,d of %2$,d bytes.</string>
-       <string name="downloadFinished">Finished: %,d bytes.</string>
-       <string name="errorDownloadingFile">Error downloading file: \n%s</string>
+  <string name="downloadFinished">Finished: %,d bytes.</string>
+  <string name="errorDownloadingFile">Error downloading file: \n%s</string>  
+
 
-  <!-- Global. -->
-  <string name="about">About QuickDic…</string> 
-  <string name="preferences">Preferences…</string>
-  <string name="help">Help</string>
-  
        <!-- Preferences -->
        <string name="wordListFileKey">wordListFile</string>
        <string name="wordListFileTitle">Word list file</string>
index 6d1b5d90ebcb52ee2032d4b7ab4feae455bd18d8..36fe64082ab18c52b924522f85abf4eafde935ed 100644 (file)
@@ -24,7 +24,7 @@ public final class AboutActivity extends Activity {
   /** Called when the activity is first created. */\r
   @Override\r
   public void onCreate(final Bundle savedInstanceState) {\r
-    //TODO((DictionaryApplication)getApplication()).applyTheme(this);\r
+    setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);\r
 \r
     super.onCreate(savedInstanceState);\r
     setContentView(R.layout.about_activity);\r
index f79b13f49a8558c67cf4ef106fc507dc979d46ef..c8753a793d94ce9afcad858c4782c85164e757d1 100644 (file)
@@ -56,13 +56,13 @@ import android.view.ContextMenu.ContextMenuInfo;
 import android.view.KeyEvent;\r
 import android.view.Menu;\r
 import android.view.MenuItem;\r
-import android.view.WindowManager;\r
 import android.view.MenuItem.OnMenuItemClickListener;\r
 import android.view.MotionEvent;\r
 import android.view.View;\r
 import android.view.View.OnClickListener;\r
 import android.view.View.OnLongClickListener;\r
 import android.view.ViewGroup;\r
+import android.view.WindowManager;\r
 import android.view.inputmethod.InputMethodManager;\r
 import android.widget.AdapterView;\r
 import android.widget.AdapterView.AdapterContextMenuInfo;\r
@@ -79,8 +79,10 @@ import android.widget.Toast;
 \r
 import com.hughes.android.dictionary.DictionaryInfo.IndexInfo;\r
 import com.hughes.android.dictionary.engine.Dictionary;\r
+import com.hughes.android.dictionary.engine.EntrySource;\r
 import com.hughes.android.dictionary.engine.Index;\r
 import com.hughes.android.dictionary.engine.PairEntry;\r
+import com.hughes.android.dictionary.engine.Index.IndexEntry;\r
 import com.hughes.android.dictionary.engine.PairEntry.Pair;\r
 import com.hughes.android.dictionary.engine.RowBase;\r
 import com.hughes.android.dictionary.engine.TokenRow;\r
@@ -91,7 +93,9 @@ import com.hughes.android.util.NonLinkClickableSpan;
 public class DictionaryActivity extends ListActivity {\r
 \r
   static final String LOG = "QuickDic";\r
-  \r
+\r
+  private String initialSearchText;\r
+\r
   DictionaryApplication application;\r
   File dictFile = null;\r
   RandomAccessFile dictRaf = null;\r
@@ -125,6 +129,7 @@ public class DictionaryActivity extends ListActivity {
   \r
   final SearchTextWatcher searchTextWatcher = new SearchTextWatcher();\r
 \r
+\r
   public DictionaryActivity() {\r
   }\r
   \r
@@ -140,17 +145,21 @@ public class DictionaryActivity extends ListActivity {
   @Override\r
   protected void onSaveInstanceState(final Bundle outState) {\r
     super.onSaveInstanceState(outState);\r
+    Log.d(LOG, "onSaveInstanceState: " + searchText.getText().toString());\r
     outState.putString(C.SEARCH_TOKEN, searchText.getText().toString());\r
   }\r
 \r
   @Override\r
   protected void onRestoreInstanceState(final Bundle outState) {\r
     super.onRestoreInstanceState(outState);\r
-    setSearchText(outState.getString(C.SEARCH_TOKEN));\r
+    Log.d(LOG, "onRestoreInstanceState: " + outState.getString(C.SEARCH_TOKEN));\r
+    initialSearchText = outState.getString(C.SEARCH_TOKEN);\r
   }\r
 \r
   @Override\r
-  public void onCreate(Bundle savedInstanceState) {    \r
+  public void onCreate(Bundle savedInstanceState) { \r
+    setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);\r
+\r
     Log.d(LOG, "onCreate:" + this);\r
     super.onCreate(savedInstanceState);\r
 \r
@@ -323,6 +332,9 @@ public class DictionaryActivity extends ListActivity {
       finish();\r
       startActivity(getIntent());\r
     }\r
+    if (initialSearchText != null) {\r
+      setSearchText(initialSearchText);\r
+    }\r
   }\r
   \r
   @Override\r
@@ -395,7 +407,13 @@ public class DictionaryActivity extends ListActivity {
   }\r
   \r
   void updateLangButton() {\r
-    langButton.setText(index.shortName);\r
+//    final LanguageResources languageResources = Language.isoCodeToResources.get(index.shortName);\r
+//    if (languageResources != null && languageResources.flagId != 0) {\r
+//      langButton.setCompoundDrawablesWithIntrinsicBounds(0, 0, languageResources.flagId, 0);\r
+//    } else {\r
+//      langButton.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\r
+      langButton.setText(index.shortName);\r
+//    }\r
   }\r
 \r
   void onLanguageButton() {\r
@@ -418,15 +436,10 @@ public class DictionaryActivity extends ListActivity {
       public View getView(int position, View convertView, ViewGroup parent) {\r
         final LinearLayout result = new LinearLayout(parent.getContext());\r
         final DictionaryInfo dictionaryInfo = getItem(position);\r
-        for (int i = 0; i < dictionaryInfo.indexInfos.size(); ++i) {\r
-          final IndexInfo indexInfo = dictionaryInfo.indexInfos.get(i);\r
           final Button button = new Button(parent.getContext());\r
-          String name = application.getLanguageName(indexInfo.shortName);\r
-          if (name == null) {\r
-            name = indexInfo.shortName;\r
-          }\r
+          final String name = application.getDictionaryName(dictionaryInfo.uncompressedFilename);\r
           button.setText(name);\r
-          final IntentLauncher intentLauncher = new IntentLauncher(parent.getContext(), getLaunchIntent(application.getPath(dictionaryInfo.uncompressedFilename), i, "")) {\r
+          final IntentLauncher intentLauncher = new IntentLauncher(parent.getContext(), getLaunchIntent(application.getPath(dictionaryInfo.uncompressedFilename), 0, "")) {\r
             @Override\r
             protected void onGo() {\r
               dialog.dismiss();\r
@@ -441,7 +454,6 @@ public class DictionaryActivity extends ListActivity {
           button.setLayoutParams(layoutParams);\r
 \r
           result.addView(button);\r
-        }\r
         return result;\r
       }\r
       \r
@@ -536,7 +548,8 @@ public class DictionaryActivity extends ListActivity {
           dialog.setTitle(name);\r
           \r
           final StringBuilder builder = new StringBuilder();\r
-          final DictionaryInfo dictionaryInfo = Dictionary.getDictionaryInfo(dictFile);\r
+          final DictionaryInfo dictionaryInfo = dictionary.getDictionaryInfo();\r
+          dictionaryInfo.uncompressedBytes = dictFile.length();\r
           if (dictionaryInfo != null) {\r
             builder.append(dictionaryInfo.dictInfo).append("\n\n");\r
             builder.append(getString(R.string.dictionaryPath, dictFile.getPath())).append("\n");\r
@@ -547,6 +560,11 @@ public class DictionaryActivity extends ListActivity {
               builder.append(getString(R.string.indexName, indexInfo.shortName)).append("\n");\r
               builder.append(getString(R.string.mainTokenCount, indexInfo.mainTokenCount)).append("\n");\r
             }\r
+            builder.append("\n");\r
+            builder.append(getString(R.string.sources)).append("\n");\r
+            for (final EntrySource source : dictionary.sources) {\r
+              builder.append(getString(R.string.sourceInfo, source.getName(), source.getNumEntries())).append("\n");\r
+            }\r
           } else {\r
             builder.append(getString(R.string.invalidDictionary));\r
           }\r
@@ -597,8 +615,21 @@ public class DictionaryActivity extends ListActivity {
       final MenuItem searchForSelection = menu.add(getString(R.string.searchForSelection, selectedSpannableText));\r
       searchForSelection.setOnMenuItemClickListener(new OnMenuItemClickListener() {\r
         public boolean onMenuItemClick(MenuItem item) {\r
-          if (indexIndex != selectedSpannableIndex) {\r
-            changeIndex(selectedSpannableIndex);\r
+          int indexToUse = -1;\r
+          for (int i = 0; i < dictionary.indices.size(); ++i) {\r
+            final Index index = dictionary.indices.get(i);\r
+            final IndexEntry indexEntry = index.findExact(selectedText); \r
+            final TokenRow tokenRow = index.rows.get(indexEntry.startRow).getTokenRow(false);\r
+            if (tokenRow != null && tokenRow.hasMainEntry) {\r
+              indexToUse = i;\r
+              break;\r
+            }\r
+          }\r
+          if (indexToUse == -1) {\r
+            indexToUse = selectedSpannableIndex;\r
+          }\r
+          if (indexIndex != indexToUse) {\r
+            changeIndex(indexToUse);\r
           }\r
           setSearchText(selectedText);\r
           return false;\r
@@ -691,7 +722,10 @@ public class DictionaryActivity extends ListActivity {
     searchText.setText(text);\r
     searchText.requestFocus();\r
     onSearchTextChange(searchText.getText().toString());\r
-    Selection.moveToRightEdge(searchText.getText(), searchText.getLayout());\r
+    if (searchText.getLayout() != null) {\r
+      // Surprising, but this can crash when you rotate...\r
+      Selection.moveToRightEdge(searchText.getText(), searchText.getLayout());\r
+    }\r
   }\r
 \r
 \r
index eb201c36b1161248039b88fc9b0bdd830002653b..fc80df6d854a5d6d74f51003ded40933906bb2ad 100644 (file)
@@ -159,8 +159,8 @@ public class DictionaryApplication extends Application {
   }
   
   public String getLanguageName(final String isoCode) {
-    final Integer langCode = Language.isoCodeToResourceId.get(isoCode);
-    final String lang = langCode != null ? getApplicationContext().getString(langCode) : isoCode;
+    final Language.LanguageResources languageResources = Language.isoCodeToResources.get(isoCode); 
+    final String lang = languageResources != null ? getApplicationContext().getString(languageResources.nameId) : isoCode;
     return lang;
   }
 
index f055b8ebf4fbebe732c0eeda9505baa579d8525b..44d764165e0395f2b8d4648fcb31b3614c9ae50e 100644 (file)
@@ -65,6 +65,8 @@ public class DictionaryManagerActivity extends ListActivity {
   }
   
   public void onCreate(Bundle savedInstanceState) {
+    setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);
+
     super.onCreate(savedInstanceState);
     Log.d(LOG, "onCreate:" + this);
     
index 513340fc4cd0e7b5c1eac53827a749ef68b0bc23..1bcd85aaebf875d95de4f2566afa1148510b31b9 100644 (file)
@@ -64,7 +64,7 @@ public class DownloadActivity extends Activity {
   /** Called when the activity is first created. */\r
   @Override\r
   public void onCreate(final Bundle savedInstanceState) {\r
-    //((DictionaryApplication)getApplication()).applyTheme(this);\r
+    setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);\r
 \r
     super.onCreate(savedInstanceState);\r
     final Intent intent = getIntent();\r
index 0f424c9e7488752e6287cd6183f3df383e2981ce..e4f3de61724e7e49cd33a061bcd84b1151a1020a 100644 (file)
@@ -32,6 +32,8 @@ public final class HelpActivity extends Activity {
   /** Called when the activity is first created. */\r
   @Override\r
   public void onCreate(final Bundle savedInstanceState) {\r
+    setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);\r
+\r
     super.onCreate(savedInstanceState);\r
     setContentView(R.layout.help_activity);\r
     final String html = StringUtil.readToString(getResources().openRawResource(R.raw.help));\r
index b935d31854c6f0ae881e29a1c805011e91e91e57..96a1b7d1c6cc12ae62e597e1d7d7a1b02b7814af 100644 (file)
@@ -22,7 +22,7 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
   \r
   @Override\r
   public void onCreate(Bundle savedInstanceState) {\r
-    //((DictionaryApplication)getApplication()).applyTheme(this);\r
+    setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);\r
 \r
     super.onCreate(savedInstanceState);\r
     addPreferencesFromResource(R.xml.preferences);\r
index 091138088ebfe27db0fc4b2c338597236da4d20b..b74d80b8d2da395377972cb32214dd15caca944c 100644 (file)
@@ -38,6 +38,17 @@ public class EntrySource extends IndexedObject implements Serializable {
   public String toString() {
     return name;
   }
+  
+  
+
+
+  public int getNumEntries() {
+    return numEntries;
+  }
+
+  public String getName() {
+    return name;
+  }
 
 
   public static final class Serializer implements RAFListSerializer<EntrySource> {
index 3c772a1fa60dd65c01eba0226d1281ed17628889..1151b099d37f8680a40e9fc56508918f92f91cd1 100644 (file)
@@ -24,6 +24,8 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.EnumMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
@@ -33,7 +35,9 @@ import java.util.regex.Pattern;
 
 import com.hughes.android.dictionary.DictionaryInfo;
 import com.hughes.android.dictionary.DictionaryInfo.IndexInfo;
+import com.hughes.android.dictionary.engine.RowBase.RowKey;
 import com.hughes.util.CachingList;
+import com.hughes.util.TransformingList;
 import com.hughes.util.raf.RAFList;
 import com.hughes.util.raf.RAFSerializable;
 import com.hughes.util.raf.RAFSerializer;
@@ -89,6 +93,9 @@ public final class Index implements RAFSerializable<Index> {
     normalizer = null;
   }
   
+  /**
+   * Deferred initialization because it can be slow.
+   */
   public synchronized Transliterator normalizer() {
     if (normalizer == null) {
       normalizer = Transliterator.createFromRules("", normalizerRules, Transliterator.FORWARD);
@@ -96,6 +103,13 @@ public final class Index implements RAFSerializable<Index> {
     return normalizer;
   }
   
+  /**
+   * Note that using this comparator probably involves doing too many text normalizations.
+   */
+  public NormalizeComparator getSortComparator() {
+    return new NormalizeComparator(normalizer(), sortLanguage.getCollator());
+  }
+  
   public Index(final Dictionary dict, final RandomAccessFile raf) throws IOException {
     this.dict = dict;
     shortName = raf.readUTF();
@@ -144,7 +158,7 @@ public final class Index implements RAFSerializable<Index> {
     public final String token;
     private final String normalizedToken;
     public final int startRow;
-    public final int numRows;
+    public final int numRows;  // doesn't count the token row!
     
     
     static final RAFSerializer<IndexEntry> SERIALIZER = new RAFSerializer<IndexEntry> () {
@@ -194,6 +208,21 @@ public final class Index implements RAFSerializable<Index> {
     }
   }
   
+  static final TransformingList.Transformer<IndexEntry, String> INDEX_ENTRY_TO_TOKEN = new TransformingList.Transformer<IndexEntry, String>() {
+    @Override
+    public String transform(IndexEntry t1) {
+      return t1.token;
+    }
+  };
+  
+  public IndexEntry findExact(final String exactToken) {
+    final int result = Collections.binarySearch(TransformingList.create(sortedIndexEntries, INDEX_ENTRY_TO_TOKEN), exactToken, getSortComparator());
+    if (result >= 0) {
+      return sortedIndexEntries.get(result);
+    }
+    return null;
+  }
+  
   public IndexEntry findInsertionPoint(String token, final AtomicBoolean interrupted) {
     final int index = findInsertionPointIndex(token, interrupted);
     return index != -1 ? sortedIndexEntries.get(index) : null;
@@ -246,20 +275,62 @@ public final class Index implements RAFSerializable<Index> {
     return new DictionaryInfo.IndexInfo(shortName, sortedIndexEntries.size(), mainTokenCount);
   }
   
+  private static final int MAX_SEARCH_ROWS = 1000;
+  
+  private final Map<String,Integer> prefixToNumRows = new LinkedHashMap<String, Integer>();
+  private synchronized final int getUpperBoundOnRowsStartingWith(final String normalizedPrefix, final int maxRows, final AtomicBoolean interrupted) {
+    final Integer numRows = prefixToNumRows.get(normalizedPrefix);
+    if (numRows != null) {
+      return numRows;
+    }
+    final int insertionPointIndex = findInsertionPointIndex(normalizedPrefix, interrupted);
+  
+    int rowCount = 0;
+    for (int index = insertionPointIndex; index < sortedIndexEntries.size(); ++index) {
+      if (interrupted.get()) { return -1; }
+      final IndexEntry indexEntry = sortedIndexEntries.get(index);
+      if (!indexEntry.normalizedToken.startsWith(normalizedPrefix)) {
+        break;
+      }
+      rowCount += indexEntry.numRows;
+      if (rowCount > maxRows) {
+        System.out.println("Giving up, too many words with prefix: " + normalizedPrefix);
+        break;
+      }
+    }
+    prefixToNumRows.put(normalizedPrefix, numRows);
+    return rowCount;
+  }
+  
+  
   public final List<RowBase> multiWordSearch(final List<String> searchTokens, final AtomicBoolean interrupted) {
+    final long startMills = System.currentTimeMillis();
     final List<RowBase> result = new ArrayList<RowBase>();
     
     final Set<String> normalizedNonStoplist = new LinkedHashSet<String>();
     
+    String bestPrefix = null;
+    int leastRows = Integer.MAX_VALUE;
     final StringBuilder regex = new StringBuilder();
     for (int i = 0; i < searchTokens.size(); ++i) {
+      if (interrupted.get()) { return null; }
       final String searchToken = searchTokens.get(i);
       final String normalized = normalizeToken(searchTokens.get(i));
       // Normalize them all.
       searchTokens.set(i, normalized);
 
       if (!stoplist.contains(searchToken)) {
-        normalizedNonStoplist.add(normalized);
+        if (normalizedNonStoplist.add(normalized)) {
+          final int numRows = getUpperBoundOnRowsStartingWith(normalized, MAX_SEARCH_ROWS, interrupted);
+          if (numRows != -1 && numRows < leastRows) {
+            if (numRows == 0) {
+              // We really are done here.
+              return Collections.emptyList();
+            }
+            leastRows = numRows;
+            bestPrefix = normalized;
+          }
+        }
       }
 
       if (regex.length() > 0) {
@@ -269,8 +340,13 @@ public final class Index implements RAFSerializable<Index> {
     }
     final Pattern pattern = Pattern.compile(regex.toString());
     
+    if (bestPrefix == null) {
+      bestPrefix = searchTokens.get(0);
+      System.out.println("Everything was in the stoplist!");
+    }
+    System.out.println("Searching using prefix: " + bestPrefix + ", leastRows=" + leastRows + ", searchTokens=" + searchTokens);
 
-    // The things that match.
+    // Place to store the things that match.
     final Map<RowMatchType,List<RowBase>> matches = new EnumMap<RowMatchType, List<RowBase>>(RowMatchType.class);
     for (final RowMatchType rowMatchType : RowMatchType.values()) {
       if (rowMatchType != RowMatchType.NO_MATCH) {
@@ -278,65 +354,42 @@ public final class Index implements RAFSerializable<Index> {
       }
     }
     
-    int bestRowCount = Integer.MAX_VALUE;
-    String bestToken = null;
-    for (final String searchToken : normalizedNonStoplist) {
-      final int insertionPointIndex = findInsertionPointIndex(searchToken, interrupted);
-      if (interrupted.get()) { return null; }
-      if (insertionPointIndex == -1) {
-        // If we've typed "train statio", don't fail just because the index
-        // doesn't contain "statio".
-        continue;
-      }
-
-      int rowCount = 0;
-      for (int index = insertionPointIndex; index < sortedIndexEntries.size(); ++index) {
-        if (interrupted.get()) { return null; }
-        final IndexEntry indexEntry = sortedIndexEntries.get(index);
-        if (!indexEntry.normalizedToken.equals(searchToken)) {
-          break;
-        }
-        rowCount += indexEntry.numRows;
-      }
-      
-      //System.out.println(searchToken + ", rowCount=" + rowCount);
-      if (rowCount < bestRowCount) {
-        bestRowCount = rowCount;
-        bestToken = searchToken;
-      }
-    }
-    
-    final String searchToken = bestToken != null ? bestToken : searchTokens.get(0);
+    int matchCount = 0;
+    final Set<RowKey> cachedRowKeys = new HashSet<RowBase.RowKey>();
     
 //    for (final String searchToken : searchTokens) {
+    final String searchToken = bestPrefix;
     
     final int insertionPointIndex = findInsertionPointIndex(searchToken, interrupted);
-    if (interrupted.get()) { return null; }
-
-      
-//      System.out.println("Searching token: " + searchToken);
 
-  
-      for (int index = insertionPointIndex; index < sortedIndexEntries.size(); ++index) {
+    for (int index = insertionPointIndex; index < sortedIndexEntries.size() && matchCount < MAX_SEARCH_ROWS; ++index) {
         if (interrupted.get()) { return null; }
         final IndexEntry indexEntry = sortedIndexEntries.get(index);
-        if (!indexEntry.normalizedToken.equals(searchToken)) {
+        if (!indexEntry.normalizedToken.startsWith(searchToken)) {
           break;
         }
 
 //        System.out.println("Searching indexEntry: " + indexEntry.token);
 
-        for (int rowIndex = indexEntry.startRow; rowIndex < indexEntry.startRow + indexEntry.numRows; ++rowIndex) {
+        // Extra +1 to skip token row.
+        for (int rowIndex = indexEntry.startRow + 1; rowIndex < indexEntry.startRow + 1 + indexEntry.numRows && rowIndex < rows.size(); ++rowIndex) {
           if (interrupted.get()) { return null; }
           final RowBase row = rows.get(rowIndex);
+          final RowBase.RowKey rowKey = row.getRowKey();
+          if (cachedRowKeys.contains(rowKey)) {
+            continue;
+          }
+          cachedRowKeys.add(rowKey);
           final RowMatchType matchType = row.matches(searchTokens, pattern, normalizer(), swapPairEntries);
           if (matchType != RowMatchType.NO_MATCH) {
             matches.get(matchType).add(row);
+            ++matchCount;
           }
         }
       }
 //    }  // searchTokens
-  
+
+    // Sort them into a reasonable order.
     final RowBase.LengthComparator lengthComparator = new RowBase.LengthComparator(swapPairEntries);
     for (final Collection<RowBase> rows : matches.values()) {
       final List<RowBase> ordered = new ArrayList<RowBase>(rows);
@@ -344,6 +397,7 @@ public final class Index implements RAFSerializable<Index> {
       result.addAll(ordered);
     }
     
+    System.out.println("searchDuration: " + (System.currentTimeMillis() - startMills));
     return result;
   }
   
index c8c7938ce951b566ced1f45e478382d0de57cf36..144366d9449fb4611019ea090b736abeca7b7561 100644 (file)
@@ -24,87 +24,103 @@ import com.hughes.android.dictionary.R;
 import com.ibm.icu.text.Collator;\r
 \r
 public class Language {\r
+  \r
+  public static final class LanguageResources {\r
+    public final String englishName;\r
+    public final int nameId;\r
+    public final int flagId;\r
+    \r
+    private LanguageResources(final String englishName, int nameId, int flagId) {\r
+      this.englishName = englishName;\r
+      this.nameId = nameId;\r
+      this.flagId = flagId;\r
+    }\r
+\r
+    private LanguageResources(final String englishName, int nameId) {\r
+      this(englishName, nameId, 0);\r
+    }\r
+}\r
 \r
-  public static final Map<String,Integer> isoCodeToResourceId = new LinkedHashMap<String,Integer>();\r
+  public static final Map<String,LanguageResources> isoCodeToResources = new LinkedHashMap<String,LanguageResources>();\r
   static {\r
-    isoCodeToResourceId.put("AF", R.string.AF);\r
-    isoCodeToResourceId.put("SQ", R.string.SQ);\r
-    isoCodeToResourceId.put("AR", R.string.AR);\r
-    isoCodeToResourceId.put("HY", R.string.HY);\r
-    isoCodeToResourceId.put("BE", R.string.BE);\r
-    isoCodeToResourceId.put("BN", R.string.BN);\r
-    isoCodeToResourceId.put("BS", R.string.BS);\r
-    isoCodeToResourceId.put("BG", R.string.BG);\r
-    isoCodeToResourceId.put("CA", R.string.CA);\r
-    isoCodeToResourceId.put("HR", R.string.HR);\r
-    isoCodeToResourceId.put("CS", R.string.CS);\r
-    isoCodeToResourceId.put("ZH", R.string.ZH);\r
-    isoCodeToResourceId.put("DA", R.string.DA);\r
-    isoCodeToResourceId.put("NL", R.string.NL);\r
-    isoCodeToResourceId.put("EN", R.string.EN);\r
-    isoCodeToResourceId.put("EO", R.string.EO);\r
-    isoCodeToResourceId.put("ET", R.string.ET);\r
-    isoCodeToResourceId.put("FI", R.string.FI);\r
-    isoCodeToResourceId.put("FR", R.string.FR);\r
-    isoCodeToResourceId.put("DE", R.string.DE);\r
-    isoCodeToResourceId.put("EL", R.string.EL);\r
-    isoCodeToResourceId.put("haw", R.string.haw);\r
-    isoCodeToResourceId.put("HE", R.string.HE);\r
-    isoCodeToResourceId.put("HI", R.string.HI);\r
-    isoCodeToResourceId.put("HU", R.string.HU);\r
-    isoCodeToResourceId.put("IS", R.string.IS);\r
-    isoCodeToResourceId.put("ID", R.string.ID);\r
-    isoCodeToResourceId.put("GA", R.string.GA);\r
-    isoCodeToResourceId.put("IT", R.string.IT);\r
-    isoCodeToResourceId.put("LA", R.string.LA);\r
-    isoCodeToResourceId.put("LV", R.string.LV);\r
-    isoCodeToResourceId.put("LT", R.string.LT);\r
-    isoCodeToResourceId.put("JA", R.string.JA);\r
-    isoCodeToResourceId.put("KO", R.string.KO);\r
-    isoCodeToResourceId.put("KU", R.string.KU);\r
-    isoCodeToResourceId.put("MS", R.string.MS);\r
-    isoCodeToResourceId.put("MI", R.string.MI);\r
-    isoCodeToResourceId.put("MN", R.string.MN);\r
-    isoCodeToResourceId.put("NE", R.string.NE);\r
-    isoCodeToResourceId.put("NO", R.string.NO);\r
-    isoCodeToResourceId.put("FA", R.string.FA);\r
-    isoCodeToResourceId.put("PL", R.string.PL);\r
-    isoCodeToResourceId.put("PT", R.string.PT);\r
-    isoCodeToResourceId.put("PA", R.string.PA);\r
-    isoCodeToResourceId.put("RO", R.string.RO);\r
-    isoCodeToResourceId.put("RU", R.string.RU);\r
-    isoCodeToResourceId.put("SA", R.string.SA);\r
-    isoCodeToResourceId.put("SR", R.string.SR);\r
-    isoCodeToResourceId.put("SK", R.string.SK);\r
-    isoCodeToResourceId.put("SO", R.string.SO);\r
-    isoCodeToResourceId.put("ES", R.string.ES);\r
-    isoCodeToResourceId.put("SW", R.string.SW);\r
-    isoCodeToResourceId.put("SV", R.string.SV);\r
-    isoCodeToResourceId.put("TL", R.string.TL);\r
-    isoCodeToResourceId.put("TG", R.string.TG);\r
-    isoCodeToResourceId.put("TH", R.string.TH);\r
-    isoCodeToResourceId.put("BO", R.string.BO);\r
-    isoCodeToResourceId.put("TR", R.string.TR);\r
-    isoCodeToResourceId.put("UK", R.string.UK);\r
-    isoCodeToResourceId.put("UR", R.string.UR);\r
-    isoCodeToResourceId.put("VI", R.string.VI);\r
-    isoCodeToResourceId.put("CI", R.string.CI);\r
-    isoCodeToResourceId.put("YI", R.string.YI);\r
-    isoCodeToResourceId.put("ZU", R.string.ZU);\r
-\r
-    isoCodeToResourceId.put("AZ", R.string.AZ);\r
-    isoCodeToResourceId.put("EU", R.string.EU);\r
-    isoCodeToResourceId.put("BR", R.string.BR);\r
-    isoCodeToResourceId.put("MR", R.string.MR);\r
-    isoCodeToResourceId.put("FO", R.string.FO);\r
-    isoCodeToResourceId.put("GL", R.string.GL);\r
-    isoCodeToResourceId.put("HT", R.string.HT);\r
-    isoCodeToResourceId.put("LB", R.string.LB);\r
-    isoCodeToResourceId.put("MK", R.string.MK);\r
+    isoCodeToResources.put("AF", new LanguageResources("Afrikaans", R.string.AF));\r
+    isoCodeToResources.put("SQ", new LanguageResources("Albanian", R.string.SQ));\r
+    isoCodeToResources.put("AR", new LanguageResources("Arabic", R.string.AR));\r
+    isoCodeToResources.put("HY", new LanguageResources("Armenian", R.string.HY));\r
+    isoCodeToResources.put("BE", new LanguageResources("Belarusian", R.string.BE));\r
+    isoCodeToResources.put("BN", new LanguageResources("Bengali", R.string.BN));\r
+    isoCodeToResources.put("BS", new LanguageResources("Bosnian", R.string.BS));\r
+    isoCodeToResources.put("BG", new LanguageResources("Bulgarian", R.string.BG));\r
+    isoCodeToResources.put("CA", new LanguageResources("Catalan", R.string.CA));\r
+    isoCodeToResources.put("HR", new LanguageResources("Croatian", R.string.HR));\r
+    isoCodeToResources.put("CS", new LanguageResources("Czech", R.string.CS));\r
+    isoCodeToResources.put("ZH", new LanguageResources("Chinese", R.string.ZH));\r
+    isoCodeToResources.put("DA", new LanguageResources("Danish", R.string.DA));\r
+    isoCodeToResources.put("NL", new LanguageResources("Dutch", R.string.NL));\r
+    isoCodeToResources.put("EN", new LanguageResources("English", R.string.EN));\r
+    isoCodeToResources.put("EO", new LanguageResources("Esperanto", R.string.EO));\r
+    isoCodeToResources.put("ET", new LanguageResources("Estonian", R.string.ET));\r
+    isoCodeToResources.put("FI", new LanguageResources("Finnish", R.string.FI));\r
+    isoCodeToResources.put("FR", new LanguageResources("French", R.string.FR));\r
+    isoCodeToResources.put("DE", new LanguageResources("German", R.string.DE));\r
+    isoCodeToResources.put("EL", new LanguageResources("Greek", R.string.EL));\r
+    isoCodeToResources.put("haw", new LanguageResources("Hawaiian", R.string.haw));\r
+    isoCodeToResources.put("HE", new LanguageResources("Hebrew", R.string.HE));\r
+    isoCodeToResources.put("HI", new LanguageResources("Hindi", R.string.HI));\r
+    isoCodeToResources.put("HU", new LanguageResources("Hungarian", R.string.HU));\r
+    isoCodeToResources.put("IS", new LanguageResources("Icelandic", R.string.IS));\r
+    isoCodeToResources.put("ID", new LanguageResources("Indonesian", R.string.ID));\r
+    isoCodeToResources.put("GA", new LanguageResources("Gaelic (Irish, Scottish)", R.string.GA));\r
+    isoCodeToResources.put("IT", new LanguageResources("Italian", R.string.IT));\r
+    isoCodeToResources.put("LA", new LanguageResources("Latin", R.string.LA));\r
+    isoCodeToResources.put("LV", new LanguageResources("Latvian", R.string.LV));\r
+    isoCodeToResources.put("LT", new LanguageResources("Lithuanian", R.string.LT));\r
+    isoCodeToResources.put("JA", new LanguageResources("Japanese", R.string.JA));\r
+    isoCodeToResources.put("KO", new LanguageResources("Korean", R.string.KO));\r
+    isoCodeToResources.put("KU", new LanguageResources("Kurdish", R.string.KU));\r
+    isoCodeToResources.put("MS", new LanguageResources("Malay", R.string.MS));\r
+    isoCodeToResources.put("MI", new LanguageResources("Maori", R.string.MI));\r
+    isoCodeToResources.put("MN", new LanguageResources("Mongolian", R.string.MN));\r
+    isoCodeToResources.put("NE", new LanguageResources("Nepali", R.string.NE));\r
+    isoCodeToResources.put("NO", new LanguageResources("Norwegian", R.string.NO));\r
+    isoCodeToResources.put("FA", new LanguageResources("Persian", R.string.FA));\r
+    isoCodeToResources.put("PL", new LanguageResources("Polish", R.string.PL));\r
+    isoCodeToResources.put("PT", new LanguageResources("Portuguese", R.string.PT));\r
+    isoCodeToResources.put("PA", new LanguageResources("Punjabi", R.string.PA));\r
+    isoCodeToResources.put("RO", new LanguageResources("Romanian", R.string.RO));\r
+    isoCodeToResources.put("RU", new LanguageResources("Russian", R.string.RU));\r
+    isoCodeToResources.put("SA", new LanguageResources("Sanskrit", R.string.SA));\r
+    isoCodeToResources.put("SR", new LanguageResources("Serbian", R.string.SR));\r
+    isoCodeToResources.put("SK", new LanguageResources("Slovak", R.string.SK));\r
+    isoCodeToResources.put("SO", new LanguageResources("Somali", R.string.SO));\r
+    isoCodeToResources.put("ES", new LanguageResources("Spanish", R.string.ES));\r
+    isoCodeToResources.put("SW", new LanguageResources("Swahili", R.string.SW));\r
+    isoCodeToResources.put("SV", new LanguageResources("Swedish", R.string.SV));\r
+    isoCodeToResources.put("TL", new LanguageResources("Tagalog", R.string.TL));\r
+    isoCodeToResources.put("TG", new LanguageResources("Tajik", R.string.TG));\r
+    isoCodeToResources.put("TH", new LanguageResources("Thai", R.string.TH));\r
+    isoCodeToResources.put("BO", new LanguageResources("Tibetan", R.string.BO));\r
+    isoCodeToResources.put("TR", new LanguageResources("Turkish", R.string.TR));\r
+    isoCodeToResources.put("UK", new LanguageResources("", R.string.UK));\r
+    isoCodeToResources.put("UR", new LanguageResources("", R.string.UR));\r
+    isoCodeToResources.put("VI", new LanguageResources("", R.string.VI));\r
+    isoCodeToResources.put("CI", new LanguageResources("", R.string.CI));\r
+    isoCodeToResources.put("YI", new LanguageResources("", R.string.YI));\r
+    isoCodeToResources.put("ZU", new LanguageResources("", R.string.ZU));\r
+\r
+    isoCodeToResources.put("AZ", new LanguageResources("", R.string.AZ));\r
+    isoCodeToResources.put("EU", new LanguageResources("", R.string.EU));\r
+    isoCodeToResources.put("BR", new LanguageResources("", R.string.BR));\r
+    isoCodeToResources.put("MR", new LanguageResources("", R.string.MR));\r
+    isoCodeToResources.put("FO", new LanguageResources("", R.string.FO));\r
+    isoCodeToResources.put("GL", new LanguageResources("", R.string.GL));\r
+    isoCodeToResources.put("HT", new LanguageResources("", R.string.HT));\r
+    isoCodeToResources.put("LB", new LanguageResources("", R.string.LB));\r
+    isoCodeToResources.put("MK", new LanguageResources("", R.string.MK));\r
 \r
     // Hack to allow lower-case ISO codes to work:\r
-    for (final String isoCode : new ArrayList<String>(isoCodeToResourceId.keySet())) {\r
-      isoCodeToResourceId.put(isoCode.toLowerCase(), isoCodeToResourceId.get(isoCode));\r
+    for (final String isoCode : new ArrayList<String>(isoCodeToResources.keySet())) {\r
+      isoCodeToResources.put(isoCode.toLowerCase(), isoCodeToResources.get(isoCode));\r
     }\r
 \r
   }\r
diff --git a/src/com/hughes/android/dictionary/engine/NormalizeComparator.java b/src/com/hughes/android/dictionary/engine/NormalizeComparator.java
new file mode 100644 (file)
index 0000000..b0efdee
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.hughes.android.dictionary.engine;
+
+import java.util.Comparator;
+
+import com.ibm.icu.text.Transliterator;
+
+public class NormalizeComparator implements Comparator<String> {
+  
+  final Transliterator normalizer;
+  final Comparator<Object> comparator;
+
+  public NormalizeComparator(final Transliterator normalizer,
+      final Comparator<Object> comparator) {
+    this.normalizer = normalizer;
+    this.comparator = comparator;
+  }
+
+  @Override
+  public int compare(final String s1, final String s2) {
+    final String n1 = normalizer.transform(s1);
+    final String n2 = normalizer.transform(s2);
+    final int cn = comparator.compare(n1, n2);
+    if (cn != 0) {
+      return cn;
+    }
+    return comparator.compare(s1, s2);
+  }
+
+}