Open fractalf opened 4 years ago
Yeah I currently have an example of this where I'm trying to do:
{hours} hour {minutes} minute left | {hours} hour {minutes} minutes left | {hours} hours {minutes} minute left | {hours} hours {minutes} minutes left
Which is kind of annoying especially considering the fact that we have custom pluralization rules for Russian which makes this even more complex
I've read the docs extensivly looking for this feature, but can't find it.
A lot of times its necessary to have some pluralization only on some parts of a longer text.
Random example of a
text
property:One ... and item were ... and it ... but it could ...
Many ... items were ... and they ... but any of them could ...
To make this work now I would need to
text: 'One ... | Many ...'
which requires a whole lot of duplicate text.Wouldn't this be an elegant way of doing it:
[ One | Many ] ... [ item | items ] were ... and [ it | they ] ... but [ it | any of them ] could ...
The parser would look for
[ <single word> | <plur word> ]
and substitue accordingly. Is this hard to achieve?