svn commit: r1759067 - in /ofbiz/trunk/applications/workeffort: config/WorkEffortUiLabels.xml src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1759067 - in /ofbiz/trunk/applications/workeffort: config/WorkEffortUiLabels.xml src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java

Deepak Dixit-5
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);
         }