Update language code for Chinese translations(zh-TW)
The code changes in `translate.js` update the language code for Chinese translations. The `zh-TW` language code is changed to `zt`. This ensures consistency and compatibility with the translation system(https://libretranslate.com/languages).
This commit is contained in:
parent
3cbbb2fe39
commit
09b08a49d3
|
@ -19,10 +19,14 @@ router.post('/libre', jsonParser, async (request, response) => {
|
||||||
return response.sendStatus(400);
|
return response.sendStatus(400);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.body.lang === 'zh-CN' || request.body.lang === 'zh-TW') {
|
if (request.body.lang === 'zh-CN') {
|
||||||
request.body.lang = 'zh';
|
request.body.lang = 'zh';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request.body.lang === 'zh-TW') {
|
||||||
|
request.body.lang = 'zt';
|
||||||
|
}
|
||||||
|
|
||||||
const text = request.body.text;
|
const text = request.body.text;
|
||||||
const lang = request.body.lang;
|
const lang = request.body.lang;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue