Which type on notification are we talking about?
Alarm type notification. Every alarm notification has a subtype, and this subtype string is like I posted before.
#set($subject = "$device.name: alarm!")
$device.name alarm: $position.getString("alarm") at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone)
$position.getString("alarm")
prints 'powerCut' in both short and full versions.
Currently we don't localize it, but you can update the template to localize the value.
Do you mean with ifs and elses?
Yes.
#set($subject = "$device.name: alarm!")
#if( $position.getString("alarm") == "general" )
#set($alarma = "General")
#elseif( $position.getString("alarm") == "sos" )
#set($alarma = "SOS")
#elseif( $position.getString("alarm") == "vibration" )
#set($alarma = "Vibracion")
.
.
.
#else
#set($alarma = "No Definida")
#end
$device.name alarma: $alarma a las $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.eventTime, $locale, $timezone)
I edited alarm.vm that way and it works fine.
Regards
I noticed the type of the alarm in notification messages come as raw strings like 'powerCut' instead of 'Power Cut'. Is this expected?
Does the server has a main language that could be used to translate the alert types using the localization resources already used for the GUI?