LibreTranslate zh-CN aliased

This commit is contained in:
Cohee 2024-01-31 14:37:26 +02:00
parent 891077be43
commit 5a2dad48f2
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,10 @@ router.post('/libre', jsonParser, async (request, response) => {
return response.sendStatus(400);
}
if (request.body.lang === 'zh-CN' || request.body.lang === 'zh-TW') {
request.body.lang = 'zh';
}
const text = request.body.text;
const lang = request.body.lang;