Skip to content

Commit

Permalink
fix: dont call ai translation service if there are no strings to tran…
Browse files Browse the repository at this point in the history
…slate
  • Loading branch information
abose committed Jan 18, 2025
1 parent 53c1754 commit dbf0f2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gulpfile.js/translateStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ function _isTranslatableKey(key) {
}

async function coreAiTranslate(stringsToTranslate, lang) {
if(!Object.keys(stringsToTranslate).length){
return {};
}
const translationRequest = getTranslationrequest(stringsToTranslate, lang);
const translations = await getTranslation(translationRequest);
aggregateUtilizationMetrics(translations);
Expand Down

0 comments on commit dbf0f2c

Please sign in to comment.