Author: deepak
Date: Sat Sep 3 10:25:14 2016
New Revision: 1759068
URL:
http://svn.apache.org/viewvc?rev=1759068&view=revLog:
(OFBIZ-7998) Applied patch from jira issue
=====================================
Add UI labels for success / error messages in service component
=====================================
Thanks Tanmay for your contribution.
Modified:
ofbiz/trunk/framework/service/config/ServiceErrorUiLabels.xml
ofbiz/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java
Modified: ofbiz/trunk/framework/service/config/ServiceErrorUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/config/ServiceErrorUiLabels.xml?rev=1759068&r1=1759067&r2=1759068&view=diff==============================================================================
--- ofbiz/trunk/framework/service/config/ServiceErrorUiLabels.xml (original)
+++ ofbiz/trunk/framework/service/config/ServiceErrorUiLabels.xml Sat Sep 3 10:25:14 2016
@@ -104,6 +104,9 @@
<value xml:lang="zh">è¿è¡å®ä½èªå¨æä½æ¶åºéï¼å®ä½ ${entityName}ãæå¡ ${serviceName}ï¼${errorString}</value>
<value xml:lang="zh-TW">é²è¡è³æ實é«èªåæä½æåºé¯,è³æå¯¦é« ${entityName}ãæå ${serviceName}:${errorString}</value>
</property>
+ <property key="ServiceExceptionThrownWhileGettingServiceConfiguration">
+ <value xml:lang="en">Exception thrown while getting service configuration: ${errorString}</value>
+ </property>
<property key="ServiceParameterValueNotValid">
<value xml:lang="en">The ID value in the parameter ${parameterName} was not valid: ${errorDetails}</value>
<value xml:lang="it">Il valore ID nel parametro ${parameterName} non è valido: ${errorDetails}</value>
Modified: ofbiz/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java?rev=1759068&r1=1759067&r2=1759068&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java Sat Sep 3 10:25:14 2016
@@ -372,6 +372,7 @@ public final class ServiceUtil {
}
public static Map<String, Object> purgeOldJobs(DispatchContext dctx, Map<String, ? extends Object> context) {
+ Locale locale = (Locale)context.get("locale");
Debug.logWarning("purgeOldJobs service invoked. This service is obsolete - the Job Scheduler will purge old jobs automatically.", module);
String sendPool = null;
Calendar cal = Calendar.getInstance();
@@ -381,7 +382,7 @@ public final class ServiceUtil {
cal.add(Calendar.DAY_OF_YEAR, -daysToKeep);
} catch (GenericConfigException e) {
Debug.logWarning(e, "Exception thrown while getting service configuration: ", module);
- return returnError("Exception thrown while getting service configuration: " + e);
+ return returnError(UtilProperties.getMessage(ServiceUtil.resource, "ServiceExceptionThrownWhileGettingServiceConfiguration", UtilMisc.toMap("errorString", e), locale));
}
Delegator delegator = dctx.getDelegator();