eo-locale
eo-locale copied to clipboard
Messages extration for translation
How I could extract dictionary with all messages for translation?
I mean something like formatjs extract
@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?
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
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
Cool! If you need some help, let me know.
Hi @akellbl4! How is your progress? If you are still interesting to use eo-locale in Remark42 I can make PR.
@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 ;)