You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using lingui extract <some file> the result overwrite the obsolete flag of all the messages in the catalog to false. This is unexpected because lingui extract only adds obsolete: true flags and we probably don't want to overwrite this.
Eg lingui extract <file with obsolete translation> will produce the following patch that overwrite the obsolete flag
20
]
],
- "obsolete": true
+ "obsolete": false
},
Also Eg lingui extract <file with changed translation> will produce the following change on listed files
+ ],
+ "obsolete": false
To Reproduce
do a lingui extract <some file> on a project with several files and see that "obsolete": false are added to catalog to translation of unlisted files, or have their "obsolete": true changed to "obsolete": false
Expected behavior obsolete obsolete flag should be kept pristine when a list of file is supplied to the command line
When using
lingui extract <some file>
the result overwrite the obsolete flag of all the messages in the catalog tofalse
. This is unexpected becauselingui extract
only addsobsolete: true
flags and we probably don't want to overwrite this.Eg
lingui extract <file with obsolete translation>
will produce the following patch that overwrite the obsolete flagAlso Eg
lingui extract <file with changed translation>
will produce the following change on listed filesTo Reproduce
do a
lingui extract <some file>
on a project with several files and see that"obsolete": false
are added to catalog to translation of unlisted files, or have their"obsolete": true
changed to"obsolete": false
Expected behavior
obsolete
obsolete flag should be kept pristine when a list of file is supplied to the command lineCode fix proposal
Modify the line at https://github.com/lingui/js-lingui/blob/v4.11.1/packages/cli/src/api/catalog/mergeCatalog.ts#L52
from
obsolete: !options.files,
to...(!options.files && { obsolete: true }),
in order to do nothing on obsolete flags for files not listed on command line.
The text was updated successfully, but these errors were encountered: