Google Translate: Normalize pt-BR target language

This commit is contained in:
Cohee
2026-01-13 02:23:46 +02:00
parent f861beb244
commit bba91e38fc
+4
View File
@@ -75,6 +75,10 @@ router.post('/libre', async (request, response) => {
router.post('/google', async (request, response) => {
try {
if (request.body.lang === 'pt-BR') {
request.body.lang = 'pt';
}
const text = String(request.body.text ?? '');
const lang = String(request.body.lang ?? '');