Alarm Journal script get AlarmEvents properties: Label and translated Current State

I'm creating a .txt file via script that contains what is displayed in the Alarm Journal,
this would do:

journallist=system.alarm.queryJournal(parsedDateStart, parsedDateEnd, "HMI_1_alarms")

and I extracted all the values I need from the AlarmEvents, even the eventTime via BasicProperty.

The problem is that:

  • aEvent.getState() gives me the untranslated text
  • aEvent.getLabel() gives me the same value as getName()

even if I can correctly view the Alarm Journal in the client:
. in the Label column I correctly see the static property Label (not the Name),
. in the Display Path property I configured the alarms to see only the name of the folder containing the alarm,
. in the Current State column I translated the four terms to shorten them and I see them translated correctly.

Do you know how could I solve this?

Solution:
to access "Label" I had to add includeData = True in the system.alarm.queryJournal. (Found here.)

To have the text translated I needed to use system.util.translate.