ibitcy / eo-locale

🌏Internationalize React apps 👔Elegant lightweight library based on Internationalization API
https://eo-locale.netlify.com/
MIT License
348 stars 12 forks source link

Messages extration for translation #51

Open akellbl4 opened 3 years ago

akellbl4 commented 3 years ago

How I could extract dictionary with all messages for translation? I mean something like formatjs extract

pret-a-porter commented 3 years ago

@akellbl4 Right now no such functionality. If you need it, I can implement it. Please, describe more detail, how do you want to use it?

akellbl4 commented 3 years ago

I'm looking for a replacement for react-intl. Now we use it in Remark42. Workflow for extraction looks like this (in general the same as formatjs extract do):

I can help with it. We just need to find out how to do it. Maybe it's possible to tweek formatjs

akellbl4 commented 3 years ago

Okay, sorry for interaction, I can do it with formatjs It could be solved by specifying custom Component/function names. https://formatjs.io/docs/tooling/cli#--additional-component-names-comma-separated-names https://formatjs.io/docs/tooling/cli#--additional-function-names-comma-separated-names

Maybe it could be great to write about it in docs. I will write if everything work well with formatjs

pret-a-porter commented 3 years ago

Cool! If you need some help, let me know.

pret-a-porter commented 3 years ago

Hi @akellbl4! How is your progress? If you are still interesting to use eo-locale in Remark42 I can make PR.

akellbl4 commented 3 years ago

@pret-a-porter hi, can't find much time for it because the task is large. We have an issue in Remark42 repo. I would be happy if you make a PR on it. Thank you ;)