svn commit: r1759069 - in /ofbiz/trunk/applications/party: config/PartyErrorUiLabels.xml config/PartyUiLabels.xml src/main/java/org/apache/ofbiz/party/party/PartyServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1759069 - in /ofbiz/trunk/applications/party: config/PartyErrorUiLabels.xml config/PartyUiLabels.xml src/main/java/org/apache/ofbiz/party/party/PartyServices.java

Deepak Dixit-5
Author: deepak
Date: Sat Sep  3 10:36:56 2016
New Revision: 1759069

URL: http://svn.apache.org/viewvc?rev=1759069&view=rev
Log:
(OFBIZ-7996) Applied patch from jira issue
=====================================
Add UI labels for success / error messages in party component
=====================================
Thanks Tanmay for your contribution.

Modified:
    ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java

Modified: ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml?rev=1759069&r1=1759068&r2=1759069&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyErrorUiLabels.xml Sat Sep  3 10:36:56 2016
@@ -1182,6 +1182,9 @@
         <value xml:lang="vi">Lỗi phân quyền: để thá»±c thi ${resourceDescription} bạn cần có quyền PARTYMGR_CREATE hoặc PARTYMGR_UPDATE</value>
         <value xml:lang="zh">系统错误:要运行${resourceDescription},你必须有 PARTYMGR_CREATE 或 PARTYMGR_UPDATE 权限</value>
     </property>
+    <property key="PartyUploadedFileDataNotFound">
+        <value xml:lang="en">Uploaded file data not found</value>
+    </property>
     <property key="person.create.db_error">
         <value xml:lang="de">Kann Informationen zur Person nicht hinzufügen (Schreibfehler): ${0}</value>
         <value xml:lang="en">Could not add person info (write failure): ${0}</value>

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=1759069&r1=1759068&r2=1759069&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Sat Sep  3 10:36:56 2016
@@ -9096,6 +9096,9 @@
         <value xml:lang="zh">新建内部便笺</value>
         <value xml:lang="zh-TW">新建內部便箋</value>
     </property>
+    <property key="PartyNewPartiesCreated">
+        <value xml:lang="en">${partiesCreated} new parties created"</value>
+    </property>
     <property key="PartyNewPassword">
         <value xml:lang="ar">كلمة سر جديدة</value>
         <value xml:lang="cs">Nové heslo</value>

Modified: ofbiz/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java?rev=1759069&r1=1759068&r2=1759069&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java Sat Sep  3 10:36:56 2016
@@ -2299,6 +2299,7 @@ public class PartyServices {
     public static Map<String, Object> importParty(DispatchContext dctx, Map<String, Object> context) {
         Delegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
+        Locale locale = (Locale) context.get("locale");
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         ByteBuffer fileBytes = (ByteBuffer) context.get("uploadedFile");
         String encoding = System.getProperty("file.encoding");
@@ -2333,7 +2334,7 @@ public class PartyServices {
         Boolean addParty = false; // when modify party, contact mech not added again
         
         if (fileBytes == null) {
-            return ServiceUtil.returnError("Uploaded file data not found");
+            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "PartyUploadedFileDataNotFound", locale));
         }
         
         try {
@@ -2645,7 +2646,7 @@ public class PartyServices {
             return ServiceUtil.returnError(errMsgs);
         }
 
-        result = ServiceUtil.returnSuccess(partiesCreated + " new parties created");
+        result = ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "PartyNewPartiesCreated", UtilMisc.toMap("partiesCreated", partiesCreated), locale));
         return result;
     }
 }