How to translate event types?

Help us to spread the OpenKM word translating the applicacion to your preferrd language.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
Radzik
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Thu May 14, 2015 1:11 pm

How to translate event types?

Post by Radzik » Thu May 14, 2015 1:15 pm

Hi!

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

jllort
Moderator
Moderator
Posts: 9647
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: How to translate event types?

Post by jllort » Sat May 16, 2015 6:49 pm

Sorry, but event types can not be translated, you should modify the source code for it. Really is easy to be done.

Radzik
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Thu May 14, 2015 1:11 pm

Re: How to translate event types?

Post by Radzik » Mon May 18, 2015 7:33 am

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 :)

jllort
Moderator
Moderator
Posts: 9647
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: How to translate event types?

Post by jllort » Wed May 20, 2015 5:46 pm

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/

Radzik
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Thu May 14, 2015 1:11 pm

Re: How to translate event types?

Post by Radzik » Fri May 22, 2015 7:41 am

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:

jllort
Moderator
Moderator
Posts: 9647
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: How to translate event types?

Post by jllort » Sat May 23, 2015 5:21 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest