No messages extracted outside of react
See original GitHub issueNo messages get extracted when using:
import i18n from './utils/i18n'
import {t} from '@lingui/macro';
i18n._(t`hello`)
They get extracted when using it like:
i18n._("hello")
They also get extracted as expected when using a react component:
import {Trans} from '@lingui/react';
<Trans>Hello</Trans>
any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Comments:47 (18 by maintainers)
Top Results From Across the Web
No messages returned when running formatjs extract on ...
Now, whenever I run the script for extraction ( messages:extract ) all I get is an empty json object. Any ideas if I'm...
Read more >Internationalize your React App In 5 Easy Steps With React Intl
Use the <FormattedMessage> component with the ID of the internationalized message to get the message based on the currently selected locale; Run ...
Read more >Internationalize your React App with React Intl - bene : studio
The purpose of extracting messages is to make the development faster and increase the readability of the code. It will be faster because...
Read more >Testing Recipes - React
Testing Recipes. Common testing patterns for React components. Note: This page assumes you're using Jest as a test runner.
Read more >React internationalization with react-intl - Localizely
Message extraction. While it is good to start with internationalization from the very beginning of the app development, it is not always ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They get merged by locale internally, you have more information in lingui website on configuration section.
Tomorrow I’ll expand this a lit
I just tried changing my .linguirc to:
Adding “macros” it now extracts the message with both <Trans/> from marcos, and i18n._(t`…`), but doesn’t translate it