@@ -72,7 +72,7 @@ const parseVars = (pluralForm) => {
7272class PluralForms {
7373 static empty ( length ) { return new PluralForms ( new Array ( length ) . fill ( '' ) ) ; }
7474
75- static fromVueI18n ( path , message ) {
75+ static fromVueI18n ( key , message ) {
7676 const forms = message . split ( ' | ' ) ;
7777 if ( forms . length > 2 )
7878 logThenThrow ( message , 'a pluralized message must have exactly two forms' ) ;
@@ -83,10 +83,10 @@ class PluralForms {
8383 const badWhitespace = form . match ( / ^ \s + | \s + $ | \s \s + / ) ;
8484 if ( badWhitespace ) {
8585 const badLength = badWhitespace [ 0 ] . length ;
86- console . error ( `unexpected white space in translation string '${ path } ':` ) ; // eslint-disable-line no-console
86+ console . error ( `unexpected white space in translation string '${ key } ':` ) ; // eslint-disable-line no-console
8787 console . error ( ` [${ message } ]` ) ; // eslint-disable-line no-console
8888 console . error ( ` [${ '' . padStart ( badLength , '^' ) . padStart ( badWhitespace . index + badLength , ' ' ) . padEnd ( message . length , ' ' ) } ]` ) ; // eslint-disable-line no-console
89- throw new Error ( `unexpected whitespace in message '${ path } ' at index ${ badWhitespace . index } ("${ message } ")` ) ;
89+ throw new Error ( `unexpected whitespace in message '${ key } ' at index ${ badWhitespace . index } ("${ message } ")` ) ;
9090 }
9191 }
9292
@@ -670,8 +670,8 @@ const rekeyTranslations = (source, translated, transifexPaths) => {
670670// Returns the Vue I18n messages for the source locale after converting them to
671671// PluralForms objects.
672672const readSourceMessages = ( localesDir , filenamesByComponent ) => {
673- const reviver = ( path , value ) =>
674- ( typeof value === 'string' ? PluralForms . fromVueI18n ( path , value ) : value ) ;
673+ const reviver = ( key , value ) =>
674+ ( typeof value === 'string' ? PluralForms . fromVueI18n ( key , value ) : value ) ;
675675
676676 // Read the root messages.
677677 const messages = parse (
0 commit comments