withLocalization
's getString
API is missing the elems
parameter
#544
Labels
withLocalization
's getString
API is missing the elems
parameter
#544
We are usually using the
Localized
component, but recently I was trying thewithLocalization
'sgetString
API, and it looks like it is the missing theelems
parameter, which is pretty commonly used in Firefox Profiler.Also wiki seems to be missing more advanced usage information. It's not possible to see other parameters here: https://github.com/projectfluent/fluent.js/wiki/withLocalization
So, I tried to check the implementation of getString and realized that it doesn't have a
elems
parameter, like Localized:fluent.js/fluent-react/src/localization.ts
Lines 33 to 52 in a1ac29d
Maybe there can be another way to pass these elements after getting the string, but I don't know how. I think it would be great to have an optional
elems
parameter inside thegetString
directly, so we can add elements directly with that API call.To be clear, we are not blocked on this since
Localized
is fixed now and we can continue using that. But it would be good to have this as well. What do you think?The text was updated successfully, but these errors were encountered: