Author: deepak
Date: Sat Sep 3 10:19:36 2016 New Revision: 1759067 URL: http://svn.apache.org/viewvc?rev=1759067&view=rev Log: (OFBIZ-7999) Applied patch from jira issue ===================================== Add UI labels for success / error messages in workeffort component ===================================== Thanks Tanmay for your contribution. Modified: ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java Modified: ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml?rev=1759067&r1=1759066&r2=1759067&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml (original) +++ ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml Sat Sep 3 10:19:36 2016 @@ -2633,6 +2633,12 @@ <value xml:lang="zh">é误:ä½ æ²¡ææµè§è¿ä¸ªäºä»¶çæéãè¿ä¸ªäºä»¶å¿ é¡»å±äºä½ æè ä½ å¿ é¡»æ¯ä¸ä¸ªç®¡çå</value> <value xml:lang="zh-TW">é¯èª¤:ä½ æ²æ檢è¦éåäºä»¶çæ¬é.éåäºä»¶å¿ é 屬æ¼ä½ æè ä½ å¿ é æ¯ä¸å管çè </value> </property> + <property key="WorkeffortErrorWhileCreatingServiceMapForService"> + <value xml:lang="en">Error while creating service Map for service : ${serviceName}</value> + </property> + <property key="WorkeffortErrorWhileInvokingService"> + <value xml:lang="en">Error while invoking service : ${serviceName}</value> + </property> <property key="WorkEffortEstBudget"> <value xml:lang="en">Est.Budget</value> <value xml:lang="es">Presupuesto estimado</value> Modified: ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java?rev=1759067&r1=1759066&r2=1759067&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java (original) +++ ofbiz/trunk/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java Sat Sep 3 10:19:36 2016 @@ -463,6 +463,7 @@ public class ICalConverter { protected static Map<String, Object> invokeService(String serviceName, Map<String, ? extends Object> serviceMap, Map<String, Object> context) { LocalDispatcher dispatcher = (LocalDispatcher) context.get("dispatcher"); + Locale locale = (Locale) context.get("locale"); Map<String, Object> localMap = new HashMap<String, Object>(); try { ModelService modelService = null; @@ -477,7 +478,7 @@ public class ICalConverter { } } } catch (Exception e) { - String errMsg = "Error while creating service Map for service " + serviceName + ": "; + String errMsg = UtilProperties.getMessage("WorkEffortUiLabels", "WorkeffortErrorWhileCreatingServiceMapForService", UtilMisc.toMap("serviceName", serviceName), locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg + e); } @@ -488,7 +489,7 @@ public class ICalConverter { try { return dispatcher.runSync(serviceName, localMap); } catch (GenericServiceException e) { - String errMsg = "Error while invoking service " + serviceName + ": "; + String errMsg = UtilProperties.getMessage("WorkEffortUiLabels", "WorkeffortErrorWhileInvokingService", UtilMisc.toMap("serviceName", serviceName), locale); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg + e); } |
Free forum by Nabble | Edit this page |