feat: Add SPARQL query link to author's works list page

Closes T397554

Summary

Adds a link to the Wikidata Query Service on the author's works list page, allowing users to view and modify the SPARQL query that generates the list.

Changes

  • Modified works_list route in app.py to generate SPARQL query URL
  • Added link in works-list.html template below the page heading
  • Link opens Wikidata Query Service in new tab with pre-filled query
  • Extracted and compiled translations for new string "View this query on Wikidata Query Service"

Screenshots

Before:

image

After:

image

Query page:

image

Test plan

  • Visit an author page (e.g., /author/Q5582)
  • Click "List of works" link
  • Verify "View this query on Wikidata Query Service" link appears below the heading
  • Click the SPARQL query link
  • Verify it opens Wikidata Query Service in a new tab with the correct pre-filled query
  • Verify the query displays the same works shown on the page

Merge request reports

Loading