Re: svn commit: r1759067 - in /ofbiz/trunk/applications/workeffort: config/WorkEffortUiLabels.xml src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java

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

Re: svn commit: r1759067 - in /ofbiz/trunk/applications/workeffort: config/WorkEffortUiLabels.xml src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java

Pierre Smits
Hi Deepak,

Should labels for error messages not go into a ErrorUiLabels.xml file
instead of the UILabels.xml file for field labels?

Best regards,

Pierre Smits

ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Sat, Sep 3, 2016 at 12:19 PM, <[hidden email]> wrote:

> Author: deepak
> Date: Sat Sep  3 10:19:36 2016
> New Revision: 1759067
>
> URL: http://svn.apache.org/viewvc?rev=1759067&view=rev
> Log:
> (OFBIZ-7999) Applied patch from jira issue
> =====================================
> Add UI labels for success / error messages in workeffort component
> =====================================
> Thanks Tanmay for your contribution.
>
> Modified:
>     ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
>     ofbiz/trunk/applications/workeffort/src/main/java/org/
> apache/ofbiz/workeffort/workeffort/ICalConverter.java
>
> Modified: ofbiz/trunk/applications/workeffort/config/
> WorkEffortUiLabels.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/
> workeffort/config/WorkEffortUiLabels.xml?rev=
> 1759067&r1=1759066&r2=1759067&view=diff
> ============================================================
> ==================
> --- ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
> (original)
> +++ ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml Sat
> Sep  3 10:19:36 2016
> @@ -2633,6 +2633,12 @@
>          <value xml:lang="zh">错误:ä½ æ²¡æœ‰æµ è§ˆè¿™ä¸ªäº‹ä»¶çš„æ ƒé™
> ã€‚è¿™ä¸ªäº‹ä»¶å¿…é¡»å±žäºŽä½ æˆ–è€…ä½ å¿…é¡»æ˜¯ä¸€ä¸ªç®¡ç †å‘˜</value>
>          <value xml:lang="zh-TW">錯誤:ä½ æ²’æœ‰æª¢è¦–é€™å€‹äº‹ä»¶çš„æ¬Šé™
> .é€™å€‹äº‹ä»¶å¿…é ˆå±¬æ–¼ä½ æˆ–è€…ä½ å¿…é ˆæ˜¯ä¸€å€‹ç®¡ç †è€…</value>
>      </property>
> +    <property key="WorkeffortErrorWhileCreatingServiceMapForService">
> +        <value xml:lang="en">Error while creating service Map for service
> : ${serviceName}</value>
> +    </property>
> +    <property key="WorkeffortErrorWhileInvokingService">
> +        <value xml:lang="en">Error while invoking service :
> ${serviceName}</value>
> +    </property>
>      <property key="WorkEffortEstBudget">
>          <value xml:lang="en">Est.Budget</value>
>          <value xml:lang="es">Presupuesto estimado</value>
>
> Modified: ofbiz/trunk/applications/workeffort/src/main/java/org/
> apache/ofbiz/workeffort/workeffort/ICalConverter.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/
> workeffort/src/main/java/org/apache/ofbiz/workeffort/
> workeffort/ICalConverter.java?rev=1759067&r1=1759066&r2=1759067&view=diff
> ============================================================
> ==================
> --- ofbiz/trunk/applications/workeffort/src/main/java/org/
> apache/ofbiz/workeffort/workeffort/ICalConverter.java (original)
> +++ ofbiz/trunk/applications/workeffort/src/main/java/org/
> apache/ofbiz/workeffort/workeffort/ICalConverter.java Sat Sep  3 10:19:36
> 2016
> @@ -463,6 +463,7 @@ public class ICalConverter {
>
>      protected static Map<String, Object> invokeService(String
> serviceName, Map<String, ? extends Object> serviceMap, Map<String, Object>
> context) {
>          LocalDispatcher dispatcher = (LocalDispatcher)
> context.get("dispatcher");
> +        Locale locale = (Locale) context.get("locale");
>          Map<String, Object> localMap = new HashMap<String, Object>();
>          try {
>              ModelService modelService = null;
> @@ -477,7 +478,7 @@ public class ICalConverter {
>                  }
>              }
>          } catch (Exception e) {
> -            String errMsg = "Error while creating service Map for service
> " + serviceName + ": ";
> +            String errMsg = UtilProperties.getMessage("WorkEffortUiLabels",
> "WorkeffortErrorWhileCreatingServiceMapForService",
> UtilMisc.toMap("serviceName", serviceName), locale);
>              Debug.logError(e, errMsg, module);
>              return ServiceUtil.returnError(errMsg + e);
>          }
> @@ -488,7 +489,7 @@ public class ICalConverter {
>          try {
>              return dispatcher.runSync(serviceName, localMap);
>          } catch (GenericServiceException e) {
> -            String errMsg = "Error while invoking service " + serviceName
> + ": ";
> +            String errMsg = UtilProperties.getMessage("WorkEffortUiLabels",
> "WorkeffortErrorWhileInvokingService", UtilMisc.toMap("serviceName",
> serviceName), locale);
>              Debug.logError(e, errMsg, module);
>              return ServiceUtil.returnError(errMsg + e);
>          }
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1759067 - in /ofbiz/trunk/applications/workeffort: config/WorkEffortUiLabels.xml src/main/java/org/apache/ofbiz/workeffort/workeffort/ICalConverter.java

Deepak Dixit-3
Thanks Pierre for review,

For workEffort we don't have error UiLabel file and I thought its not good
idea to create new UiLabel file for an single UiLabel :)

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Sat, Sep 3, 2016 at 4:01 PM, Pierre Smits <[hidden email]> wrote:

> Hi Deepak,
>
> Should labels for error messages not go into a ErrorUiLabels.xml file
> instead of the UILabels.xml file for field labels?
>
> Best regards,
>
> Pierre Smits
>
> ORRTIZ.COM <http://www.orrtiz.com>
> OFBiz based solutions & services
>
> OFBiz Extensions Marketplace
> http://oem.ofbizci.net/oci-2/
>
> On Sat, Sep 3, 2016 at 12:19 PM, <[hidden email]> wrote:
>
> > Author: deepak
> > Date: Sat Sep  3 10:19:36 2016
> > New Revision: 1759067
> >
> > URL: http://svn.apache.org/viewvc?rev=1759067&view=rev
> > Log:
> > (OFBIZ-7999) Applied patch from jira issue
> > =====================================
> > Add UI labels for success / error messages in workeffort component
> > =====================================
> > Thanks Tanmay for your contribution.
> >
> > Modified:
> >     ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
> >     ofbiz/trunk/applications/workeffort/src/main/java/org/
> > apache/ofbiz/workeffort/workeffort/ICalConverter.java
> >
> > Modified: ofbiz/trunk/applications/workeffort/config/
> > WorkEffortUiLabels.xml
> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/
> > workeffort/config/WorkEffortUiLabels.xml?rev=
> > 1759067&r1=1759066&r2=1759067&view=diff
> > ============================================================
> > ==================
> > --- ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
> > (original)
> > +++ ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.xml
> Sat
> > Sep  3 10:19:36 2016
> > @@ -2633,6 +2633,12 @@
> >          <value xml:lang="zh">错误:ä½ æ²¡æœ‰æµ è§ˆè¿™ä¸ªäº‹ä»¶çš„æ ƒé™
> > ã€‚è¿™ä¸ªäº‹ä»¶å¿…é¡»å±žäºŽä½ æˆ–è€…ä½ å¿…é¡»æ˜¯ä¸€ä¸ªç®¡ç †å‘˜</value>
> >          <value xml:lang="zh-TW">錯誤:ä½ æ²’æœ‰æª¢è¦–é€™å€‹äº‹ä»¶çš„æ¬
> Šé™
> > .é€™å€‹äº‹ä»¶å¿…é ˆå±¬æ–¼ä½ æˆ–è€…ä½ å¿…é ˆæ˜¯ä¸€å€‹ç®¡ç †è€…</value>
> >      </property>
> > +    <property key="WorkeffortErrorWhileCreatingServiceMapForService">
> > +        <value xml:lang="en">Error while creating service Map for
> service
> > : ${serviceName}</value>
> > +    </property>
> > +    <property key="WorkeffortErrorWhileInvokingService">
> > +        <value xml:lang="en">Error while invoking service :
> > ${serviceName}</value>
> > +    </property>
> >      <property key="WorkEffortEstBudget">
> >          <value xml:lang="en">Est.Budget</value>
> >          <value xml:lang="es">Presupuesto estimado</value>
> >
> > Modified: ofbiz/trunk/applications/workeffort/src/main/java/org/
> > apache/ofbiz/workeffort/workeffort/ICalConverter.java
> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/
> > workeffort/src/main/java/org/apache/ofbiz/workeffort/
> > workeffort/ICalConverter.java?rev=1759067&r1=1759066&r2=
> 1759067&view=diff
> > ============================================================
> > ==================
> > --- ofbiz/trunk/applications/workeffort/src/main/java/org/
> > apache/ofbiz/workeffort/workeffort/ICalConverter.java (original)
> > +++ ofbiz/trunk/applications/workeffort/src/main/java/org/
> > apache/ofbiz/workeffort/workeffort/ICalConverter.java Sat Sep  3
> 10:19:36
> > 2016
> > @@ -463,6 +463,7 @@ public class ICalConverter {
> >
> >      protected static Map<String, Object> invokeService(String
> > serviceName, Map<String, ? extends Object> serviceMap, Map<String,
> Object>
> > context) {
> >          LocalDispatcher dispatcher = (LocalDispatcher)
> > context.get("dispatcher");
> > +        Locale locale = (Locale) context.get("locale");
> >          Map<String, Object> localMap = new HashMap<String, Object>();
> >          try {
> >              ModelService modelService = null;
> > @@ -477,7 +478,7 @@ public class ICalConverter {
> >                  }
> >              }
> >          } catch (Exception e) {
> > -            String errMsg = "Error while creating service Map for
> service
> > " + serviceName + ": ";
> > +            String errMsg = UtilProperties.getMessage("
> WorkEffortUiLabels",
> > "WorkeffortErrorWhileCreatingServiceMapForService",
> > UtilMisc.toMap("serviceName", serviceName), locale);
> >              Debug.logError(e, errMsg, module);
> >              return ServiceUtil.returnError(errMsg + e);
> >          }
> > @@ -488,7 +489,7 @@ public class ICalConverter {
> >          try {
> >              return dispatcher.runSync(serviceName, localMap);
> >          } catch (GenericServiceException e) {
> > -            String errMsg = "Error while invoking service " +
> serviceName
> > + ": ";
> > +            String errMsg = UtilProperties.getMessage("
> WorkEffortUiLabels",
> > "WorkeffortErrorWhileInvokingService", UtilMisc.toMap("serviceName",
> > serviceName), locale);
> >              Debug.logError(e, errMsg, module);
> >              return ServiceUtil.returnError(errMsg + e);
> >          }
> >
> >
> >
>