|
On 01/15/2011 05:54 AM, [hidden email] wrote:
> Author: mrisaliti > Date: Sat Jan 15 11:54:04 2011 > New Revision: 1059306 > > URL: http://svn.apache.org/viewvc?rev=1059306&view=rev > Log: > Internationalization of ServiceUtil.returnSuccess, ServiceUtil.returnFailure, ServiceUtil.returnError (OFBIZ-4091) > > Modified: > ofbiz/trunk/applications/accounting/config/AccountingErrorUiLabels.xml > ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java > ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java > > Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=1059306&r1=1059305&r2=1059306&view=diff > ============================================================================== > --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java (original) > +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Sat Jan 15 11:54:04 2011 > @@ -144,7 +148,8 @@ public class FinAccountServices { > } > } > if (creditAccount == null) { > - return ServiceUtil.returnError("Could not find or create a service credit account"); > + return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, > + "AccountingFinAccountCannotCreditAccount", locale)); > } > } > Er, isn't the proper formatting to *not* split long lines? Why are you forcing some arbitrary terminal width on the rest of us? There are tons more like this in this patch. When adding new features/code, try to maintain consistent formatting. Follow what is already in the file. In this case, this particular file was not consistent, with regard to long lines. So, the editor is allowed to use whichever form they want, and in that situation, the standard of the project as a whole should be used. Ie, don't split long lines. > @@ -179,12 +184,15 @@ public class FinAccountServices { > GenericValue userLogin = (GenericValue) context.get("userLogin"); > String productStoreId = (String) context.get("productStoreId"); > String finAccountTypeId = (String) context.get("finAccountTypeId"); > + Locale locale = (Locale) context.get("locale"); > > try { > // get the product store id and use it to generate a unique fin account code > GenericValue productStoreFinAccountSetting = delegator.findByPrimaryKeyCache("ProductStoreFinActSetting", UtilMisc.toMap("productStoreId", productStoreId, "finAccountTypeId", finAccountTypeId)); > if (productStoreFinAccountSetting == null) { > - return ServiceUtil.returnError("No settings found for store [" + productStoreId + "] for fin account type [" + finAccountTypeId + "]"); > + return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, > + "AccountingFinAccountSetting", > + UtilMisc.toMap("productStoreId", productStoreId, "finAccountTypeId", finAccountTypeId), locale)); > } > > Long accountCodeLength = productStoreFinAccountSetting.getLong("accountCodeLength"); Another one. Stopping now. |
| Free forum by Nabble | Edit this page |
