I've added a simple "Global: Math Expression" field to my view. All it does is subtract one integer from another (using field replacement tokens) and displays the result. I checked the 'Format plural' checkbox and wrote in my singular and plural text. However, for both 1 and @count strings, no rewriting of the value was done. It always just displayed the number calculated without any of my format_plural() text.

Attached patch fixes this issue.

CommentFileSizeAuthor
#1 math_expression_format_plural.patch690 bytesstella
1294588.patch14.54 KBstella

Comments

stella’s picture

StatusFileSize
new690 bytes

actually small patch re-roll to allow the "no results behaviour" to kick in if "Count the number 0 as empty" option is enabled.

dawehner’s picture

Status: Needs review » Fixed
Issue tags: +dvcs11

Thanks! Committed to 7.x-3.x and 6.x-3.x

Automatically closed -- issue fixed for 2 weeks with no activity.