diff --git a/lib/package/localization.js b/lib/package/localization.js index feebd414..d2445121 100644 --- a/lib/package/localization.js +++ b/lib/package/localization.js @@ -256,6 +256,14 @@ export default class { // XXX async #resolveConflict ( poFile, message, translatedMessage ) { + + // XXX + if ( message.pluralId && translatedMessage.pluralId && message.pluralId !== translatedMessage.pluralId ) { + console.error( `Plural form conflict found` ); + + process.exit( 1 ); + } + const translatedMessageHash = JSON.stringify( translatedMessage.translations ), messageHash = JSON.stringify( message.translations ); @@ -283,15 +291,14 @@ ${ JSON.stringify( message.translations, null, 4 ) } } } - // XXX - #storeMessage ( language, message ) { + #storeMessage ( language, { id, pluralId, translations } ) { this.#dbh.do( SQL.updateTranslations, [ // language, - message.id, - message.pluralId || "", - message.translations, + id, + pluralId || "", + translations, ] ); } }