eo-locale icon indicating copy to clipboard operation
eo-locale copied to clipboard

Messages extration for translation

Open akellbl4 opened this issue 4 years ago ā€¢ 6 comments

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

akellbl4 avatar Jan 05 '21 15:01 akellbl4

@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?

pret-a-porter avatar Jan 05 '21 15:01 pret-a-porter

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 avatar Jan 05 '21 15:01 akellbl4

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

akellbl4 avatar Jan 05 '21 16:01 akellbl4

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

pret-a-porter avatar Jan 07 '21 09:01 pret-a-porter

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

pret-a-porter avatar May 05 '21 12:05 pret-a-porter

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

akellbl4 avatar May 05 '21 12:05 akellbl4