translate-tools / translate-tools/core

Introduce the translation stream

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
90
Forks
13
PR merge metrics
No merged PRs in 30d

Description

We currently have translate method for translate single text, and translateBatch method to translate many texts in one request.

The problem with translateBatch is we have to wait for translating whole request. That is critical for services that generates a lot of errors, like LLM translation API.

In case with LLM translators, we could parse a response and in case it is partially correct, resolve the part of translated texts, and ask LLM to translate only invalid part. It would speed up the translation.

Currently we just ask the LLM to translate all texts again and user wait for the response. It may take a dozens seconds to handle one batch of texts.


As side effect, the translators could implement the concurrent translation itself. That is related to #143

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing translate and translateBatch entry points in the repository and trace how batch results are returned. Define the streaming API and completion behavior so partial translations can be resolved while invalid parts are retried, then verify that the design remains compatible with the existing translation methods and the concurrent-translation work in #143.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.