Adding new "EcommerceUiLabels" doesn't work

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

Adding new "EcommerceUiLabels" doesn't work

Antony Adopo
Hello Ofbizers,

I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
for instance :
<code>
 <property key="EcommerceNewCollections">
        <value xml:lang="en">New collections</value>
        <value xml:lang="fr">Nouvelles collections</value>
    </property>
</code>

But It doesn't work. Even I restart many times ofbiz and my computer. But
the first (native) Labels work .

Please Help

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Jacques Le Roux
Administrator
It should work, but what are those <code></code> ?

Jacques

Antony Adopo wrote:

> Hello Ofbizers,
>
> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
> for instance :
> <code>
> <property key="EcommerceNewCollections">
>        <value xml:lang="en">New collections</value>
>        <value xml:lang="fr">Nouvelles collections</value>
>    </property>
> </code>
>
> But It doesn't work. Even I restart many times ofbiz and my computer. But
> the first (native) Labels work .
>
> Please Help
>
> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Antony Adopo
lol, forgot it , it was just to specify that it is code.

But I add only :
 <property key="EcommerceNewCollections">
        <value xml:lang="en">New collections</value>
>       <value xml:lang="fr">Nouvelles collections</value>
  </property>

It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}


2013/10/11 Jacques Le Roux <[hidden email]>

> It should work, but what are those <code></code> ?
>
> Jacques
>
> Antony Adopo wrote:
> > Hello Ofbizers,
> >
> > I try to add new labels in EcommerceUiLabels.xml (Also
> CommonUiLabels.xml)
> > for instance :
> > <code>
> > <property key="EcommerceNewCollections">
> >        <value xml:lang="en">New collections</value>
> >        <value xml:lang="fr">Nouvelles collections</value>
> >    </property>
> > </code>
> >
> > But It doesn't work. Even I restart many times ofbiz and my computer. But
> > the first (native) Labels work .
> >
> > Please Help
> >
> > Thanks
>
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Sumit  Pandit
Hi Anthony,
Make sure following -

1.   <property key="EcommerceNewCollections">
            <value xml:lang="en">New collections</value>
    >       <value xml:lang="fr">Nouvelles collections</value>
      </property>
    I can see an extra ">" in starting of french translation, please verify.

2. Make sure that EcommerceUiLabels.xml file has been included in screen you are calling.

3. For purpose of testing, try to define this property at somewhere beginning of EcommerceUiLabels.xml file.

Otherwise it should work!

--
Thanks And Regards
Sumit Pandit
Tata Consultancy Services
Cell:- +917503046188
____________________________________________


----- Original Message -----
| From: "Antony Adopo" <[hidden email]>
| To: [hidden email]
| Sent: Friday, October 11, 2013 4:09:53 AM
| Subject: Re: Adding new "EcommerceUiLabels" doesn't work
|
| lol, forgot it , it was just to specify that it is code.
|
| But I add only :
|  <property key="EcommerceNewCollections">
|         <value xml:lang="en">New collections</value>
| >       <value xml:lang="fr">Nouvelles collections</value>
|   </property>
|
| It doesn't work when I call it by
| ${uiLabelMap.EcommerceNewCollections}
|
|
| 2013/10/11 Jacques Le Roux <[hidden email]>
|
| > It should work, but what are those <code></code> ?
| >
| > Jacques
| >
| > Antony Adopo wrote:
| > > Hello Ofbizers,
| > >
| > > I try to add new labels in EcommerceUiLabels.xml (Also
| > CommonUiLabels.xml)
| > > for instance :
| > > <code>
| > > <property key="EcommerceNewCollections">
| > >        <value xml:lang="en">New collections</value>
| > >        <value xml:lang="fr">Nouvelles collections</value>
| > >    </property>
| > > </code>
| > >
| > > But It doesn't work. Even I restart many times ofbiz and my
| > > computer. But
| > > the first (native) Labels work .
| > >
| > > Please Help
| > >
| > > Thanks
| >
|
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you


Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Jacques Le Roux
Administrator
In reply to this post by Antony Adopo
Antony, you have to be sure that you "include" the corresponding ui labels file in the screen widget definition which calls the ultimately rendered HTML source (either a widget form or a ftl template)
So if it's in a hot-deploy component don't forget it there. See how it's done in ecommerce screens...

Jacques

Antony Adopo wrote:

> lol, forgot it , it was just to specify that it is code.
>
> But I add only :
> <property key="EcommerceNewCollections">
>        <value xml:lang="en">New collections</value>
>>       <value xml:lang="fr">Nouvelles collections</value>
>  </property>
>
> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
>
>
> 2013/10/11 Jacques Le Roux <[hidden email]>
>
>> It should work, but what are those <code></code> ?
>>
>> Jacques
>>
>> Antony Adopo wrote:
>>> Hello Ofbizers,
>>>
>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>> for instance :
>>> <code>
>>> <property key="EcommerceNewCollections">
>>>        <value xml:lang="en">New collections</value>
>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>    </property>
>>> </code>
>>>
>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>> the first (native) Labels work .
>>>
>>> Please Help
>>>
>>> Thanks
Reply | Threaded
Open this post in threaded view
|

RE: Adding new "EcommerceUiLabels" doesn't work

Antony Adopo
In reply to this post by Antony Adopo
Yes, it is already include. Please send me an exemple to show tour "including" way. Im sure but it doesn't work

-----Message d'origine-----
De : "Jacques Le Roux" <[hidden email]>
Envoyé : ‎11/‎10/‎2013 08:58
À : "[hidden email]" <[hidden email]>
Objet : Re: Adding new "EcommerceUiLabels" doesn't work

Antony, you have to be sure that you "include" the corresponding ui labels file in the screen widget definition which calls the ultimately rendered HTML source (either a widget form or a ftl template)
So if it's in a hot-deploy component don't forget it there. See how it's done in ecommerce screens...

Jacques

Antony Adopo wrote:

