KamoCRM

Alias zh -> zh-Hans so en->zh actually translates

FixTranslateService
Ya
10 Mei 2026, 00:39 UTC
Mwandishi
Kamo
Ahadi ya
fa66033

LibreTranslate's /languages endpoint advertises Chinese under the region-specific codes "zh-Hans" and "zh-Hant" (never bare "zh"), even though POST /translate accepts the bare code. Without an alias, **************** returned false, the ProviderRouter fell through both providers, and the English source was returned verbatim — leaving 99.7% of zh.json untranslated for months. Add a small LOCALE_ALIASES map (currently only zh -> zh-Hans), apply it on both supports() and translate(). Update the existing test to mirror the real /languages payload, and add a regression test.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila kitu kinaingia kwenye tovuti yako mwenyewe. Anza kwenye mpango wa bure na usome ukurasa huu tena katika mwezi mmoja.

Kuwa Huru MileleMtazamo wa bei