django javascript translation with simple interpolation

django, internationalization, interpolation, javascript

Solution

You're missing `true` argument:

var text = interpolate(format, {"count": 5, "total": 10}, true);

Problem

The documentation for javascript translation in django only gives examples of pluralised interpolation. I want to do something simple like below: ``` var format = gettext("Displaying %(count)s / %(total)s") var text = interpolate(format, {"count": 5, "total": 10}) ``` which should set `text` to `Displaying 5 / 10` But this isn't working for me. I get `Displaying %(count)s / %(total)s` as the value for for `text`. Does anyone know how to do this simple sort of interpolation?

Original source