JavascriptRenderer: Interpolate messages directly

- Interpolate messages directly in functions using sprintf.
- Add additonal interpolation variables in case custom error messages need them