> lol, forgot it , it was just to specify that it is code.
>
> But I add only :
> <property key="EcommerceNewCollections">
>        <value xml:lang="en">New collections</value>
>>       <value xml:lang="fr">Nouvelles collections</value>
>  </property>
>
> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
>
>
> 2013/10/11 Jacques Le Roux <[hidden email]>
>
>> It should work, but what are those <code></code> ?
>>
>> Jacques
>>
>> Antony Adopo wrote:
>>> Hello Ofbizers,
>>>
>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>> for instance :
>>> <code>
>>> <property key="EcommerceNewCollections">
>>>        <value xml:lang="en">New collections</value>
>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>    </property>
>>> </code>
>>>
>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>> the first (native) Labels work .
>>>
>>> Please Help
>>>
>>> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Jacques Le Roux
Administrator
Look for
<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>

in *een*.xml  files...

Also, to check what's going on with your labels, you can use the Label Manager in Webtools

Jacques

Antony ADOPO wrote:

> Yes, it is already include. Please send me an exemple to show tour "including" way. Im sure but it doesn't work
>
> -----Message d'origine-----
> De : "Jacques Le Roux" <[hidden email]>
> Envoyé : ‎11/‎10/‎2013 08:58
> À : "[hidden email]" <[hidden email]>
> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>
> Antony, you have to be sure that you "include" the corresponding ui labels file in the screen widget definition which calls the
> ultimately rendered HTML source (either a widget form or a ftl template)
> So if it's in a hot-deploy component don't forget it there. See how it's done in ecommerce screens...
>
> Jacques
>
> Antony Adopo wrote:
>> lol, forgot it , it was just to specify that it is code.
>>
>> But I add only :
>> <property key="EcommerceNewCollections">
>>        <value xml:lang="en">New collections</value>
>>>       <value xml:lang="fr">Nouvelles collections</value>
>>  </property>
>>
>> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
>>
>>
>> 2013/10/11 Jacques Le Roux <[hidden email]>
>>
>>> It should work, but what are those <code></code> ?
>>>
>>> Jacques
>>>
>>> Antony Adopo wrote:
>>>> Hello Ofbizers,
>>>>
>>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>>> for instance :
>>>> <code>
>>>> <property key="EcommerceNewCollections">
>>>>        <value xml:lang="en">New collections</value>
>>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>>    </property>
>>>> </code>
>>>>
>>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>>> the first (native) Labels work .
>>>>
>>>> Please Help
>>>>
>>>> Thanks
Reply | Threaded
Open this post in threaded view
|

RE: Adding new "EcommerceUiLabels" doesn't work

Antony Adopo
In reply to this post by Antony Adopo
Ok, I will try this evening. I only put these property in common screen , not on others "een.xml"

-----Message d'origine-----
De : "Jacques Le Roux" <[hidden email]>
Envoyé : ‎11/‎10/‎2013 11:21
À : "[hidden email]" <[hidden email]>
Objet : Re: Adding new "EcommerceUiLabels" doesn't work

Look for
<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>

in *een*.xml  files...

Also, to check what's going on with your labels, you can use the Label Manager in Webtools

Jacques

Antony ADOPO wrote:

> Yes, it is already include. Please send me an exemple to show tour "including" way. Im sure but it doesn't work
>
> -----Message d'origine-----
> De : "Jacques Le Roux" <[hidden email]>
> Envoyé : ‎11/‎10/‎2013 08:58
> À : "[hidden email]" <[hidden email]>
> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>
> Antony, you have to be sure that you "include" the corresponding ui labels file in the screen widget definition which calls the
> ultimately rendered HTML source (either a widget form or a ftl template)
> So if it's in a hot-deploy component don't forget it there. See how it's done in ecommerce screens...
>
> Jacques
>
> Antony Adopo wrote:
>> lol, forgot it , it was just to specify that it is code.
>>
>> But I add only :
>> <property key="EcommerceNewCollections">
>>        <value xml:lang="en">New collections</value>
>>>       <value xml:lang="fr">Nouvelles collections</value>
>>  </property>
>>
>> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
>>
>>
>> 2013/10/11 Jacques Le Roux <[hidden email]>
>>
>>> It should work, but what are those <code></code> ?
>>>
>>> Jacques
>>>
>>> Antony Adopo wrote:
>>>> Hello Ofbizers,
>>>>
>>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>>> for instance :
>>>> <code>
>>>> <property key="EcommerceNewCollections">
>>>>        <value xml:lang="en">New collections</value>
>>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>>    </property>
>>>> </code>
>>>>
>>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>>> the first (native) Labels work .
>>>>
>>>> Please Help
>>>>
>>>> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Jacques Le Roux
Administrator
If you common screen is either included or used as a decorator in other screens then it should work, because of the global="true"
Else your screens have no ideas about your labels, how could they?

Jacques

Antony ADOPO wrote:

> Ok, I will try this evening. I only put these property in common screen , not on others "een.xml"
>
> -----Message d'origine-----
> De : "Jacques Le Roux" <[hidden email]>
> Envoyé : ‎11/‎10/‎2013 11:21
> À : "[hidden email]" <[hidden email]>
> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>
> Look for
> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
>
> in *een*.xml  files...
>
> Also, to check what's going on with your labels, you can use the Label Manager in Webtools
>
> Jacques
>
> Antony ADOPO wrote:
>> Yes, it is already include. Please send me an exemple to show tour "including" way. Im sure but it doesn't work
>>
>> -----Message d'origine-----
>> De : "Jacques Le Roux" <[hidden email]>
>> Envoyé : ‎11/‎10/‎2013 08:58
>> À : "[hidden email]" <[hidden email]>
>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>>
>> Antony, you have to be sure that you "include" the corresponding ui labels file in the screen widget definition which calls the
>> ultimately rendered HTML source (either a widget form or a ftl template)
>> So if it's in a hot-deploy component don't forget it there. See how it's done in ecommerce screens...
>>
>> Jacques
>>
>> Antony Adopo wrote:
>>> lol, forgot it , it was just to specify that it is code.
>>>
>>> But I add only :
>>> <property key="EcommerceNewCollections">
>>>        <value xml:lang="en">New collections</value>
>>>>       <value xml:lang="fr">Nouvelles collections</value>
>>>  </property>
>>>
>>> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
>>>
>>>
>>> 2013/10/11 Jacques Le Roux <[hidden email]>
>>>
>>>> It should work, but what are those <code></code> ?
>>>>
>>>> Jacques
>>>>
>>>> Antony Adopo wrote:
>>>>> Hello Ofbizers,
>>>>>
>>>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>>>> for instance :
>>>>> <code>
>>>>> <property key="EcommerceNewCollections">
>>>>>        <value xml:lang="en">New collections</value>
>>>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>>>    </property>
>>>>> </code>
>>>>>
>>>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>>>> the first (native) Labels work .
>>>>>
>>>>> Please Help
>>>>>
>>>>> Thanks
Reply | Threaded
Open this post in threaded view
|

