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

FixTranslateService
Shipped
10 Mei 2026, 00:39 UTC
Author
Kamo
Commit
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.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei