diff --git a/lib/package/localization.js b/lib/package/localization.js index 31879a40..457228f0 100644 --- a/lib/package/localization.js +++ b/lib/package/localization.js @@ -156,14 +156,14 @@ export default class { if ( message.isDisabled ) continue; // delete invalid translation - if ( message.id === message.singleFormTranslation ) { + if ( message.id === message.singularTranslation ) { console.warn( `Failed translation removed: [en] message: ${ message.id } [${ poFile.language }] translation: -${ message.singleFormTranslation } +${ message.singularTranslation } ` ); message.isFuzzy = false; @@ -198,8 +198,8 @@ ${ message.singleFormTranslation } message.setTranslations( translatedMessage.translations ); } - // pre-translate single form - else if ( cloudTranslationApi && !message.isSingleFormTranslated ) { + // pre-translate singular form + else if ( cloudTranslationApi && !message.isSingularTranslated ) { await this.#preTranslate( poFile, message ); } } @@ -247,7 +247,7 @@ ${ message.id } // translated from clous else { message.isFuzzy = true; - message.setSingleFormTranslation( res.data ); + message.setSingularTranslation( res.data ); console.log( `Cloud translation: @@ -282,9 +282,9 @@ ${ JSON.stringify( message.translations, null, 4 ) } ` ); } - // single form + // singular form else { - if ( message.singleFormTranslation === translatedMessage.translations[ message.singleFormIndex ] ) return; + if ( message.singularTranslation === translatedMessage.translations[ message.singularIndex ] ) return; console.log( `Translation memory conflict found: @@ -292,10 +292,10 @@ ${ JSON.stringify( message.translations, null, 4 ) } ${ message.id } [${ poFile.language }]: old translations: -${ translatedMessage.translations[ message.singleFormIndex ] } +${ translatedMessage.translations[ message.singularIndex ] } [${ poFile.language }]: new translations: -${ message.singleFormTranslation } +${ message.singularTranslation } ` ); } @@ -306,9 +306,9 @@ ${ message.singleFormTranslation } } else if ( answer === "new" ) { - // merge single form + // merge singular form if ( !message.pluralId ) { - translatedMessage.translations[ message.singleFormIndex ] = message.singleFormTranslation; + translatedMessage.translations[ message.singularIndex ] = message.singularTranslation; } // merge plural foel