Localized date picker

xxshutong
Hi every ofbizer,
In folder framework/images/webapp/images/jquery/plugins/datetimepicker/localization, there are many localized date pick JS library like jquery-ui-timepicker-en.js, jquery-ui-timepicker-ru.js…

My question is how I can config to choose appropriate JS library?

Thanks,
Leon.Zhou
Reply | Threaded
Open this post in threaded view
|

Re: Localized date picker

Jacques Le Roux
Administrator
This is normally done automatically. You simply need to add your own if it misses. You might found it already exists on the Net.

A bit explained: it's related to this block in framework/common/widget/CommonScreens.xml

<set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
<set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.datejs.getFilePath(initialLocaleComplete)}" global="true"/>
<set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.jquery.getFilePath(initialLocaleComplete)}" global="true"/>
<set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.validation.getFilePath(initialLocaleComplete)}" global="true"/>

You will finally end with the createJsLanguageFileMapping service

BTW, we maybe need to update jQuery plugins.
I will have a look and will create a repeating task in Jira.

HTH

Jacques


xxshutong wrote:
> Hi every ofbizer,
> In folder framework/images/webapp/images/jquery/plugins/datetimepicker/localization, there are many localized date pick JS
> library like jquery-ui-timepicker-en.js, jquery-ui-timepicker-ru.js…
>
> My question is how I can config to choose appropriate JS library?
>
> Thanks,
> Leon.Zhou
Reply | Threaded
Open this post in threaded view
|

Re: Localized date picker

xxshutong
Hi Jacques,
Many thanks, I will try when I am back home. I will update to you.

Thanks,
Leon.Zhou

On Oct 12, 2013, at 12:33 AM, Jacques Le Roux <[hidden email]> wrote:

> This is normally done automatically. You simply need to add your own if it misses. You might found it already exists on the Net.
>
> A bit explained: it's related to this block in framework/common/widget/CommonScreens.xml
>
> <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.datejs.getFilePath(initialLocaleComplete)}" global="true"/>
> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.jquery.getFilePath(initialLocaleComplete)}" global="true"/>
> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.validation.getFilePath(initialLocaleComplete)}" global="true"/>
>
> You will finally end with the createJsLanguageFileMapping service
>
> BTW, we maybe need to update jQuery plugins.
> I will have a look and will create a repeating task in Jira.
>
> HTH
>
> Jacques
>
>
> xxshutong wrote:
>> Hi every ofbizer,
>> In folder framework/images/webapp/images/jquery/plugins/datetimepicker/localization, there are many localized date pick JS
>> library like jquery-ui-timepicker-en.js, jquery-ui-timepicker-ru.js…
>>
>> My question is how I can config to choose appropriate JS library?
>>
>> Thanks,
>> Leon.Zhou

Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Antony Adopo
In reply to this post by Jacques Le Roux
Please, I did all but nothing.

this my screen:

<screen name="mainSubHeader">
    <section>
    <actions>
    <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
global="true"/>
    </actions>
            <widgets>
                <platform-specific><html><html-template
location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainSubHeader.ftl"/></html></platform-specific>
            </widgets>
        </section>
    </screen>


I include it in the "main" screen in "CommonScreens.xml"

<screen name="main">
        <section>
            <actions>
                <!--<set field="leftbarScreenName" value="leftbar"/>
                <set field="rightbarScreenName" value="rightbar"/>-->
                <!--<set field="MainColumnStyle" value="center"/>-->


                <set field="titleProperty" value="PageTitleMain"/>
                <set field="headerItem" value="main"/>
                <set field="randomSurveyGroup" value="testSurveyGroup"/>

                <script
location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/>
                <script
location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                    *<include-screen name="mainSubHeader"/>*
                        <include-screen name="mainCarousel"/>
                        <platform-specific><html><html-template
location="component://LeTailleur/webapp/ecommerce/main.ftl"/></html></platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

but it doesn't work. Please help

2013/10/11 Jacques Le Roux <[hidden email]>

> If you common screen is either included or used as a decorator in other
> screens then it should work, because of the global="true"
> Else your screens have no ideas about your labels, how could they?
>
> Jacques
>
> Antony ADOPO wrote:
> > Ok, I will try this evening. I only put these property in common screen
> , not on others "een.xml"
> >
> > -----Message d'origine-----
> > De : "Jacques Le Roux" <[hidden email]>
> > Envoyé : 11/10/2013 11:21
> > À : "[hidden email]" <[hidden email]>
> > Objet : Re: Adding new "EcommerceUiLabels" doesn't work
> >
> > Look for
> > <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
> global="true"/>
> >
> > in *een*.xml  files...
> >
> > Also, to check what's going on with your labels, you can use the Label
> Manager in Webtools
> >
> > Jacques
> >
> > Antony ADOPO wrote:
> >> Yes, it is already include. Please send me an exemple to show tour
> "including" way. Im sure but it doesn't work
> >>
> >> -----Message d'origine-----
> >> De : "Jacques Le Roux" <[hidden email]>
> >> Envoyé : 11/10/2013 08:58
> >> À : "[hidden email]" <[hidden email]>
> >> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
> >>
> >> Antony, you have to be sure that you "include" the corresponding ui
> labels file in the screen widget definition which calls the
> >> ultimately rendered HTML source (either a widget form or a ftl template)
> >> So if it's in a hot-deploy component don't forget it there. See how
> it's done in ecommerce screens...
> >>
> >> Jacques
> >>
> >> Antony Adopo wrote:
> >>> lol, forgot it , it was just to specify that it is code.
> >>>
> >>> But I add only :
> >>> <property key="EcommerceNewCollections">
> >>>        <value xml:lang="en">New collections</value>
> >>>>       <value xml:lang="fr">Nouvelles collections</value>
> >>>  </property>
> >>>
> >>> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
> >>>
> >>>
> >>> 2013/10/11 Jacques Le Roux <[hidden email]>
> >>>
> >>>> It should work, but what are those <code></code> ?
> >>>>
> >>>> Jacques
> >>>>
> >>>> Antony Adopo wrote:
> >>>>> Hello Ofbizers,
> >>>>>
> >>>>> I try to add new labels in EcommerceUiLabels.xml (Also
> CommonUiLabels.xml)
> >>>>> for instance :
> >>>>> <code>
> >>>>> <property key="EcommerceNewCollections">
> >>>>>        <value xml:lang="en">New collections</value>
> >>>>>        <value xml:lang="fr">Nouvelles collections</value>
> >>>>>    </property>
> >>>>> </code>
> >>>>>
> >>>>> But It doesn't work. Even I restart many times ofbiz and my
> computer. But
> >>>>> the first (native) Labels work .
> >>>>>
> >>>>> Please Help
> >>>>>
> >>>>> Thanks
>
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Jacques Le Roux
Administrator
Seems you did it the reverse way.

