Author: deepak
Date: Sat Sep 3 12:22:15 2016 New Revision: 1759083 URL: http://svn.apache.org/viewvc?rev=1759083&view=rev Log: (OFBIZ-7993) Applied patch from jira issue ===================================== Add UI labels for success / error messages in oagis component ===================================== Thanks Tanmay for your contribution. Modified: ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java Modified: ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml?rev=1759083&r1=1759082&r2=1759083&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml (original) +++ ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.xml Sat Sep 3 12:22:15 2016 @@ -337,6 +337,9 @@ <value xml:lang="zh">æ§è¡éè´§æ è¯ï¼returnIdï¼${returnId}ã订åæ è¯ï¼orderIdï¼${orderId}çæéæ¶æ¯${omiPkMap}æ¶åçç³»ç»é误</value> <value xml:lang="zh-TW">å·è¡é貨èå¥(returnId)${returnId}ãè¨å®èå¥(orderId)${orderId}çæéè¨æ¯${omiPkMap}æç¼ç系統é¯èª¤</value> </property> + <property key="OagisFoundBusinessLevelErrorsInMessageProcessing"> + <value xml:lang="en">Found business level errors in message processing, not saving results; first error is: </value> + </property> <property key="OagisFoundExistingMessage"> <value xml:lang="en">Found existing message info(s) in OAGMP_OGEN_SUCCESS, so not sending Process Shipment message for order ${orderId} existing message(s) are: </value> <value xml:lang="it">Trovati informazioni messaggi esistenti in OAGMP_OGEN_SUCCESS, così nessun messaggio inviato Process Shipment message per l'ordine ${orderId} messaggi esistenti sono: </value> @@ -527,6 +530,12 @@ <value xml:lang="zh">æ°éå·®å¼</value> <value xml:lang="zh-TW">æ¸éå·®ç°</value> </property> + <property key="OagisSystemErrorProcessingAcknowledgeDeliveryRMAMessage"> + <value xml:lang="en">System Error processing Acknowledge Delivery RMA message for message [${omiPkMap}]: </value> + </property> + <property key="OagisSystemErrorProcessingAcknowledgeDeliveryStatusMssage"> + <value xml:lang="en">System Error processing Acknowledge Delivery Status message for message [${omiPkMap}]: </value> + </property> <property key="PageTitleOagisInventoryMismatchNotice"> <value xml:lang="en">Inventory Mismatch Notice</value> <value xml:lang="fr">Notice de disparité de stock</value> Modified: ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java?rev=1759083&r1=1759082&r2=1759083&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java (original) +++ ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisInventoryServices.java Sat Sep 3 12:22:15 2016 @@ -1060,7 +1060,7 @@ public class OagisInventoryServices { } } } catch (Throwable t) { - String errMsg = "System Error processing Acknowledge Delivery RMA message for message [" + omiPkMap + "]: " + t.toString(); + String errMsg = UtilProperties.getMessage(resource, "OagisSystemErrorProcessingAcknowledgeDeliveryRMAMessage", UtilMisc.toMap("omiPkMap", omiPkMap), locale) + t.toString(); errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); try { @@ -1127,7 +1127,7 @@ public class OagisInventoryServices { String errMsg = "Error sending Confirm BOD: " + e.toString(); Debug.logError(e, errMsg, module); } - String errMsg = "Found business level errors in message processing, not saving results; first error is: " + errorMapList.get(0); + String errMsg = UtilProperties.getMessage(resource, "OagisFoundBusinessLevelErrorsInMessageProcessing", locale) + errorMapList.get(0); // return success here so that the message won't be retried and the Confirm BOD, etc won't be sent multiple times result.putAll(ServiceUtil.returnSuccess(errMsg)); @@ -1394,7 +1394,7 @@ public class OagisInventoryServices { } } } catch (Throwable t) { - String errMsg = "System Error processing Acknowledge Delivery Status message for message [" + omiPkMap + "]: " + t.toString(); + String errMsg = UtilProperties.getMessage(resource, "OagisSystemErrorProcessingAcknowledgeDeliveryStatusMssage", UtilMisc.toMap("omiPkMap", omiPkMap), locale) + t.toString(); errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SystemError")); try { @@ -1453,7 +1453,7 @@ public class OagisInventoryServices { Debug.logError(e, errMsg, module); } - String errMsg = "Found business level errors in message processing, not saving results; first error is: " + errorMapList.get(0); + String errMsg = UtilProperties.getMessage(resource, "OagisFoundBusinessLevelErrorsInMessageProcessing", locale) + errorMapList.get(0); // return success here so that the message won't be retried and the Confirm BOD, etc won't be sent multiple times result.putAll(ServiceUtil.returnSuccess(errMsg)); Modified: ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java?rev=1759083&r1=1759082&r2=1759083&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java (original) +++ ofbiz/trunk/specialpurpose/oagis/src/main/java/org/apache/ofbiz/oagis/OagisServices.java Sat Sep 3 12:22:15 2016 @@ -556,7 +556,7 @@ public class OagisServices { // there was an error last time, tell the service this is a retry messageProcessContext.put("isErrorRetry", Boolean.TRUE); } else { - String responseMsg = "Message already received with ID: " + oagisMessageInfoKey; + String responseMsg = UtilProperties.getMessage(resource, "OagisMessageAlreadyReceived", UtilMisc.toMap("newEntity", oagisMessageInfoKey), locale); Debug.logError(responseMsg, module); List<Map<String, String>> errorMapList = UtilMisc.toList(UtilMisc.<String, String>toMap("reasonCode", "MessageAlreadyReceived", "description", responseMsg)); |
Free forum by Nabble | Edit this page |