Merge pull request #2534 from blackmesataiwan/staging
Update language code for Chinese Traditional translations(zh-TW) on LibreTranslate endpoint.
This commit is contained in:
commit
d8809238a7
|
@ -19,10 +19,14 @@ router.post('/libre', jsonParser, async (request, response) => {
|
|||
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';
|
||||
}
|
||||
|
||||
if (request.body.lang === 'zh-TW') {
|
||||
request.body.lang = 'zt';
|
||||
}
|
||||
|
||||
const text = request.body.text;
|
||||
const lang = request.body.lang;
|
||||
|
||||
|
|
Loading…
Reference in New Issue