Put
<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
in you main screen actions and it should work for both your (visible here) ftl templates

Also if you use your main-decorator in other screens, better to put this line directly in your main-decorator.
The idea is to put labels at the higher level, wich the decorators are.

Of course, YMMV...

Jacques

Antony Adopo wrote:

> Please, I did all but nothing.
>
> this my screen:
>
> <screen name="mainSubHeader">
>     <section>
>     <actions>
>     <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
> global="true"/>
>     </actions>
>             <widgets>
>                 <platform-specific><html><html-template
> location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainSubHeader.ftl"/></html></platform-specific>
>             </widgets>
>         </section>
>     </screen>
>
>
> I include it in the "main" screen in "CommonScreens.xml"
>
> <screen name="main">
>         <section>
>             <actions>
>                 <!--<set field="leftbarScreenName" value="leftbar"/>
>                 <set field="rightbarScreenName" value="rightbar"/>-->
>                 <!--<set field="MainColumnStyle" value="center"/>-->
>
>
>                 <set field="titleProperty" value="PageTitleMain"/>
>                 <set field="headerItem" value="main"/>
>                 <set field="randomSurveyGroup" value="testSurveyGroup"/>
>
>                 <script
> location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/>
>                 <script
> location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
>             </actions>
>             <widgets>
>                 <decorator-screen name="main-decorator"
> location="${parameters.mainDecoratorLocation}">
>                     <decorator-section name="body">
>                     *<include-screen name="mainSubHeader"/>*
>                         <include-screen name="mainCarousel"/>
>                         <platform-specific><html><html-template
> location="component://LeTailleur/webapp/ecommerce/main.ftl"/></html></platform-specific>
>                     </decorator-section>
>                 </decorator-screen>
>             </widgets>
>         </section>
>     </screen>
>
> but it doesn't work. Please help
>
> 2013/10/11 Jacques Le Roux <[hidden email]>
>
>> If you common screen is either included or used as a decorator in other
>> screens then it should work, because of the global="true"
>> Else your screens have no ideas about your labels, how could they?
>>
>> Jacques
>>
>> Antony ADOPO wrote:
>>> Ok, I will try this evening. I only put these property in common screen , not on others "een.xml"
>>>
>>> -----Message d'origine-----
>>> De : "Jacques Le Roux" <[hidden email]>
>>> Envoyé : 11/10/2013 11:21
>>> À : "[hidden email]" <[hidden email]>
>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>>>
>>> Look for
>>> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
>>>
>>> in *een*.xml  files...
>>>
>>> Also, to check what's going on with your labels, you can use the Label Manager in Webtools
>>>
>>> Jacques
>>>
>>> Antony ADOPO wrote:
>>>> Yes, it is already include. Please send me an exemple to show tour
>> "including" way. Im sure but it doesn't work
>>>>
>>>> -----Message d'origine-----
>>>> De : "Jacques Le Roux" <[hidden email]>
>>>> Envoyé : 11/10/2013 08:58
>>>> À : "[hidden email]" <[hidden email]>
>>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>>>>
>>>> Antony, you have to be sure that you "include" the corresponding ui
>> labels file in the screen widget definition which calls the
>>>> ultimately rendered HTML source (either a widget form or a ftl template)
>>>> So if it's in a hot-deploy component don't forget it there. See how
>> it's done in ecommerce screens...
>>>>
>>>> Jacques
>>>>
>>>> Antony Adopo wrote:
>>>>> lol, forgot it , it was just to specify that it is code.
>>>>>
>>>>> But I add only :
>>>>> <property key="EcommerceNewCollections">
>>>>>        <value xml:lang="en">New collections</value>
>>>>>>       <value xml:lang="fr">Nouvelles collections</value>
>>>>>  </property>
>>>>>
>>>>> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
>>>>>
>>>>>
>>>>> 2013/10/11 Jacques Le Roux <[hidden email]>
>>>>>
>>>>>> It should work, but what are those <code></code> ?
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> Antony Adopo wrote:
>>>>>>> Hello Ofbizers,
>>>>>>>
>>>>>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>>>>>> for instance :
>>>>>>> <code>
>>>>>>> <property key="EcommerceNewCollections">
>>>>>>>        <value xml:lang="en">New collections</value>
>>>>>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>>>>>    </property>
>>>>>>> </code>
>>>>>>>
>>>>>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>>>>>> the first (native) Labels work .
>>>>>>>
>>>>>>> Please Help
>>>>>>>
>>>>>>> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Antony Adopo
It doesnt work, pfff. I send you commonScreen.xml , end my mainsubheader.ftl

please watch it, please


2013/10/12 Jacques Le Roux <[hidden email]>
Seems you did it the reverse way.

Put
<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
in you main screen actions and it should work for both your (visible here) ftl templates

Also if you use your main-decorator in other screens, better to put this line directly in your main-decorator.
The idea is to put labels at the higher level, wich the decorators are.

Of course, YMMV...

Jacques

