Skip to content

Fix popup dictionaries opening the unsubstituted URL template - #754

Open
sssdddggg wants to merge 2 commits into
LuteOrg:developfrom
sssdddggg:fix/popup-dict-lookup-url
Open

sssdddggg wants to merge 2 commits into
LuteOrg:developfrom
sssdddggg:fix/popup-dict-lookup-url

Conversation

@sssdddggg

@sssdddggg sssdddggg commented Sep 29, 2026 •

Copy link
Copy Markdown

Since e21138a ("Use new js library"), DictButton._load_popup builds lookup_url (with [LUTE] replaced by the term) but passes the raw dict url to LutePopups.open_popup, so popup dictionaries search for the literal "[LUTE]" (e.g. Forvo 404s, japandict searches "[lute]").

Pass lookup_url instead.

The existing popup acceptance tests only counted windows, so they didn't catch this. test_dictionary_popup_reuses_window now also checks that the popup shows the looked-up term, and that the reused window follows the next lookup. It fails without the fix and passes with it.

🤖 Generated with Claude Code

sssdddggg and others added 2 commits September 29, 2026 15:44
Since e21138a ("Use new js library"), DictButton._load_popup builds
lookup_url (with [LUTE] replaced by the term) but passes the raw dict
url to LutePopups.open_popup, so popup dictionaries search for the
literal "[LUTE]" (e.g. Forvo 404s, japandict searches "[lute]").

Pass lookup_url instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The popup tests only counted windows, so they missed popups opening
the raw "[LUTE]" template. Assert the popup shows the looked-up term,
and that the reused window follows the next lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant