Google Translate: Normalize pt-BR target language

bba91e38fc1bd7e9583c6e0468feb980940a800c

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

1 files changed, +4 -0Ignore whitespace
src/endpoints/translate.js+4 -0
@@ -75,6 +75,10 @@ router.post('/libre', async (request, response) => {
7575
7676router.post('/google', async (request, response) => {
7777 try {
78+ if (request.body.lang === 'pt-BR') {
79+ request.body.lang = 'pt';
80+ }
81+
7882 const text = String(request.body.text ?? '');
7983 const lang = String(request.body.lang ?? '');
8084