Antony Adopo wrote:
> Please, I did all but nothing.
>
> this my screen:
>
> <screen name="mainSubHeader">
>     <section>
>     <actions>
>     <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
> global="true"/>
>     </actions>
>             <widgets>
>                 <platform-specific><html><html-template
> location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainSubHeader.ftl"/></html></platform-specific>
>             </widgets>
>         </section>
>     </screen>
>
>
> I include it in the "main" screen in "CommonScreens.xml"
>
> <screen name="main">
>         <section>
>             <actions>
>                 <!--<set field="leftbarScreenName" value="leftbar"/>
>                 <set field="rightbarScreenName" value="rightbar"/>-->
>                 <!--<set field="MainColumnStyle" value="center"/>-->
>
>
>                 <set field="titleProperty" value="PageTitleMain"/>
>                 <set field="headerItem" value="main"/>
>                 <set field="randomSurveyGroup" value="testSurveyGroup"/>
>
>                 <script
> location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/>
>                 <script
> location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
>             </actions>
>             <widgets>
>                 <decorator-screen name="main-decorator"
> location="${parameters.mainDecoratorLocation}">
>                     <decorator-section name="body">
>                     *<include-screen name="mainSubHeader"/>*
>                         <include-screen name="mainCarousel"/>
>                         <platform-specific><html><html-template
> location="component://LeTailleur/webapp/ecommerce/main.ftl"/></html></platform-specific>
>                     </decorator-section>
>                 </decorator-screen>
>             </widgets>
>         </section>
>     </screen>
>
> but it doesn't work. Please help
>
> 2013/10/11 Jacques Le Roux <[hidden email]>
>
>> If you common screen is either included or used as a decorator in other
>> screens then it should work, because of the global="true"
>> Else your screens have no ideas about your labels, how could they?
>>
>> Jacques
>>
>> Antony ADOPO wrote:
>>> Ok, I will try this evening. I only put these property in common screen , not on others "een.xml"
>>>
>>> -----Message d'origine-----
>>> De : "Jacques Le Roux" <[hidden email]>
>>> Envoyé : 11/10/2013 11:21
>>> À : "[hidden email]" <[hidden email]>
>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>>>
>>> Look for
>>> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
>>>
>>> in *een*.xml  files...
>>>
>>> Also, to check what's going on with your labels, you can use the Label Manager in Webtools
>>>
>>> Jacques
>>>
>>> Antony ADOPO wrote:
>>>> Yes, it is already include. Please send me an exemple to show tour
>> "including" way. Im sure but it doesn't work
>>>>
>>>> -----Message d'origine-----
>>>> De : "Jacques Le Roux" <[hidden email]>
>>>> Envoyé : 11/10/2013 08:58
>>>> À : "[hidden email]" <[hidden email]>
>>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>>>>
>>>> Antony, you have to be sure that you "include" the corresponding ui
>> labels file in the screen widget definition which calls the
>>>> ultimately rendered HTML source (either a widget form or a ftl template)
>>>> So if it's in a hot-deploy component don't forget it there. See how
>> it's done in ecommerce screens...
>>>>
>>>> Jacques
>>>>
>>>> Antony Adopo wrote:
>>>>> lol, forgot it , it was just to specify that it is code.
>>>>>
>>>>> But I add only :
>>>>> <property key="EcommerceNewCollections">
>>>>>        <value xml:lang="en">New collections</value>
>>>>>>       <value xml:lang="fr">Nouvelles collections</value>
>>>>>  </property>
>>>>>
>>>>> It doesn't work when I call it by ${uiLabelMap.EcommerceNewCollections}
>>>>>
>>>>>
>>>>> 2013/10/11 Jacques Le Roux <[hidden email]>
>>>>>
>>>>>> It should work, but what are those <code></code> ?
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> Antony Adopo wrote:
>>>>>>> Hello Ofbizers,
>>>>>>>
>>>>>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>>>>>> for instance :
>>>>>>> <code>
>>>>>>> <property key="EcommerceNewCollections">
>>>>>>>        <value xml:lang="en">New collections</value>
>>>>>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>>>>>    </property>
>>>>>>> </code>
>>>>>>>
>>>>>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>>>>>> the first (native) Labels work .
>>>>>>>
>>>>>>> Please Help
>>>>>>>
>>>>>>> Thanks


