This commit adds a better heuristic to detect which Trans component will
be converted to indices by react-i18next (when using
transKeepBasicHtmlNodes which is enabled by default). In particular, if
the node has many children or interpolation, react-i18next ignores the
transKeepBasicHtmlNodes option and converts the node to indices.
Fixes #108
@pcorpet could you have a look? Does this indeed fix #108? It was quite complex to align with every edge-case statically, but this is the best heuristic I could make. I have not been able to fool it so far.
This commit adds a better heuristic to detect which Trans component will be converted to indices by react-i18next (when using transKeepBasicHtmlNodes which is enabled by default). In particular, if the node has many children or interpolation, react-i18next ignores the transKeepBasicHtmlNodes option and converts the node to indices.
Fixes #108
@pcorpet could you have a look? Does this indeed fix #108? It was quite complex to align with every edge-case statically, but this is the best heuristic I could make. I have not been able to fool it so far.