Shopify/batman — Issue #294: Pluralization filter should not print the count
Author: jholster
Created: 2011-12-28 12:31:36+00:00
State: open

Currently the 'pluralize' filter preprends the pluralized word with count. That's a bit naive approach which works in simple cases, but is unflexible in more complicated cases, e.g. when you need to prepend the pluralized word with dynamic content.

Lets assume we want to output a phrase ```Powered by <6> , batteries```, where <> marked strings are dynamic content (data-bindings).

The following approach obviously won't work:

```Powered by , ```

Due to the extra count printed:

"Powered by 6 external, air cooled lithium 6 batteries."

As a solution, I'm proposing that the pluralize filter doesn't automatically add the count to the outputted string. That's how pluralization works e.g. in Django templates.