CommonScreens.xml (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Antony Adopo
And a second thing for the same "EcommerceUiLables.xml" file, only new
labels that I add don't work. previous labels work good. I don't understand
why


2013/10/12 Antony Adopo <[hidden email]>

> It doesnt work, pfff. I send you commonScreen.xml , end my
> mainsubheader.ftl
>
> please watch it, please
>
>
> 2013/10/12 Jacques Le Roux <[hidden email]>
>
>> Seems you did it the reverse way.
>>
>> Put
>> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
>> global="true"/>
>> in you main screen actions and it should work for both your (visible
>> here) ftl templates
>>
>> Also if you use your main-decorator in other screens, better to put this
>> line directly in your main-decorator.
>> The idea is to put labels at the higher level, wich the decorators are.
>>
>> Of course, YMMV...
>>
>> Jacques
>>
>> Antony Adopo wrote:
>> > Please, I did all but nothing.
>> >
>> > this my screen:
>> >
>> > <screen name="mainSubHeader">
>> >     <section>
>> >     <actions>
>> >     <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
>> > global="true"/>
>> >     </actions>
>> >             <widgets>
>> >                 <platform-specific><html><html-template
>> >
>> location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainSubHeader.ftl"/></html></platform-specific>
>> >             </widgets>
>> >         </section>
>> >     </screen>
>> >
>> >
>> > I include it in the "main" screen in "CommonScreens.xml"
>> >
>> > <screen name="main">
>> >         <section>
>> >             <actions>
>> >                 <!--<set field="leftbarScreenName" value="leftbar"/>
>> >                 <set field="rightbarScreenName" value="rightbar"/>-->
>> >                 <!--<set field="MainColumnStyle" value="center"/>-->
>> >
>> >
>> >                 <set field="titleProperty" value="PageTitleMain"/>
>> >                 <set field="headerItem" value="main"/>
>> >                 <set field="randomSurveyGroup" value="testSurveyGroup"/>
>> >
>> >                 <script
>> >
>> location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/>
>> >                 <script
>> >
>> location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
>> >             </actions>
>> >             <widgets>
>> >                 <decorator-screen name="main-decorator"
>> > location="${parameters.mainDecoratorLocation}">
>> >                     <decorator-section name="body">
>> >                     *<include-screen name="mainSubHeader"/>*
>> >                         <include-screen name="mainCarousel"/>
>> >                         <platform-specific><html><html-template
>> >
>> location="component://LeTailleur/webapp/ecommerce/main.ftl"/></html></platform-specific>
>> >                     </decorator-section>
>> >                 </decorator-screen>
>> >             </widgets>
>> >         </section>
>> >     </screen>
>> >
>> > but it doesn't work. Please help
>> >
>> > 2013/10/11 Jacques Le Roux <[hidden email]>
>> >
>> >> If you common screen is either included or used as a decorator in other
>> >> screens then it should work, because of the global="true"
>> >> Else your screens have no ideas about your labels, how could they?
>> >>
>> >> Jacques
>> >>
>> >> Antony ADOPO wrote:
>> >>> Ok, I will try this evening. I only put these property in common
>> screen , not on others "een.xml"
>> >>>
>> >>> -----Message d'origine-----
>> >>> De : "Jacques Le Roux" <[hidden email]>
>> >>> Envoyé : 11/10/2013 11:21
>> >>> À : "[hidden email]" <[hidden email]>
>> >>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>> >>>
>> >>> Look for
>> >>> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
>> global="true"/>
>> >>>
>> >>> in *een*.xml  files...
>> >>>
>> >>> Also, to check what's going on with your labels, you can use the
>> Label Manager in Webtools
>> >>>
>> >>> Jacques
>> >>>
>> >>> Antony ADOPO wrote:
>> >>>> Yes, it is already include. Please send me an exemple to show tour
>> >> "including" way. Im sure but it doesn't work
>> >>>>
>> >>>> -----Message d'origine-----
>> >>>> De : "Jacques Le Roux" <[hidden email]>
>> >>>> Envoyé : 11/10/2013 08:58
>> >>>> À : "[hidden email]" <[hidden email]>
>> >>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>> >>>>
>> >>>> Antony, you have to be sure that you "include" the corresponding ui
>> >> labels file in the screen widget definition which calls the
>> >>>> ultimately rendered HTML source (either a widget form or a ftl
>> template)
>> >>>> So if it's in a hot-deploy component don't forget it there. See how
>> >> it's done in ecommerce screens...
>> >>>>
>> >>>> Jacques
>> >>>>
>> >>>> Antony Adopo wrote:
>> >>>>> lol, forgot it , it was just to specify that it is code.
>> >>>>>
>> >>>>> But I add only :
>> >>>>> <property key="EcommerceNewCollections">
>> >>>>>        <value xml:lang="en">New collections</value>
>> >>>>>>       <value xml:lang="fr">Nouvelles collections</value>
>> >>>>>  </property>
>> >>>>>
>> >>>>> It doesn't work when I call it by
>> ${uiLabelMap.EcommerceNewCollections}
>> >>>>>
>> >>>>>
>> >>>>> 2013/10/11 Jacques Le Roux <[hidden email]>
>> >>>>>
>> >>>>>> It should work, but what are those <code></code> ?
>> >>>>>>
>> >>>>>> Jacques
>> >>>>>>
>> >>>>>> Antony Adopo wrote:
>> >>>>>>> Hello Ofbizers,
>> >>>>>>>
>> >>>>>>> I try to add new labels in EcommerceUiLabels.xml (Also
>> CommonUiLabels.xml)
>> >>>>>>> for instance :
>> >>>>>>> <code>
>> >>>>>>> <property key="EcommerceNewCollections">
>> >>>>>>>        <value xml:lang="en">New collections</value>
>> >>>>>>>        <value xml:lang="fr">Nouvelles collections</value>
>> >>>>>>>    </property>
>> >>>>>>> </code>
>> >>>>>>>
>> >>>>>>> But It doesn't work. Even I restart many times ofbiz and my
>> computer. But
>> >>>>>>> the first (native) Labels work .
>> >>>>>>>
>> >>>>>>> Please Help
>> >>>>>>>
>> >>>>>>> Thanks
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Localized date picker

xxshutong
In reply to this post by xxshutong
Hi Jacques,
My localized file is existing already. But system didn't change when I change the language.
So I hardcode the file
From <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
To <set field="initialLocaleComplete" type="String" value="zh_CN" default-value="${groovy:locale.toString()}"/>

I will try to find out the reason when I am more familiar with of biz.

Thanks,
Leon.Zhou

On Oct 12, 2013, at 8:25 AM, xxshutong <[hidden email]> wrote:

> Hi Jacques,
> Many thanks, I will try when I am back home. I will update to you.
>
> Thanks,
> Leon.Zhou
>
> On Oct 12, 2013, at 12:33 AM, Jacques Le Roux <[hidden email]> wrote:
>
>> This is normally done automatically. You simply need to add your own if it misses. You might found it already exists on the Net.
>>
>> A bit explained: it's related to this block in framework/common/widget/CommonScreens.xml
>>
>> <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
>> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.datejs.getFilePath(initialLocaleComplete)}" global="true"/>
>> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.jquery.getFilePath(initialLocaleComplete)}" global="true"/>
>> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.validation.getFilePath(initialLocaleComplete)}" global="true"/>
>>
>> You will finally end with the createJsLanguageFileMapping service
>>
>> BTW, we maybe need to update jQuery plugins.
>> I will have a look and will create a repeating task in Jira.
>>
>> HTH
>>
>> Jacques
>>
>>
>> xxshutong wrote:
>>> Hi every ofbizer,
>>> In folder framework/images/webapp/images/jquery/plugins/datetimepicker/localization, there are many localized date pick JS
>>> library like jquery-ui-timepicker-en.js, jquery-ui-timepicker-ru.js…
>>>
>>> My question is how I can config to choose appropriate JS library?
>>>
>>> Thanks,
>>> Leon.Zhou
>

Reply | Threaded
Open this post in threaded view
|

Re: Localized date picker

xxshutong
Hi Jacques,
I find a bug in ofbiz 12.04
In ofbiz/framework/common/src/org/ofbiz/common/JsLanguageFilesMapping.java

