Js-lingui: I always get "Missing message ID, skipping." when the id is not filled out

Created on 7 Apr 2020  ยท  2Comments  ยท  Source: lingui/js-lingui

Describe the bug
I tried adding js-lingui to this boilerplate: https://github.com/leebenson/reactql

and right out of the gate, I run into this:

> [email protected] extract /home/capaj/work-repos/4house/4house-fe-web
> lingui extract

Missing message ID, skipping.
<Trans>
        <h3>Top stories from Hacker News</h3>
      </Trans>
Missing message ID, skipping.
<Trans>Hi from ReactQL</Trans>
Catalog statistics:
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Language โ”‚ Total count โ”‚ Missing โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ cs       โ”‚      0      โ”‚    0    โ”‚
โ”‚ en       โ”‚      0      โ”‚    0    โ”‚

To Reproduce
check out: https://github.com/capaj/reactql
and try adding jslingui

Expected behavior
extraction adds <Trans> even whem missing id fields

  • jsLingui version lingui --version: 2.9.1
  • Babel version npm list babel-core: [email protected]
  • Your Babel config (e.g. .babelrc) or framework you use (Create React App, Meteor, etc.)
{
          exclude: /node_modules/,
          test: /\.(j|t)sx?$/i,
          use: [
            {
              loader: 'babel-loader',
              options: {
                cacheDirectory: true,
                presets: ['@babel/typescript', '@babel/react'],
                plugins: [
                  'macros',
                  ['@babel/proposal-class-properties', { loose: true }],
                  '@babel/proposal-object-rest-spread',
                  '@babel/plugin-syntax-dynamic-import',
                  '@babel/plugin-proposal-optional-chaining',
                  'react-hot-loader/babel',
                  'emotion'
                ]
              }
            }
          ]
        }
cannot-replicate

Most helpful comment

I have the same issue , with typescript
Does anyone setup successfully with typescript ?

All 2 comments

I have the same issue , with typescript
Does anyone setup successfully with typescript ?

Hey @capaj, I can't find any mention about Lingui nor i18n in the repo. It must be misconfigured, because I'm not getting similar warnings... Feel free to checkout next-js example in examples/next-js directory. It uses Lingui, Typescript, but with Next.js

Was this page helpful?
0 / 5 - 0 ratings