Skip to content

Media: use new translation language query param - #3084

Draft
rectifyer wants to merge 1 commit into
mainfrom
refactor/api_translations_query
Draft

Media: use new translation language query param#3084
rectifyer wants to merge 1 commit into
mainfrom
refactor/api_translations_query

Conversation

@rectifyer

Copy link
Copy Markdown
Contributor

Summary

Bumps @trakt/api to 0.6.0 and migrates the translations calls to the new contract shape, where the language filter is an optional query param instead of a path segment (trakt/trakt-api#901, refs trakt/trakt-api#869). The client now requests /translations?language=xx instead of /translations/xx.

Changes

  • @trakt/api pin bumped from 0.5.4 to 0.6.0 in projects/client/package.json.
  • movieIntlQuery, showIntlQuery, and episodeIntlQuery pass language via query instead of params.
  • MSW handlers: the per-language /translations/{lang} mocks (movie en/nl/pt, show en/nl/ja, episode en/nl) are collapsed into single /translations handlers that serve the same mock data keyed off the language query param, since the old path-based handlers would no longer match the new request URLs.

Dependencies

Draft until the upstream pieces land, in order:

  1. The Rails API deploys support for ?language= on the translations endpoints.
  2. fix(api)!: move translations language filter to an optional query param trakt-api#901 merges and @trakt/api 0.6.0 is published (tag v0.6.0).
  3. Then this PR: refresh deno.lock with an install (the 0.6.0 pin cannot resolve before publish) and mark ready for review.

Merging early would fail install in CI on the unresolvable 0.6.0 pin, and running ahead of the Rails deploy would return unfiltered translations because the query param is ignored.

@deepsource-io

deepsource-io Bot commented Aug 4, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 99a46ba...32ab5fc on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Aug 4, 2026 11:00p.m. Review ↗
Code coverage Aug 4, 2026 11:30p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@rectifyer rectifyer changed the title refactor(media): use new translation language query param Media: use new translation language query param Aug 4, 2026
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