From 111fe5e0dc04cfbe6b459c80d0df41628508ac45 Mon Sep 17 00:00:00 2001 From: zdm Date: Sat, 17 Feb 2024 12:05:52 +0200 Subject: [PATCH] fix: translations --- lib/package/localization.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/package/localization.js b/lib/package/localization.js index 29bc2248..4e9353a1 100644 --- a/lib/package/localization.js +++ b/lib/package/localization.js @@ -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 ); } } } @@ -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 );