Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages extration for translation #51

Open
akellbl4 opened this issue Jan 5, 2021 · 6 comments
Open

Messages extration for translation #51

akellbl4 opened this issue Jan 5, 2021 · 6 comments

Comments

@akellbl4
Copy link
Contributor

akellbl4 commented Jan 5, 2021

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

@pret-a-porter
Copy link
Collaborator

@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
Copy link
Contributor Author

akellbl4 commented Jan 5, 2021

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):

  • Write component with some strings for translate
  • Run script for strings extraction
  • Script extends locale JSON files with new scripts
  • We can translate new strings

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

@akellbl4
Copy link
Contributor Author

akellbl4 commented Jan 5, 2021

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
Copy link
Collaborator

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

@pret-a-porter
Copy link
Collaborator

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

@akellbl4
Copy link
Contributor Author

akellbl4 commented May 5, 2021

@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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants