js-lingui icon indicating copy to clipboard operation
js-lingui copied to clipboard

v3: source lang file is not updated during extraction

Open gothy opened this issue 6 years ago • 2 comments

Describe the bug If you've an id for your translation and change the source lang string in the code, it doesn't get updated in the /locale//messages.po file after extract.

To Reproduce Here's a repro repo https://github.com/gothy/lingui-v3-source-issue

  1. Clone and have a look at https://github.com/gothy/lingui-v3-source-issue/blob/master/locale/en/messages.po

  2. Run yarn extractTrans.

  3. The "welcome.title" string is still in /locale/en/messages.po, equal to Welcome to <0>Next.js!</0> the same.

<Trans id="welcome.title">
  Welcome toooo <a href="https://nextjs.org">Next.js!</a>
</Trans>

Expected behavior /pages/index.jsx file should be processed and new message(with "toooo") should be extracted to messages.po file

Additional context Add any other context about the problem here.

  • jsLingui version lingui --version 3.0.0-11
  • Babel version npm list @babel/core @babel/[email protected]
  • Your Babel config (e.g. .babelrc) or framework you use (Create React App, Meteor, etc.)

gothy avatar May 12 '20 21:05 gothy

Have you tried running extract with the Overwrite Flag --overwrite?

pniebrzydowski avatar Sep 30 '20 11:09 pniebrzydowski

You need to use --overwrite flag in that case. Example: 2020-11-05 12 49 54

semoal avatar Nov 05 '20 11:11 semoal