Author: jleroux
Date: Wed Mar 4 15:18:08 2009 New Revision: 750045 URL: http://svn.apache.org/viewvc?rev=750045&view=rev Log: More consistent Modified: ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java Modified: ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml?rev=750045&r1=750044&r2=750045&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml Wed Mar 4 15:18:08 2009 @@ -19,31 +19,31 @@ under the License. --> <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <property key="ImageTransform.error_occurs_during_writing"> + <property key="ScaleImage.error_occurs_during_writing"> <value xml:lang="en">An error occurs during writing</value> <value xml:lang="fr">Une erreur est survenue lors de l'écriture</value> </property> - <property key="ImageTransform.one_current_image_dimension_is_null"> + <property key="ScaleImage.one_current_image_dimension_is_null"> <value xml:lang="en">One current image dimension is null</value> <value xml:lang="fr">Une des dimensions de l'image courrante est nulle</value> </property> - <property key="ImageTransform.one_parameter_is_null"> + <property key="ScaleImage.one_parameter_is_null"> <value xml:lang="en">One parameter is null</value> <value xml:lang="fr">Un des paramètres est nul</value> </property> - <property key="ImageTransform.transform_is_non_invertible"> + <property key="ScaleImage.transform_is_non_invertible"> <value xml:lang="en">Transform is non-invertible</value> <value xml:lang="fr">La transformation n'est pas réversible</value> </property> - <property key="ImageTransform.unable_to_create_target_directory"> + <property key="ScaleImage.unable_to_create_target_directory"> <value xml:lang="en">Unable to create target directory</value> <value xml:lang="fr">Impossible de créer le dossier cible</value> </property> - <property key="ImageTransform.unable_to_parse"> + <property key="ScaleImage.unable_to_parse"> <value xml:lang="en">Unable to parse</value> <value xml:lang="fr">Impossible d'analyser</value> </property> - <property key="ImageTransform.unable_to_scale_original_image"> + <property key="ScaleImage.unable_to_scale_original_image"> <value xml:lang="en">Unable to scale original image</value> <value xml:lang="fr">Impossible de redimensionner l'image originale</value> </property> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java?rev=750045&r1=750044&r2=750045&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/image/ScaleImage.java Wed Mar 4 15:18:08 2009 @@ -93,7 +93,7 @@ if(resultXMLMap.containsKey("responseMessage") && resultXMLMap.get("responseMessage").equals("success")) { imgPropertyMap.putAll((Map<String, Map<String, String>>) resultXMLMap.get("xml")); } else { - String errMsg = UtilProperties.getMessage(resource, "ImageTransform.unable_to_parse", locale) + " : ImageProperties.xml"; + String errMsg = UtilProperties.getMessage(resource, "ScaleImage.unable_to_parse", locale) + " : ImageProperties.xml"; Debug.logError(errMsg, module); result.put("errorMessage", errMsg); return result; @@ -139,7 +139,7 @@ imgHeight = (double) bufImg.getHeight(); imgWidth = (double) bufImg.getWidth(); if (imgHeight == 0.0 || imgWidth == 0.0) { - String errMsg = UtilProperties.getMessage(resource, "ImageTransform.one_current_image_dimension_is_null", locale) + " : imgHeight = " + imgHeight + " ; imgWidth = " + imgWidth; + String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_current_image_dimension_is_null", locale) + " : imgHeight = " + imgHeight + " ; imgWidth = " + imgWidth; Debug.logError(errMsg, module); result.put("errorMessage", errMsg); return result; @@ -185,7 +185,7 @@ try { op = new AffineTransformOp(tx, rh); } catch(ImagingOpException e) { - String errMsg = UtilProperties.getMessage(resource, "ImageTransform.transform_is_non_invertible", locale) + e.toString(); + String errMsg = UtilProperties.getMessage(resource, "ScaleImage.transform_is_non_invertible", locale) + e.toString(); Debug.logError(errMsg, module); result.put("errorMessage", errMsg); return result; @@ -208,7 +208,7 @@ if (!targetDir.exists()) { boolean created = targetDir.mkdirs(); if (!created) { - String errMsg = UtilProperties.getMessage(resource, "ImageTransform.unable_to_create_target_directory", locale) + " - " + targetDirectory; + String errMsg = UtilProperties.getMessage(resource, "ScaleImage.unable_to_create_target_directory", locale) + " - " + targetDirectory; Debug.logFatal(errMsg, module); return ServiceUtil.returnError(errMsg); } @@ -218,12 +218,12 @@ try { ImageIO.write(op.filter(bufImg, bufNewImg), imgExtension, new File(imageServerPath + "/" + newFilePathPrefix + filenameToUse)); } catch(IllegalArgumentException e) { - String errMsg = UtilProperties.getMessage(resource, "ImageTransform.one_parameter_is_null", locale) + e.toString(); + String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_parameter_is_null", locale) + e.toString(); Debug.logError(errMsg, module); result.put("errorMessage", errMsg); return result; } catch(IOException e) { - String errMsg = UtilProperties.getMessage(resource, "ImageTransform.error_occurs_during_writing", locale) + e.toString(); + String errMsg = UtilProperties.getMessage(resource, "ScaleImage.error_occurs_during_writing", locale) + e.toString(); Debug.logError(errMsg, module); result.put("errorMessage", errMsg); return result; @@ -242,7 +242,7 @@ return result; } else { - String errMsg = UtilProperties.getMessage(resource, "ImageTransform.unable_to_scale_original_image", locale) + " : " + filenameToUse; + String errMsg = UtilProperties.getMessage(resource, "ScaleImage.unable_to_scale_original_image", locale) + " : " + filenameToUse; Debug.logError(errMsg, module); result.put("errorMessage", errMsg); return ServiceUtil.returnError(errMsg); |
Free forum by Nabble | Edit this page |