formatjs / formatjs-old

The monorepo home to all of the FormatJS related libraries.
https://formatjs.io/
156 stars 53 forks source link

Support react-intl-phraseapp for extracting messages #530

Closed BramDecuypere closed 4 years ago

BramDecuypere commented 4 years ago

Which package? formatjs/cli

Is your feature request related to a problem? Please describe. I'm unable to extract the messages from my codebase.

Describe the solution you'd like Extracting to locale files directly instead of an array of files? Or should we do the mapping ourselves? I guess you are checking on a certain package name to be in the folder? Maybe it would be nice to have optional packages? For when people extend the react-intl package like phrase(app).com did?

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

longlho commented 4 years ago

Can you describe your use case in more details pls?

On Wed, Feb 12, 2020 at 8:32 AM Bram Decuypere notifications@github.com wrote:

Which package? formatjs/cli

Is your feature request related to a problem? Please describe. I'm unable to extract the messages from my codebase.

Describe the solution you'd like Extracting to locale files directly instead of an array of files? Or should we do the mapping ourselves? I guess you are checking on a certain package name to be in the folder? Maybe it would be nice to have optional packages? For when people extend the react-intl package like phrase(app).com did?

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/formatjs/formatjs/issues/530?email_source=notifications&email_token=AABQM32Q34B4MC6BOKGQ3GTRCP25VA5CNFSM4KTZ2CP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IM57XJA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQM32NV25JWNIPRGH7FD3RCP25VANCNFSM4KTZ2CPQ .

BramDecuypere commented 4 years ago

Thanks for the amazingly fast response!

I was able to figure it out. This was doing exactly what was expected:

formatjs extract ./src/**/*.{js,jsx} --module-source-name react-intl-phraseapp --out-file ./temp/test.json

Can you describe your use case in more details pls? On Wed, Feb 12, 2020 at 8:32 AM Bram Decuypere @.**> wrote: Which package? formatjs/cli Is your feature request related to a problem? Please describe. I'm unable to extract the messages from my codebase. Describe the solution you'd like Extracting to locale files directly instead of an array of files? Or should we do the mapping ourselves? I guess you are checking on a certain package name to be in the folder? Maybe it would be nice to have optional packages? For when people extend the react-intl package like phrase(app).com did? Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Additional context* Add any other context or screenshots about the feature request here. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#530?email_source=notifications&email_token=AABQM32Q34B4MC6BOKGQ3GTRCP25VA5CNFSM4KTZ2CP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IM57XJA>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQM32NV25JWNIPRGH7FD3RCP25VANCNFSM4KTZ2CPQ .