Skip to content

Commit

Permalink
fix: translations
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Feb 17, 2024
1 parent 54d4e10 commit 111fe5e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/package/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,15 @@ ${ message.singleFormTranslation }
// message is not translated
else {

// XXX
// get message from the translation memory
if ( translatedMessage ) {

// message.isFuzzy = false;
// message.setTranslations( translatedMessage.translations );
message.isFuzzy = false;
message.setTranslations( translatedMessage.translations );
}

// XXX
// pre-translate single form
else if ( cloudTranslationApi && !message.isSingleFormTranslated ) {

// await this.#preTranslate( poFile, message );
await this.#preTranslate( poFile, message );
}
}
}
Expand All @@ -236,7 +232,6 @@ ${ message.singleFormTranslation }
this.#dbh.exec( SQL.schema );
}

// XXX
async #preTranslate ( poFile, message ) {
const res = await cloudTranslationApi.translate( poFile.language, message.id );

Expand Down

0 comments on commit 111fe5e

Please sign in to comment.