From 8d425b4707308fa16407d8ec2aafd6644bcfa773 Mon Sep 17 00:00:00 2001 From: jpulattie Date: Sun, 24 Nov 2024 14:41:11 -0600 Subject: [PATCH] Updated deprecated 'substr' to use 'slice' --- apps/meteor/app/autotranslate/server/googleTranslate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/meteor/app/autotranslate/server/googleTranslate.ts b/apps/meteor/app/autotranslate/server/googleTranslate.ts index da5e156458dc..5c17a38d4160 100644 --- a/apps/meteor/app/autotranslate/server/googleTranslate.ts +++ b/apps/meteor/app/autotranslate/server/googleTranslate.ts @@ -131,7 +131,7 @@ class GoogleAutoTranslate extends AutoTranslate { for await (let language of targetLanguages) { if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { - language = language.substr(0, 2); + language = language.slice(0, 2); } try { @@ -178,7 +178,7 @@ class GoogleAutoTranslate extends AutoTranslate { for await (let language of targetLanguages) { if (language.indexOf('-') !== -1 && !_.findWhere(supportedLanguages, { language })) { - language = language.substr(0, 2); + language = language.slice(0, 2); } try {