stephenmk / Jitendex

A free, offline, and openly licensed Japanese-to-English dictionary. Updates weekly!
https://jitendex.org
Creative Commons Attribution Share Alike 4.0 International
249 stars 2 forks source link

Add data-sc-content="examples" #4

Closed parfait8566 closed 11 months ago

parfait8566 commented 11 months ago

The new version of JMdict had data-sc-content="examples" so it was possible to hide sentences within Anki

stephenmk commented 11 months ago

Compared to the previous version of JMdict that I developed, I cut back on the amount of data attributes because I hoped it would speed up the dictionary validation process when importing the dictionary. Unfortunately it doesn't seem to have made much of a difference. It's not difficult to add them back when people really want them.

I do encourage you to give the sentences a chance. There are some unnatural sentences, but there are just as many that are quite helpful for clarifying the nuances of words. I think they do more good than harm.

I just updated the Yomichan dictionary in the latest release with a new file that applies the data tags to the sentences. The JA sentences have data-sc-content="example-sentence-a" and the EN sentences have data-sc-content="example-sentence-b". You can hide them both with one selector by using some special attribute selector syntax .

[data-sc-content|="example-sentence"] {
  display: none;
}
parfait8566 commented 11 months ago

Thanks!

Yeah, I definitely agree. It's just that I rarely need them when reviewing on Anki and if I ever did I can open the editor and check them. They're certainly useful when looking up words on Yomichan.