Open etx121 opened 4 weeks ago
I'm not sure if this is implemented at all. Did you try to pass it ignoring the error?
I just tried, but nothing is working. I tried Claude.ai's suggestion, but I have no idea how the format props work.
My use case is that in the plural, I would like to format the number to look like a local number:
<Plural
value={value} // Pass the number directly
_0="None"
one={
<Trans>
<strong>{i18n.number(value)}</strong> day
</Trans>
}
other={
<Trans>
<strong>{i18n.number(value)}</strong> day
</Trans>
}
/>
But the lingui extract will transform it into:
msgstr "{value, plural, =0 {None} one {<0>{0}</0> day} other {<1>{1}</1> days}}"
instead of
msgstr "{value, plural, =0 {None} one {<0>{value}</0> day} other {<1>{value}</1> days}}"
so it is easier for the translator to understand. Do you think it can be implemented?
I corrected the link in the doc, in my first message: https://lingui.dev/ref/macro#plural-1
Describe the bug I want to use Plural JSX element imported from:
import { Plural } from "@lingui/macro";
In the documentation from the website https://lingui.dev/ref/macro#plural-1, it is reported thatformat
is available. However,PluralChoiceProps
doesn't contain it:Expected behavior
format
to be available in the<Plural>
props4.13.0
4.0.9
@lingui/swc-plugin
babel-macro-plugin