Page 1 of 1

How to translate event types?

Posted: Thu May 14, 2015 1:15 pm
by Radzik
Hi!

I'd like to translate event types in subscripton messages received by e-mails - how can I do that?

Re: How to translate event types?

Posted: Sat May 16, 2015 6:49 pm
by jllort
Sorry, but event types can not be translated, you should modify the source code for it. Really is easy to be done.

Re: How to translate event types?

Posted: Mon May 18, 2015 7:33 am
by Radzik
To be honest, I have no idea, where to start - I was searching through *.xml and *.jsp files and found nothing. I've also checked "Database query" option and I've only found "OKM_DASHBOARD_ACTIVITY" table with "DAC_ACTION" column, where events were listed, but that table is only the log of dashboard activity, not a table with definitions of event type names itself. Unfortunatelly, I haven't found another table with "DAC_ACTION" or "DAC_ID" columns, so I could try to translate those event type names.

I would be grateful for some tip :)

Re: How to translate event types?

Posted: Wed May 20, 2015 5:46 pm
by jllort
Template is saved at Config.java on variable named SUBSCRIPTION_MESSAGE_SUBJECT ( content is processed by freemarker template engine ).

This var is used at CommonNotificationModule.java on method

Code: Select all

public static void sendMailSubscription(String user, String nodeUuid, String nodePath, String eventType, String comment,
			Set<String> mails) throws TemplateException, MessagingException, IOException 
Into this method you must apply some change here ( your translation should go here, must map our contants to your wished translation ).

Code: Select all

model.put("eventType", eventType);
Some links:
https://sourceforge.net/p/openkm/code/H ... odule.java
http://doxygen.openkm.com/openkm/d0/d9b ... odule.html

Take advantage of our openkm portable dev environement to do the changes : https://sourceforge.net/projects/openkmportabledev/

Re: How to translate event types?

Posted: Fri May 22, 2015 7:41 am
by Radzik
Thank You very much for help!
I've already taken a look at Eclipse and it seems I will have to learn java programming a bit to go further :wink:

Re: How to translate event types?

Posted: Sat May 23, 2015 5:21 pm
by jllort
Yes, you need minimal skills with java & eclipse for playing with OpenKM source code. If you're skilled in other language should not be much difficult to you.