pontoon icon indicating copy to clipboard operation
pontoon copied to clipboard

Implement Pretranslation API

Open functionzz opened this issue 1 month ago • 3 comments

Feature Summary

Implement an authenticated API endpoint which returns a Pretranslation for a given Entity and locale. Located at /api/v2/pretranslate/?text=TEXT&locale=code.

Motivation / Use Case

We currently have existing Pretranslation functionality in Pontoon. Extending this to an API endpoint can provide easier access for external users of Pretranslation functionality.

functionzz avatar Nov 12 '25 16:11 functionzz

Implement an authenticated API endpoint which returns a Pretranslation for a given Entity and locale. Located at /api/v2/pretranslation/code/entity_id.

It would be more generally useful to have text as the input parameter: /api/v2/pretranslate/?text=TEXT&locale=CODE

mathjazz avatar Nov 12 '25 17:11 mathjazz

It would be more generally useful to have text as the input parameter:

Absolutely. The goal is not just to pretranslate strings available in Pontoon.

I assume code stands for locale code?

flodolo avatar Nov 12 '25 17:11 flodolo

Yep

functionzz avatar Nov 12 '25 17:11 functionzz