react icon indicating copy to clipboard operation
react copied to clipboard

Translating FormEdit

Open PatrikTrefil opened this issue 2 years ago • 5 comments

Labels in FormEdit such as this one should be passed through i18next to allow for translations. The same goes for placeholder values.

I am willing to make a PR. I just need confirmation that this change is desired.

PatrikTrefil avatar Jul 25 '23 09:07 PatrikTrefil

PRs are welcome, but this library is a wrapper around our core Javascript renderer, any translations (including labels) already occur there. If there's a specific issue you're running into, please provide a minimally reproducible example. Thanks!

brendanbond avatar Jul 25 '23 21:07 brendanbond

The FormEdit component renders a FormBuilder and some extra input fields such as Title, Path, etc. The extra fields can't be translated. As you can see on this line the label has value "Title", which is a string constant rather than something passed through an internalization library.

Minimally reproducible example: User of this library can not translate the label Title, which is rendered by the FormEdit component (this is not handled by the core JS render).

PatrikTrefil avatar Jul 26 '23 13:07 PatrikTrefil

Ah, I see what you mean. Yeah, I'd happily review a PR for this.

brendanbond avatar Jul 26 '23 15:07 brendanbond

Please review the PR I made.

PatrikTrefil avatar Nov 02 '23 12:11 PatrikTrefil

hey @PatrikTrefil see my comments

brendanbond avatar Nov 02 '23 15:11 brendanbond