Linkage from the Pali lookup dictionary

i just noticed that entries from the Pali lookup dictionary are linked not to their respective full dictionary article page but to the search page

if memory serves me previously linking to the search page only applied to the lookup entries with unresolved translations

provided my memory doesn’t fail me, is this a glitch or was this changed on purpose?

Can you give an example of where this happens?

1 Like

it’s universal, one example would be

linkage of the word upasaka with this embedded link SuttaCentral

at AN 7.59

I see what you mean. And I’m afraid I don’t know. @Sujato & @blake? It would be good if it immediately went to the dictionary article (in a separate tab) if it existed. Maybe that is still in the pipeline?

On a separate note, what is going on with your font? Many of the pali characters turn up as boxes …

that’s right, the thing is that earlier it did go directly to the dictionary page, so it seems

the font display problem is due to my outdated version of Chrome

another thing i spotted checking the lookup tool in Mozilla is that embedded links there are active only occasionally, most of the time the lookup entries display plain text with no embedded link, when you try to hover over the word to access the link, the pop-up immediately disappears because there’s no link to hover over

video example

Quite right, it should go to /define/[term]. I am surprised it doesn’t, but it’s so long ago I can’t remember what it used to do. Anyway, it should be a trivial change to the js file, no?

The bigger problem for me is getting the popup to stay still so you can hover on it! It needs something, I’m not sure what: maybe a couple hundred ms delay before vanishing?

I don’t think this has anything to do with whether the popup has a linked headword, or with Mozilla specifically; it seems to be the same problem I mentioned above (I’m using Chrome). It’s a finicky behavior and needs to be more robust.

Maybe, i saw connection between the two because the pop-up only disappears at an attmept to move cursor towards it, otherwise it stays on, in Chrome however i don’t have this problem

OK. Will put it on my to-do list.

1 Like

I see why this was not done: the js file has the lookup-language incorporated in the search string. At least, it is clear that that was intended, but it does not work yet and we also do not have dictionaries in other languages than English yet (at least, only in the Lookup Tool, not in the Search/Define). So now I have changed if to /define/ for now (and in new tab) so no matter what language you have your lookup tool in, it always ends up at the English dictionary. This will need to change again in the future.

When a word does not exist in the Lookup Tool, the link will now go to a page that says that the dictionary results cannot be found but gives suggestions of similar words.

I have also changed the popup slightly so it should not disappear any more. The problem was a slight gap between the word and the popup. Please have a look on your own browsers because for different browsers it needs different values, which makes it a bit more difficult.

1 Like

it’s much better but every now and then it still only works on the second try

Works great for me on Chrome, but Firefox is still a little dicey.

What about adding a fade-transition on mouse-out? 200ms or 400ms should be enough. That should help make it more robust on all browsers.

Can you please try again.

Excellent, thanks FF is good now.

I still like the idea of a transition!

Like this?

Exactly like that. i think it looks nicer, too, less abrupt.