vue-filter icon indicating copy to clipboard operation
vue-filter copied to clipboard

Feature request: pluralize

Open alfonsobries opened this issue 6 years ago • 1 comments

Pluralize filters:

{{ count | pluralize('comment') }}

Could be simple just add an S at the end, and add optional parameter for custom values like

pluralize(word, [word_in_plural], [word_if_zero])

{{ count | pluralize('comment', 'comments', 'no comments') }}

alfonsobries avatar Jan 24 '19 03:01 alfonsobries

@alfonsobries

This pluralize function may useful in the English world, but I think it is not very common use. I am not sure. Perhaps in the English language environment it is often used.

I recommend you implement this function based on your custom requirement. There are some JavaScript package do this well, and I am not sure I can implement this function well. Sometimes I don't know how to add s , es and y->i + es properly. :(

wy-ei avatar Jan 25 '19 16:01 wy-ei