KamoCRM

Route translations INTO English, not just out of it

FixTranslateService
Shipped
12 ஆகஸ்ட், 2026 அன்று 4:05 AM UTC
Author
Kamo
Commit
92f4b7a

Both providers gated supports() on "en".equals(sourceLang), so every inbound pair was decoderd before a provider was ever asked. ProviderRouter treats "no provider supports this" as a legitimate passthrough and returns the input verbatim, so a Romanian message shown to an English reader came back untranslated with no exception and no log line anywhere — the failure was invisible in the service logs. - LibreTranslateProvider now caches the full source->targets matrix from /languages instead of only English's row. Argos ships each direction as a separate package, so en->ro tells you nothing about ro->en. - Locale aliasing (zh -> zh-Hans) now applies to the source side too, and translate() posts the same resolved code that supports() matched on. - BergamotProvider keys off an explicit pair map. It still only ships en->X models, but the direction is now data rather than a hardcoded assumption. - ProviderRouter warns when no provider supports a pair rather than silently returning the source, and short-circuits blank text (an empty q earns a permanent, non-retryable HTTP 400 that requeued forever). Also repairs BergamotProviderTest, which was already failing on main: it asserted en->ru/pt/it/uk/tr/ro/id/vi/ar after the supported set had been narrowed to the four confirmed models (ende, enes, enfr, enpl).

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing