From 4597f97cf2020f900f36af2867d1129d9bebd54d Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 24 Mar 2017 11:28:36 +0500 Subject: Format speed in notification templates --- src/org/traccar/notification/NotificationFormatter.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/org/traccar/notification/NotificationFormatter.java') diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java index eae2681c9..0f723a5e1 100644 --- a/src/org/traccar/notification/NotificationFormatter.java +++ b/src/org/traccar/notification/NotificationFormatter.java @@ -24,6 +24,7 @@ import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.exception.ResourceNotFoundException; import org.apache.velocity.tools.generic.DateTool; +import org.apache.velocity.tools.generic.NumberTool; import org.traccar.Context; import org.traccar.helper.Log; import org.traccar.model.Device; @@ -51,6 +52,7 @@ public final class NotificationFormatter { } velocityContext.put("webUrl", Context.getVelocityEngine().getProperty("web.url")); velocityContext.put("dateTool", new DateTool()); + velocityContext.put("numberTool", new NumberTool()); velocityContext.put("timezone", ReportUtils.getTimezone(userId)); velocityContext.put("locale", Locale.getDefault()); return velocityContext; -- cgit v1.2.3