GithubHelp home page GithubHelp logo

Comments (5)

ripose-jp avatar ripose-jp commented on August 22, 2024

Some dictionaries (such as Jitendex) do not include <rp> tags in the ruby markup. Ruby rendering should be improved. Options include stripping <rt> tags entirely, highlighting ruby kanji and showing kana on hover as a tooltip, or rendering them inline with brackets.

All three of these options are desirable, though I like rendering them inline with brackets the least since it gets in the way of readability. Tooltips can be implemented in a hacky way by making tooltip'd text a link and using linkHovered() to show a tooltip.

Add support for links. Should links open up a new popup or use the existing popup?

By links, do you mean clicking a word opens a sub-search of sorts? I'm not against the idea. Opening it in a new popup would be the easiest thing to do since recursive search is already supported. You'd just have to listen for linkActiviated() and construct a new popup similarly to know recursive search does so. You can also make it work like clicking kanji in glossaries does, but that's probably more trouble than it's worth. Both are valid approaches.

Why is there a separate option for "Bullet Points" and "Line Breaks" in the Separate Glossary Entries setting? Structured Content allows <div> an <br> tags as well as arbitrary Unicode strings for <li> list markers. It seems like that choice should left to the dictionary.

Memento is older than Yomitan by several years. Yomitan has changed Yomichan's dictionaries quite a lot, which Memento hasn't kept up with. Very few of Yomichan's dictionaries used structured content, instead opting for plaintext. Most dictionaries used \n to separate different definitions under the same glossary. Older versions of Memento would turn these into bulleted lists. Calvin didn't like the unused white space to the left of bullets, so he made #64.

I believe the choice is mostly left to the dictionary if it's using structured content. These settings have an outsized effect on plaintext dictionaries.


If I didn't comment on something, it's because I'm okay with the change/improvement. If you want to work on some of them and make PR's, by all means go ahead.

from memento.

spacehamster avatar spacehamster commented on August 22, 2024

By links, do you mean clicking a word opens a sub-search of sorts?

Structured content allows dictionaries to specify <a> tags which can be either sub-search or links to external websites. Yomitan uses the same popup, but I have no issues with the way Memento currently opens a new popup for recursive search.

The structured content format looks like this

{
  "tag": "a",
  "lang": "ja",
  "href": "?query=日曜&wildcards=off",
  "content": [ <snip> ]
}

image

from memento.

ripose-jp avatar ripose-jp commented on August 22, 2024

Makes sense to me. I'd say reuse the code for recursive search since that's going to be really easy.

from memento.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.