On 01/18/2011 12:54 PM, mrisal...@apache.org wrote:
Author: mrisaliti
Date: Tue Jan 18 18:54:55 2011
New Revision: 1060536

URL: http://svn.apache.org/viewvc?rev=1060536&view=rev
Log:
Internationalization of ServiceUtil.returnSuccess, ServiceUtil.returnFailure, 
ServiceUtil.returnError (OFBIZ-4091)

Modified:
     ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
     
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
     
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java

Modified: 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java?rev=1060536&r1=1060535&r2=1060536&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
 (original)
+++ 
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
 Tue Jan 18 18:54:55 2011
@@ -50,7 +50,6 @@ public class SagePayPaymentServices {
      public final static String resource = "AccountingUiLabels";

      private static Map<String, String>  buildCustomerBillingInfo(Map<String, 
Object>  context) {
-
          Debug.logInfo("SagePay - Entered buildCustomerBillingInfo", module);
          Debug.logInfo("SagePay buildCustomerBillingInfo context : " + 
context, module);

@@ -154,11 +153,11 @@ public class SagePayPaymentServices {
          Debug.logInfo("SagePay - Entered ccAuth", module);
          Debug.logInfo("SagePay ccAuth context : " + context, module);
          Map<String, Object>  response = null;
-
-        String orderId = (String) context.get("orderId");
+        Locale locale = (Locale) context.get("locale");
          GenericValue orderPaymentPreference = (GenericValue) 
context.get("orderPaymentPreference");
-        if (null == orderPaymentPreference) {
-            response = ServiceUtil.returnError("OrderPaymentPreference for order : " + 
orderId + " is null : " + orderPaymentPreference);
+        if (orderPaymentPreference == null) {
+            response = 
ServiceUtil.returnError(UtilProperties.getMessage(resource,
+                    "AccountingProblemGettingOrderPaymentPreferences", 
locale));
          } else {
              response = processCardAuthorisationPayment(dctx, context);
          }

Er, the new message does *not* display the $orderId anymore! There could be other cases like this in the rest of the diff.

Plus, you are still splitting overly long lines.

Reply via email to