react icon indicating copy to clipboard operation
react copied to clipboard

translations

Open PatrikTrefil opened this issue 2 years ago • 3 comments

fixes #522

PatrikTrefil avatar Oct 06 '23 13:10 PatrikTrefil

I do not really undestand how you think this should be implemented. At the level of the FormEdit component, which is the only component that requires the translations, we do not have any of the formiojs components available on which we could call the t() method. Since the t() method is not static, we need an instance to call it on. The instance of the FormBuilder class which is a subclass of the Component class is owned by the underlying FormBuilder react component, so we do not have access to it.

I think the issue is that the translation logic is written in the Component class. There should be a separate class with a singleton instance, which does the translation logic (similar design as the react-i18next library uses). This would require making changes in the formiojs library.

Maybe you have an idea how it should be implemented, but I just don't see it now. Please describe your solution further if you still think your solution is viable.

PatrikTrefil avatar Dec 01 '23 12:12 PatrikTrefil

Any updates on this please?

PatrikTrefil avatar Jan 30 '24 16:01 PatrikTrefil

@PatrikTrefil hey thanks for checking in, I'm actually working (broadly) on this issue now. I should have an alternate implementation hopefully very soon.

brendanbond avatar Jan 30 '24 16:01 brendanbond