simjanos-dev / LinguaCafe

LinguaCafe is a self-hosted software that helps language learners read foreign languages.
https://simjanos-dev.github.io/LinguaCafeHome/
GNU General Public License v3.0
738 stars 22 forks source link

Furigana of phrases don't get updated #226

Open franzmondlichtmann opened 3 weeks ago

franzmondlichtmann commented 3 weeks ago

When I save both words of a two-word phrase and also save the phrase, the furigana shows up. When I now change the reading of the phrase to がくしゅうしゃ, the furigana don't get updated for the phrase. がくしゅうしゃ means learner. がくしゅうしゃ consists of がくしゅう and しゃ, in this combination. Standing alone the pronunciation is がくしゅう and もの. But together the pronunciation changes dramatically.

Linguacafe v0.11.2, using Firefox on Archlinux

simjanos-dev commented 3 weeks ago

Oh. I haven't even thought about that possibility. Thank you for the bug report!

Unfortunately, I don't think that's possible to fix currently, because I do not treat phrases as a different html element. This is the reason why phrases also get separated at the end of a line it if happens to be displayed there.

I will have to significantly rewrite the interactive text part to fix this, it won't be fixed nowadays. I think the best I can do is hide the furigana on pharses temporarily to avoid confusion about this.