The codes bellow:
localeFiles.put("zh_CN", "/images/jquery/plugins/validate/localization/messages_en.js");

Should changed to:
localeFiles.put("zh_CN", "/images/jquery/plugins/validate/localization/messages_cn.js");

Thanks,
Leon.Zhou

On Oct 13, 2013, at 10:47 AM, xxshutong <[hidden email]> wrote:

> Hi Jacques,
> My localized file is existing already. But system didn't change when I change the language.
> So I hardcode the file
> From <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
> To <set field="initialLocaleComplete" type="String" value="zh_CN" default-value="${groovy:locale.toString()}"/>
>
> I will try to find out the reason when I am more familiar with of biz.
>
> Thanks,
> Leon.Zhou
>
> On Oct 12, 2013, at 8:25 AM, xxshutong <[hidden email]> wrote:
>
>> Hi Jacques,
>> Many thanks, I will try when I am back home. I will update to you.
>>
>> Thanks,
>> Leon.Zhou
>>
>> On Oct 12, 2013, at 12:33 AM, Jacques Le Roux <[hidden email]> wrote:
>>
>>> This is normally done automatically. You simply need to add your own if it misses. You might found it already exists on the Net.
>>>
>>> A bit explained: it's related to this block in framework/common/widget/CommonScreens.xml
>>>
>>> <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
>>> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.datejs.getFilePath(initialLocaleComplete)}" global="true"/>
>>> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.jquery.getFilePath(initialLocaleComplete)}" global="true"/>
>>> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.validation.getFilePath(initialLocaleComplete)}" global="true"/>
>>>
>>> You will finally end with the createJsLanguageFileMapping service
>>>
>>> BTW, we maybe need to update jQuery plugins.
>>> I will have a look and will create a repeating task in Jira.
>>>
>>> HTH
>>>
>>> Jacques
>>>
>>>
>>> xxshutong wrote:
>>>> Hi every ofbizer,
>>>> In folder framework/images/webapp/images/jquery/plugins/datetimepicker/localization, there are many localized date pick JS
>>>> library like jquery-ui-timepicker-en.js, jquery-ui-timepicker-ru.js…
>>>>
>>>> My question is how I can config to choose appropriate JS library?
>>>>
>>>> Thanks,
>>>> Leon.Zhou
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Adding new "EcommerceUiLabels" doesn't work

Jacques Le Roux
Administrator
In reply to this post by Antony Adopo
Then it would be good to have the EcommerceUiLables.xml file. I guess there is an issue in it.
Not sure it will pass through here though. Then you can attach on Nabble forum

Jacques

Antony Adopo wrote:

> And a second thing for the same "EcommerceUiLables.xml" file, only new
> labels that I add don't work. previous labels work good. I don't understand
> why
>
>
> 2013/10/12 Antony Adopo <[hidden email]>
>
>> It doesnt work, pfff. I send you commonScreen.xml , end my
>> mainsubheader.ftl
>>
>> please watch it, please
>>
>>
>> 2013/10/12 Jacques Le Roux <[hidden email]>
>>
>>> Seems you did it the reverse way.
>>>
>>> Put
>>> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
>>> global="true"/>
>>> in you main screen actions and it should work for both your (visible
>>> here) ftl templates
>>>
>>> Also if you use your main-decorator in other screens, better to put this
>>> line directly in your main-decorator.
>>> The idea is to put labels at the higher level, wich the decorators are.
>>>
>>> Of course, YMMV...
>>>
>>> Jacques
>>>
>>> Antony Adopo wrote:
>>>> Please, I did all but nothing.
>>>>
>>>> this my screen:
>>>>
>>>> <screen name="mainSubHeader">
>>>>     <section>
>>>>     <actions>
>>>>     <property-map resource="EcommerceUiLabels" map-name="uiLabelMap"
>>>> global="true"/>
>>>>     </actions>
>>>>             <widgets>
>>>>                 <platform-specific><html><html-template
>>>>
>>> location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainSubHeader.ftl"/></html></platform-specific>
>>>>             </widgets>
>>>>         </section>
>>>>     </screen>
>>>>
>>>>
>>>> I include it in the "main" screen in "CommonScreens.xml"
>>>>
>>>> <screen name="main">
>>>>         <section>
>>>>             <actions>
>>>>                 <!--<set field="leftbarScreenName" value="leftbar"/>
>>>>                 <set field="rightbarScreenName" value="rightbar"/>-->
>>>>                 <!--<set field="MainColumnStyle" value="center"/>-->
>>>>
>>>>
>>>>                 <set field="titleProperty" value="PageTitleMain"/>
>>>>                 <set field="headerItem" value="main"/>
>>>>                 <set field="randomSurveyGroup" value="testSurveyGroup"/>
>>>>
>>>>                 <script
>>>>
>>> location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/>
>>>>                 <script
>>>>
>>> location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/>
>>>>             </actions>
>>>>             <widgets>
>>>>                 <decorator-screen name="main-decorator"
>>>> location="${parameters.mainDecoratorLocation}">
>>>>                     <decorator-section name="body">
>>>>                     *<include-screen name="mainSubHeader"/>*
>>>>                         <include-screen name="mainCarousel"/>
>>>>                         <platform-specific><html><html-template
>>>>
>>> location="component://LeTailleur/webapp/ecommerce/main.ftl"/></html></platform-specific>
>>>>                     </decorator-section>
>>>>                 </decorator-screen>
>>>>             </widgets>
>>>>         </section>
>>>>     </screen>
>>>>
>>>> but it doesn't work. Please help
>>>>
>>>> 2013/10/11 Jacques Le Roux <[hidden email]>
>>>>
>>>>> If you common screen is either included or used as a decorator in other
>>>>> screens then it should work, because of the global="true"
>>>>> Else your screens have no ideas about your labels, how could they?
>>>>>
>>>>> Jacques
>>>>>
>>>>> Antony ADOPO wrote:
>>>>>> Ok, I will try this evening. I only put these property in common
>>> screen , not on others "een.xml"
>>>>>>
>>>>>> -----Message d'origine-----
>>>>>> De : "Jacques Le Roux" <[hidden email]>
>>>>>> Envoyé : 11/10/2013 11:21
>>>>>> À : "[hidden email]" <[hidden email]>
>>>>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>>>>>>
>>>>>> Look for
>>>>>> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
>>>>>>
>>>>>> in *een*.xml  files...
>>>>>>
>>>>>> Also, to check what's going on with your labels, you can use the Label Manager in Webtools
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> Antony ADOPO wrote:
>>>>>>> Yes, it is already include. Please send me an exemple to show tour
>>>>> "including" way. Im sure but it doesn't work
>>>>>>>
>>>>>>> -----Message d'origine-----
>>>>>>> De : "Jacques Le Roux" <[hidden email]>
>>>>>>> Envoyé : 11/10/2013 08:58
>>>>>>> À : "[hidden email]" <[hidden email]>
>>>>>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work
>>>>>>>
>>>>>>> Antony, you have to be sure that you "include" the corresponding ui
>>>>> labels file in the screen widget definition which calls the
>>>>>>> ultimately rendered HTML source (either a widget form or a ftl template)
>>>>>>> So if it's in a hot-deploy component don't forget it there. See how
>>>>> it's done in ecommerce screens...
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>> Antony Adopo wrote:
>>>>>>>> lol, forgot it , it was just to specify that it is code.
>>>>>>>>
>>>>>>>> But I add only :
>>>>>>>> <property key="EcommerceNewCollections">
>>>>>>>>        <value xml:lang="en">New collections</value>
>>>>>>>>>       <value xml:lang="fr">Nouvelles collections</value>
>>>>>>>>  </property>
>>>>>>>>
>>>>>>>> It doesn't work when I call it by
>>> ${uiLabelMap.EcommerceNewCollections}
>>>>>>>>
>>>>>>>>
>>>>>>>> 2013/10/11 Jacques Le Roux <[hidden email]>
>>>>>>>>
>>>>>>>>> It should work, but what are those <code></code> ?
>>>>>>>>>
>>>>>>>>> Jacques
>>>>>>>>>
>>>>>>>>> Antony Adopo wrote:
>>>>>>>>>> Hello Ofbizers,
>>>>>>>>>>
>>>>>>>>>> I try to add new labels in EcommerceUiLabels.xml (Also CommonUiLabels.xml)
>>>>>>>>>> for instance :
>>>>>>>>>> <code>
>>>>>>>>>> <property key="EcommerceNewCollections">
>>>>>>>>>>        <value xml:lang="en">New collections</value>
>>>>>>>>>>        <value xml:lang="fr">Nouvelles collections</value>
>>>>>>>>>>    </property>
>>>>>>>>>> </code>
>>>>>>>>>>
>>>>>>>>>> But It doesn't work. Even I restart many times ofbiz and my computer. But
>>>>>>>>>> the first (native) Labels work .
>>>>>>>>>>
>>>>>>>>>> Please Help
>>>>>>>>>>
>>>>>>>>>> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Localized date picker

