Repository navigation
feat(files): translate an asset's transcript into another language, when asked - #684
Merged
Merged
Conversation
…hen asked Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: a transcript could be read in another language only if someone uploaded a translation file for it.
After: the Files tab's Translate… has the configured model translate an asset's transcript into another language. Your browser's language is filled in, and an estimate of what it would take is shown first, labelled as an estimate. It runs only when asked, in the background, and sends the lines in batches marked as data, so instructions in a transcript are never followed. The result is kept as a translation file whose lines keep their times and speaker, and search, the Files tab and IIIF read it like an uploaded one. Every call goes in the activity ledger; a budget that would go over holds it, and one used up stops it. Agents use
GETandPOST /api/v1/resources/{id}/files/translate, the MCP toolstranslate_transcriptandget_translation, and the assistant'stranslate_transcript, which asks first.Motivation and Context
Item from the personal feature plan sheet (translate transcripts).
Screenshots (if appropriate):
n/a
Steps to reproduce (if appropriate):
Open an asset with a transcript, Files tab, Translate…, keep the filled-in language and press Enter: after it runs, a translation file appears in the Files tab, and searching a translated word finds the line.
Types of changes
!in the title)Checklist:
make hookschecks it on commit).tests/api/test_translations.py,tests/api/test_mcp.py,__tests__/recording-translate.test.tsx).docs/accordingly (docs/api.md, Translating a transcript).## UnreleasedinCHANGELOG.md. Written aschangelog.d/translate.md, per build(release): changelog fragments in changelog.d/ instead of one Unreleased section #581.Done questions (AGENTS.md)
.envedit or manual step. Uses the model already configured.make openapi).untrusted.wrap.Local CI: the container ran several times slower than usual, so I ran the changed tests directly.
test_translations.py,test_mcp.py,test_setup_assistant.pyandtest_scaling_agents.pypassed (42 passed), and ruff is clean; the threat model validator agrees. A fullci/local-ci.shrun is still going; GitHub CI decides the merge.Generated by Claude Code