PLURALIZE

Outputs the singular or plural version of text based on the value of a number.

Syntax 

PLURALIZE(counter, text, [plural_text])

Examples 

Example 1

Input

{
  "my_action": {
    "message": 2
  }
}

Formula

PLURALIZE(my_action.message, "item")

Output

"items"
Example 2

Input

{
  "my_action": {
    "message": 1
  }
}

Formula

PLURALIZE(my_action.message, "item")

Output

"item"
Example 3

For custom pluralization, you can pass a third argument:

Input

{
  "my_action": {
    "message": 5
  }
}

Formula

PLURALIZE(my_action.message, "bonus",  "bonuses")

Output

"bonuses"