From 555930ee5b3074e896e4bb77bd107265808834d6 Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Mon, 10 Dec 2012 22:27:19 +0530 Subject: [PATCH] IDEMPIERE-293 Internationlizing messaged on timeout panel --- .../oracle/101212102127_IDEMPIERE-293.sql | 34 +++++++++++++++++++ .../postgresql/101212102127_IDEMPIERE-293.sql | 34 +++++++++++++++++++ .../adempiere/webui/panel/TimeoutPanel.java | 10 ++++-- 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 migration/i1.0a-release/oracle/101212102127_IDEMPIERE-293.sql create mode 100644 migration/i1.0a-release/postgresql/101212102127_IDEMPIERE-293.sql diff --git a/migration/i1.0a-release/oracle/101212102127_IDEMPIERE-293.sql b/migration/i1.0a-release/oracle/101212102127_IDEMPIERE-293.sql new file mode 100644 index 0000000000..421232e1c4 --- /dev/null +++ b/migration/i1.0a-release/oracle/101212102127_IDEMPIERE-293.sql @@ -0,0 +1,34 @@ +-- Dec 10, 2012 10:54:11 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Save Your Work!!',200119,'U','1112b509-9720-48e0-82d1-a1dd3ae6fa8e','killsession.saveWorkMessage','Y',TO_DATE('2012-12-10 10:54:07','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-12-10 10:54:07','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 10:54:12 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200119 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Dec 10, 2012 10:58:29 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Minutes',200120,'U','2d5c7599-a6b9-4473-8b37-ab218b84a8e6','Minutes','Y',TO_DATE('2012-12-10 10:58:28','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-12-10 10:58:28','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 10:58:29 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200120 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Dec 10, 2012 10:58:55 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Seconds',200121,'U','fc766ea7-3c62-4b35-bb55-42bf44c22185','Seconds','Y',TO_DATE('2012-12-10 10:58:53','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-12-10 10:58:53','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 10:58:55 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200121 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Dec 10, 2012 11:01:26 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','You will be logged out in',200122,'U','b31b81ec-39c1-4ac6-b9de-47744d10b7a6','killsession.logoutMessage','Y',TO_DATE('2012-12-10 11:01:25','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-12-10 11:01:25','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 11:01:26 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200122 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('101212102127_IDEMPIERE-293.sql') FROM dual +; diff --git a/migration/i1.0a-release/postgresql/101212102127_IDEMPIERE-293.sql b/migration/i1.0a-release/postgresql/101212102127_IDEMPIERE-293.sql new file mode 100644 index 0000000000..112baecab2 --- /dev/null +++ b/migration/i1.0a-release/postgresql/101212102127_IDEMPIERE-293.sql @@ -0,0 +1,34 @@ +-- Dec 10, 2012 10:54:11 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Save Your Work!!',200119,'U','1112b509-9720-48e0-82d1-a1dd3ae6fa8e','killsession.saveWorkMessage','Y',TO_TIMESTAMP('2012-12-10 10:54:07','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-12-10 10:54:07','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 10:54:12 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200119 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Dec 10, 2012 10:58:29 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Minutes',200120,'U','2d5c7599-a6b9-4473-8b37-ab218b84a8e6','Minutes','Y',TO_TIMESTAMP('2012-12-10 10:58:28','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-12-10 10:58:28','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 10:58:29 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200120 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Dec 10, 2012 10:58:55 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Seconds',200121,'U','fc766ea7-3c62-4b35-bb55-42bf44c22185','Seconds','Y',TO_TIMESTAMP('2012-12-10 10:58:53','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-12-10 10:58:53','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 10:58:55 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200121 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Dec 10, 2012 11:01:26 AM GMT+05:30 +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','You will be logged out in',200122,'U','b31b81ec-39c1-4ac6-b9de-47744d10b7a6','killsession.logoutMessage','Y',TO_TIMESTAMP('2012-12-10 11:01:25','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-12-10 11:01:25','YYYY-MM-DD HH24:MI:SS')) +; + +-- Dec 10, 2012 11:01:26 AM GMT+05:30 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200122 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +SELECT register_migration_script('101212102127_IDEMPIERE-293.sql') FROM dual +; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java index f4eb4cc671..1121fcb1bc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TimeoutPanel.java @@ -15,8 +15,12 @@ package org.adempiere.webui.panel; import org.adempiere.webui.session.SessionManager; +import org.compiere.util.Env; +import org.compiere.util.Msg; import org.zkoss.zhtml.Script; import org.zkoss.zk.ui.Executions; +import org.zkoss.zk.ui.Session; +import org.zkoss.zk.ui.Sessions; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Borderlayout; @@ -67,7 +71,7 @@ public class TimeoutPanel extends Window implements divNorth.setParent(north); divNorth.setStyle("text-align: center;"); - lCaption = new Label("You will be logged out in "); + lCaption = new Label(Msg.getMsg(Env.getCtx(),"killsession.logoutMessage")); lCaption.setParent(divNorth); lCaption.setStyle("text-align: center; font-size: 20px;"); @@ -119,7 +123,7 @@ public class TimeoutPanel extends Window implements ltime.setStyle("text-align: center; font-size: 40px; color:red;"); - Html txtLbl = new Html("Minutes      Second"); + Html txtLbl = new Html(Msg.getMsg(Env.getCtx(),"Minutes")+"      "+Msg.getMsg(Env.getCtx(),"Seconds")); txtLbl.setParent(centerVlayout); txtLbl.setStyle("font-size: 12px;"); @@ -128,7 +132,7 @@ public class TimeoutPanel extends Window implements vLayout.setParent(divSouth); - Label saveLbl = new Label("Save your work!!"); + Label saveLbl = new Label(Msg.getMsg(Env.getCtx(),"killsession.saveWorkMessage")); saveLbl.setParent(vLayout); saveLbl.setStyle("font-size: 20px;");