-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Thanks for this great plugin! I run into problems with gatsby and TS, any help or pointer would be greatly appreciated.
- version: 4.1.1
nodeversion: 12.4npm(oryarn) version: yarn 1.22.4
Do you want to request a feature or report a bug?: bug
What is the current behavior?:
I import defineMessages from gatsby-plugin-intl, not from react-intl.
When running
extract-messages -l=en,fr -o src/intl -d en --flat false './src/pages/**/!(*.test).tsx'on a page containing:
import { useIntl, FormattedMessage, defineMessages } from "gatsby-plugin-intl";
const intl = useIntl();
const messages = defineMessages({
description: {
id: "about.description",
defaultMessage: "this description isn't picked up",
values: {
newline: <br />,
},
},
});
return (
<h1 className="title">
{intl.formatMessage({
id: "about.title",
defaultMessage: "About me",
})}
</h1>
<FormattedMessage {...messages.description} />
)it detects and generates only the title, not the description message:
// en.js
{
"about": {
"title": "About me"
}
}What is the expected behavior?:
I would expect:
// en.js
{
"about": {
"title": "About me",
"description": "this description isn't picked up",
}
}Metadata
Metadata
Assignees
Labels
No labels