diff --git a/lib/package/localization.js b/lib/package/localization.js index d2445121..c4860326 100644 --- a/lib/package/localization.js +++ b/lib/package/localization.js @@ -256,6 +256,16 @@ export default class { // XXX async #resolveConflict ( poFile, message, translatedMessage ) { + var messageHash, translatedMessageHash; + + if ( !message.pluralId ) { + messageHash = JSON.stringify( message.translations[ 0 ] ); + translatedMessageHash = JSON.stringify( translatedMessageHash.translations[ 0 ] ); + } + else { + messageHash = JSON.stringify( message.translations ); + translatedMessageHash = JSON.stringify( translatedMessageHash.translations ); + } // XXX if ( message.pluralId && translatedMessage.pluralId && message.pluralId !== translatedMessage.pluralId ) { @@ -264,9 +274,6 @@ export default class { process.exit( 1 ); } - const translatedMessageHash = JSON.stringify( translatedMessage.translations ), - messageHash = JSON.stringify( message.translations ); - // translation memory conflict if ( translatedMessageHash !== messageHash ) { console.log( `Translation memory conflict found: