Google Translate: Normalize pt-BR target language
| @@ -75,6 +75,10 @@ router.post('/libre', async (request, response) => { | ||
| 75 | 75 | |
| 76 | 76 | router.post('/google', async (request, response) => { |
| 77 | 77 | try { |
| 78 | + if (request.body.lang === 'pt-BR') { | |
| 79 | + request.body.lang = 'pt'; | |
| 80 | + } | |
| 81 | + | |
| 78 | 82 | const text = String(request.body.text ?? ''); |
| 79 | 83 | const lang = String(request.body.lang ?? ''); |
| 80 | 84 | |