Questions tagged [babel-plugin-react-intl]

Extracts string messages from React components that use React Intl

Extracts string messages for translation from modules that use React Intl.

https://github.com/yahoo/babel-plugin-react-intl

23 questions
1
vote
1 answer

How to process/concatenate react-intl message with an EL expression?

This code works: import { MessageResource } from 'react-intl' . . . {} For ex: if gives string…
1
vote
3 answers

Why does defineMessages from react-intl throw an error when passing in a object reference?

I am trying to get my head around react-intl from the Yahoo! i18n project and I am running into a weird issue. My goal is to store the base string (English) in some sort of JSON files outside the components so they can be edited by non-devs. It…
Jazzy
  • 6,029
  • 11
  • 50
  • 74
1
vote
2 answers

What are advantages of using babel-plugin-react-intl?

I've been trying to learn and understand react-intl library and I encountered babel-plugin-react-intl library. There is a description in the library's page like that; Extracts string messages for translation from modules that use React Intl. I…
efkan
  • 12,991
  • 6
  • 73
  • 106
0
votes
1 answer

FormatJS CLI Extract

I'm trying to get formatjs setup for use with my app which uses react-intl, and i'm running into an issue when doing an extract using their CLI. I currently have custom components that embed the FormattedMessage component inside of them,…
smb
  • 539
  • 2
  • 13
  • 33
0
votes
1 answer

how to dynamically import languages files data into my APP.js using react_intl

i need to import the data of my selected language in index.js to app.js My index.js import { IntlProvider, addLocaleData } from 'react-intl' import en from 'react-intl/locale-data/en' import fr from 'react-intl/locale-data/fr' import english from…
0
votes
1 answer

babel-plugin-react-intl - Plugin doesn't seem to do anything

I have installed the babel-plugin-react-intl plugin, and added this to my .babelrc file. I m trying to get the extract messages from my jsx files. My component sources are in ./src { "presets": [ "es2015", "react", "stage-0" ], …
0
votes
1 answer

yahoo/babel-plugin-react-intl evaluates .native.js file extensions

Should the yahoo/babel-plugin-react-intl plugin be able to evaluate files that have the extension .native.js in a react-native project? When I console log the files that are evaluated, all the .jsx and .js files in my project are correctly evaluated…
0
votes
1 answer

How to load babel-plugin-react-intl using babel-loader?

I recently initialized a react app using create-react-app. I ejected the app and I now have all the files exported to my main directory. This set up creates a babel.dev.js instead of using .babelrc (it uses babel-loader). I am trying to figure out…
Stephani Bishop
  • 1,261
  • 1
  • 13
  • 20
1
2