Merge pull request #2534 from blackmesataiwan/staging Update language code for Chinese Traditional translations(zh-TW) on LibreTranslate endpoint.

d8809238a7bba4640f428aafaa33c4db9dbff9d3

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +5 -1Ignore whitespace
src/endpoints/translate.js+5 -1
@@ -19,10 +19,14 @@ router.post('/libre', jsonParser, async (request, response) => {
19 return response.sendStatus(400);19 return response.sendStatus(400);
20 }20 }
2121
22 if (request.body.lang === 'zh-CN' || request.body.lang === 'zh-TW') {22 if (request.body.lang === 'zh-CN') {
23 request.body.lang = 'zh';23 request.body.lang = 'zh';
24 }24 }
2525
26 if (request.body.lang === 'zh-TW') {
27 request.body.lang = 'zt';
28 }
29
26 const text = request.body.text;30 const text = request.body.text;
27 const lang = request.body.lang;31 const lang = request.body.lang;
2832