pgaskin / dictutil

Tools, documentation, and libraries related to Kobo dictionaries.
https://pgaskin.net/dictutil
MIT License
55 stars 4 forks source link

Install dict with locale longer than 2 characters #7

Closed poleeto closed 4 years ago

poleeto commented 4 years ago

I cannot install this Japanese dictionary:

Built-in Kobo dictionaries (last updated for 4.20.14601):
  de (dicthtml-de.zip)                     Deutsch
  de-en (dicthtml-de-en.zip)               Deutsch - English
  en (dicthtml.zip)                        English
  en-de (dicthtml-en-de.zip)               English - Deutsch
  en-es (dicthtml-en-es.zip)               English - Español
  en-fr (dicthtml-en-fr.zip)               English - Français
  en-it (dicthtml-en-it.zip)               English - Italiano
  en-ja (dicthtml-en-ja.zip)               English - 日本語(ジーニアス)
  en-ja-pgs (dicthtml-en-ja-pgs.zip)       English - 日本語(プログレッシブ)
  en-nl (dicthtml-en-nl.zip)               English - Nederlands
  en-pt (dicthtml-en-pt.zip)               English - Português
  en-tr (dicthtml-en-tr.zip)               English - Türkçe
  es (dicthtml-es.zip)                     Español
  es-en (dicthtml-es-en.zip)               Español - English
  fr (dicthtml-fr.zip)                     Français
  fr-en (dicthtml-fr-en.zip)               Français - English
  it (dicthtml-it.zip)                     Italiano
  it-en (dicthtml-it-en.zip)               Italiano - English
  jaxxdjs (dicthtml-jaxxdjs.zip)           日本語
  nl (dicthtml-nl.zip)                     Nederlands
  pt (dicthtml-pt.zip)                     Português
  pt-en (dicthtml-pt-en.zip)               Português - English
$ ./dictutil-darwin-64bit install kobo-ja-dict-enhance-master/dicthtml-jaxxdjs.zip
Error: no locale specified, and dictzip name doesn't include one.
$ ./dictutil-darwin-64bit install kobo-ja-dict-enhance-master/dicthtml-jaxxdjs.zip -l jaxxdjs
Error: invalid locale "jaxxdjs" specified.
pgaskin commented 4 years ago

That's a known limitation of dictutil. Japanese dictionaries require different handling for prefixes, and there's low demand for it (plus I have no way of testing it), so I've decided not to take the time to support them.