baskerville / plato

Document reader
Other
1.26k stars 105 forks source link

(Feature Request) Japanese support #244

Open it0na72 opened 2 years ago

it0na72 commented 2 years ago

Would love to see a Japanese keyboard + Japanese deconjugation added (something that koreader does here https://github.com/koreader/koreader/wiki/Japanese-Support) without all the clutter).

Maybe even adding support for other languages in plato. I would like to help with the translation if needed.

Also plato currently doesn't support vertical text in epubs. would be amazing if this could be implemented.

it0na72 commented 2 years ago

Just a small update on this. Just installed a couple of Japanese dictionaries and some fonts, and even though I needed to change the default path of the font in "settings. toml" this got sorted.

Regarding the dictionaries, I'm having an issue with plato not being able to recognize kanji at all. It recognizes the simple characters as you can see at the end of the video, but in the beginning of the video it separates every character, making it unable to find in the dictionary. And even when there's no space in the word (also shown in the video) the word just doesn't appear at all, even though the word is in the dictionary. Video below: https://drive.google.com/file/d/1wNn3KnBxv8JguY2b164_h9WwwjgC3Py-/view?usp=drivesdk

thataboy commented 2 years ago

I think I have a fix for this

it separates every character, making it unable to find in the dictionary.

in view/reader/mod.rs text_excerpt inserts a space in between multi byte characters.

@baskerville please look at this commit https://github.com/thataboy/plato/commit/0dd38cc94b797fb79280ad520448f961b70406ce

@it0na72 if you would, you can try my build here https://github.com/thataboy/plato/releases/tag/0.9.28 It should fix the space problem. You may also find the translate feature useful. Make sure you extract the entire package into .adds/plato. Your settings will be preserved.

psyleft commented 1 year ago

Adding on to this, it would be nice to have support for furigana. I don't know the specifics of how this is typeset, but as of now epub files that properly display furigana in Calibre simply put it next to the kanji in plato (which is incredibly difficult to read). I suppose the solution to those sorts of formatting problems for now would just be to convert to pdf before uploading.