Skip to content

Commit 7d398bd

Browse files
committed
fix: dont call ai translation service if there are no strings to translate
1 parent 53c1754 commit 7d398bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gulpfile.js/translateStrings.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ function _isTranslatableKey(key) {
185185
}
186186

187187
async function coreAiTranslate(stringsToTranslate, lang) {
188+
if(!Object.keys(stringsToTranslate).length){
189+
return {};
190+
}
188191
const translationRequest = getTranslationrequest(stringsToTranslate, lang);
189192
const translations = await getTranslation(translationRequest);
190193
aggregateUtilizationMetrics(translations);

0 commit comments

Comments
 (0)