Jacques Le Roux
Administrator
In reply to this post by xxshutong
Thanks for report Leon.Zhou,

We indeed forgot to backport http://svn.apache.org/viewvc?view=revision&revision=1381146
Done in R12.04 branch at r1531640.

Jacques

xxshutong wrote:

> Hi Jacques,
> I find a bug in ofbiz 12.04
> In ofbiz/framework/common/src/org/ofbiz/common/JsLanguageFilesMapping.java
>
> The codes bellow:
> localeFiles.put("zh_CN", "/images/jquery/plugins/validate/localization/messages_en.js");
>
> Should changed to:
> localeFiles.put("zh_CN", "/images/jquery/plugins/validate/localization/messages_cn.js");
>
> Thanks,
> Leon.Zhou
>
> On Oct 13, 2013, at 10:47 AM, xxshutong <[hidden email]> wrote:
>
>> Hi Jacques,
>> My localized file is existing already. But system didn't change when I change the language.
>> So I hardcode the file
>> From <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}"
>> default-value="${groovy:locale.toString()}"/> To <set field="initialLocaleComplete" type="String" value="zh_CN"
>> default-value="${groovy:locale.toString()}"/>
>>
>> I will try to find out the reason when I am more familiar with of biz.
>>
>> Thanks,
>> Leon.Zhou
>>
>> On Oct 12, 2013, at 8:25 AM, xxshutong <[hidden email]> wrote:
>>
>>> Hi Jacques,
>>> Many thanks, I will try when I am back home. I will update to you.
>>>
>>> Thanks,
>>> Leon.Zhou
>>>
>>> On Oct 12, 2013, at 12:33 AM, Jacques Le Roux <[hidden email]> wrote:
>>>
>>>> This is normally done automatically. You simply need to add your own if it misses. You might found it already exists on the
>>>> Net.
>>>>
>>>> A bit explained: it's related to this block in framework/common/widget/CommonScreens.xml
>>>>
>>>> <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}"
>>>> default-value="${groovy:locale.toString()}"/> <set field="layoutSettings.javaScripts[+0]" value="${groovy:
>>>> org.ofbiz.common.JsLanguageFilesMapping.datejs.getFilePath(initialLocaleComplete)}" global="true"/> <set
>>>> field="layoutSettings.javaScripts[+0]" value="${groovy:
>>>> org.ofbiz.common.JsLanguageFilesMapping.jquery.getFilePath(initialLocaleComplete)}" global="true"/> <set
>>>> field="layoutSettings.javaScripts[+0]" value="${groovy:
>>>> org.ofbiz.common.JsLanguageFilesMapping.validation.getFilePath(initialLocaleComplete)}" global="true"/>  
>>>>
>>>> You will finally end with the createJsLanguageFileMapping service
>>>>
>>>> BTW, we maybe need to update jQuery plugins.
>>>> I will have a look and will create a repeating task in Jira.
>>>>
>>>> HTH
>>>>
>>>> Jacques
>>>>
>>>>
>>>> xxshutong wrote:
>>>>> Hi every ofbizer,
>>>>> In folder framework/images/webapp/images/jquery/plugins/datetimepicker/localization, there are many localized date pick JS
>>>>> library like jquery-ui-timepicker-en.js, jquery-ui-timepicker-ru.js…
>>>>>
>>>>> My question is how I can config to choose appropriate JS library?
>>>>>
>>>>> Thanks,
>>>>> Leon.Zhou
12