'Replace the <var> with the correct contents.
This depends upon the contents of the plural() string.
When the argument is a string literal. For example:
<var>plural("string")</var>
Will produce:
strings
When the variable holds a string. For example:
<var>plural(UNIT_TEXT)</var>
Will produce:
<var>plural_form(UNIT_TEXT)</var>
When the variable holds a number. For example:
<var>plural(NUM)</var>
Will produce:
<var>plural_form("", NUM)</var>'

def filter_var(self, match, var_node):

    str_match = _STRING_RE.match(match.group(2))
    if str_match:
        _replace_node(var_node, get_plural_form(str_match.group(1)))
    elif get_is_plural_num(match):
        var_node.text = (self._empty_str_fn % (match.group(1).strip(), match.group(2).strip()))
    else:
        if _check_plural_is_ambiguous(match.group(2)):
            pluralize = 'AMBIGUOUS_PLURAL(%s)'
        else:
            pluralize = self._function_map[match.group(1)]
        var_node.text = (pluralize % match.group(2).strip())
    return True
