Skip to content

Fix Terminology "Translate" link dropping the string query - #4637

Merged
mathjazz merged 2 commits into
mozilla:mainfrom
wassafshahzad:wassafshahzad/4622-terminology-link-string-query
Nov 1, 2026
Merged

mathjazz merged 2 commits into
mozilla:mainfrom
wassafshahzad:wassafshahzad/4622-terminology-link-string-query

Conversation

@wassafshahzad

Copy link
Copy Markdown
Contributor

Description

The click handler navigated to the link's pathname only, losing ?string=<id>, so the Terminology project opened on its first string instead of the selected term. Pass pathname + search, as Metadata.tsx already does.

Linked Issue

Closes #4622

)

The click handler navigated to the link's pathname only, losing
`?string=<id>`, so the Terminology project opened on its first string
instead of the selected term. Pass pathname + search, as Metadata.tsx
already does.

@mathjazz mathjazz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Please add a click regression test in Term.test.jsx asserting that navigateToPath receives /kg/terminology/common/?string=1. The existing test checks the href, which was already correct before this fix.

@mathjazz mathjazz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@mathjazz
mathjazz merged commit 35977a1 into mozilla:main Nov 1, 2026
10 checks passed
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.

Terminology: Hyperlinks from the source strings in the Translate View do not follow through

2 participants