From ec9bb43b817e6eebca9c9edd17ef08d1dfbf90c2 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 22 Nov 2013 09:59:26 -0500 Subject: [PATCH 1/4] IDEMPIERE-1541 missing translation - mini calendar - more / Thanks to Heng Sin --- migration/i2.0/oracle/201311201053_IDEMPIERE-1541.sql | 11 +++++++++++ .../i2.0/postgresql/201311201053_IDEMPIERE-1541.sql | 8 ++++++++ .../src/org/adempiere/webui/AdempiereWebUI.java | 11 +++++++++++ .../theme/default/zul/calendar/calendar.zul | 2 +- .../theme/default/zul/calendar/calendar_mini.zul | 2 +- 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 migration/i2.0/oracle/201311201053_IDEMPIERE-1541.sql create mode 100644 migration/i2.0/postgresql/201311201053_IDEMPIERE-1541.sql diff --git a/migration/i2.0/oracle/201311201053_IDEMPIERE-1541.sql b/migration/i2.0/oracle/201311201053_IDEMPIERE-1541.sql new file mode 100644 index 0000000000..6810dc2cf4 --- /dev/null +++ b/migration/i2.0/oracle/201311201053_IDEMPIERE-1541.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- 20/11/2013 10:53:00 AM COT +-- IDEMPIERE-1541 missing translation - mini calendar - more +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','more',200239,'D','ce211d63-ece3-4ac8-bd30-c2d3456527c0','more','Y',TO_DATE('2013-11-20 10:52:59','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-11-20 10:52:59','YYYY-MM-DD HH24:MI:SS'),0) +; + +SELECT register_migration_script('201311201053_IDEMPIERE-1541.sql') FROM dual +; + diff --git a/migration/i2.0/postgresql/201311201053_IDEMPIERE-1541.sql b/migration/i2.0/postgresql/201311201053_IDEMPIERE-1541.sql new file mode 100644 index 0000000000..69e9bf2202 --- /dev/null +++ b/migration/i2.0/postgresql/201311201053_IDEMPIERE-1541.sql @@ -0,0 +1,8 @@ +-- 20/11/2013 10:53:00 AM COT +-- IDEMPIERE-1541 missing translation - mini calendar - more +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','more',200239,'D','ce211d63-ece3-4ac8-bd30-c2d3456527c0','more','Y',TO_TIMESTAMP('2013-11-20 10:52:59','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-11-20 10:52:59','YYYY-MM-DD HH24:MI:SS'),0) +; + +SELECT register_migration_script('201311201053_IDEMPIERE-1541.sql') FROM dual +; + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java index 02578ce7a2..c3becb9d01 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java @@ -47,6 +47,7 @@ import org.compiere.model.MUser; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Language; +import org.compiere.util.Msg; import org.zkforge.keylistener.Keylistener; import org.zkoss.web.Attributes; import org.zkoss.web.servlet.Servlets; @@ -197,6 +198,16 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb Env.verifyLanguage(ctx, language); Env.setContext(ctx, Env.LANGUAGE, language.getAD_Language()); //Bug + StringBuilder calendarMsgScript = new StringBuilder(); + String monthMore = Msg.getMsg(ctx,"more"); + String dayMore = Msg.getMsg(ctx,"more"); + calendarMsgScript.append("function _overrideMsgCal() { msgcal.monthMORE = '+{0} ") + .append(monthMore).append("';"); + calendarMsgScript.append("msgcal.dayMORE = '+{0} ") + .append(dayMore).append("'; }"); + AuScript auscript = new AuScript(calendarMsgScript.toString()); + Clients.response(auscript); + // Create adempiere Session - user id in ctx Session currSess = Executions.getCurrent().getDesktop().getSession(); HttpSession httpSess = (HttpSession) currSess.getNativeSession(); diff --git a/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.zul b/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.zul index 4d3c032d2f..688148d888 100644 --- a/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.zul +++ b/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.zul @@ -21,7 +21,7 @@