You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2006/07/01 16:57:29 UTC

[jira] Créée: (OFBIZ-75) I18n of categories

I18n of categories
------------------

         Key: OFBIZ-75
         URL: http://issues.apache.org/jira/browse/OFBIZ-75
     Project: The Open For Business Project
        Type: Improvement

  Components: ecommerce, order  
    Versions: SVN trunk    
    Reporter: Jacques Le Roux
     Fix For: SVN trunk


I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.

I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).

Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)

I think I'll do something also for Catalog ASA I I'll find some time to...

I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.

Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12430292 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

For the moment CategoryContentWrapper print informations in the log. I think we might suppres the System.out.println lines. What do you think ?

public CategoryContentWrapper(GenericValue productCategory, HttpServletRequest request) {
        this.productCategory = productCategory;
        this.locale = UtilHttp.getLocale(request);
        this.mimeTypeId = "text/html";
        System.out.println(productCategory);
         System.out.println(locale);
         System.out.println(mimeTypeId);
    }


> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12436617 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Thanks for your test Marco,

I will commit it ASAP. I think that I will commit also a seed data file. Thus if someone wants to test categories i18n (at least on english, italian and french for the moment...) it will be possible :  just have to delete the categories descriptions (which override the i10n of categories contents).

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12429388 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Si,

After my review (see OFBIZ-161) some changes are still needed. I have no time yet to adapt this changes, will see that soon.

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12434075 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

OK, waiting for your test...

Thanks,

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12428695 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Si,

>I think the stuff in the BSH should go into CategoryWorker.  
Yes, that's why I waited to commit it.

>Also, the formatting of some of your files is off -- is it 4 spaces formatting? 
I don't understand my original files are not badly indented. I guess I used Subclipse patch option (?). Anyway when I will commit the files it will be from original. So it's ok but ASL2 headers no to forgot (noted ;o)

>Last of all, I saw your seed data. Does it actually work - ie, are you able to switch between english and french content with my patch from OFBIZ-161? I was not able to, hence the patch there. 
I tried before your patch from OFBIZ-161 it was OK. Have you thought to to delete categories description (see my comment above the 1st july) ? Perhaps we have to merge our works ?

Thanks for your review :o)

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Marco Risaliti (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12436145 ] 
            
Marco Risaliti commented on OFBIZ-75:
-------------------------------------

Hi Jacques,

I'm sorry but I'm not agree with this behaviour if I have understood correctly.
Normally to localize descriptions we will take before if exists a localized description and only after we take the general ones.
For example also the uiLabels and EntityLabels in OFBIZ use this behaviour.
I don't like to set the description of the categories to null because what happens in case there aren't any alternative locale defined for the selected locale/categories ?
Probably it's shows a blanks description ?
What's happens in all the application where this change is not applied its probably shows a null description ?
In my opinion it's better to check if there is an alternative locale definition and in case it doesn't exists take the description of thecategory without set to null the category description.
Anyway I think that this is a great improvement to all the users that has internazional ecommerce sites and want to see different categories description for different locales.

Thanks a lot
Marco



> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos_2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12428725 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Si,

OK, I will take a look ASAP. A least next week...

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-75) I18n of categories

Posted by "Marco Risaliti (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Marco Risaliti updated OFBIZ-75:
--------------------------------

    Attachment: injectGizmos_2.xml

Hi Jacques,

I have applied your patch and I have tried it with italian seed data that I will upload to you.
I have seen that if I try to switch from english to italian it's working correctly but if I switch from italian to french the labels are not shown in french.
I have not seen how is implemented and what does it need to work correctly probably it's only my seed daata is not correctly configurated.
I didn't like very much that the localized categories are showed only if the description of the product category is null , probably there is a more elegant way.

Thanks
Marco


> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos_2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12436444 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Hi Marco,

I tested with the corrected/simplified/updated injectGizmos2.xml above and it works :o) May you confirm this point please ?

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos_2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Jacques Le Roux updated OFBIZ-75:
---------------------------------

    Attachment:     (was: i18nCateg.patch)

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12428707 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Sorry for the Freemarker plugin I don't use Wisigoth's plugin anymore but this one : http://freemarker-ide.sourceforge.net

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Jacques Le Roux updated OFBIZ-75:
---------------------------------

    Attachment:     (was: injectGizmos_2.xml)

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12425959 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Hi,

If nobody complains I wish to apply this patch in some days...

Thanks



> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Mis-à-jour: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Jacques Le Roux updated OFBIZ-75:
---------------------------------

    Attachment: i18nCateg.patch
                injectGizmos.xml

After importing injectgizmos don't forget to delete categories description, else you will see nothing.

Patch tested on a fresh check out today

Jacques

> I18n of categories
> ------------------
>
>          Key: OFBIZ-75
>          URL: http://issues.apache.org/jira/browse/OFBIZ-75
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: ecommerce, order
>     Versions: SVN trunk
>     Reporter: Jacques Le Roux
>      Fix For: SVN trunk
>  Attachments: i18nCateg.patch, injectGizmos.xml
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12430211 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Si,

Thanks for your review and help.

You are right, I think I pasted this lines from minilastviewedcategories.ftl, where a such test is made before, but I did not care in sidedeepcategory.ftl. Anyway I will use your better pattern (was not sure I could use it in one line).

I will put  the BSH snippet in CategoryWorker. java and create a new patch this afternoon.

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Jacques Le Roux updated OFBIZ-75:
---------------------------------

    Attachment: injectGizmos2.xml

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12436242 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Marco,

As explained David this is how works this functionnality for the moment. This is true for products (already in place) and with this patch for categories. Some work remains to be done for Catalog.

If I'm not wrong it's how it works and it's impossible to have both : it's override concept (like in objects methods if you prefer)

So for categories 
. either you use description in Catalog/Category/Content Override Simple Fields/Description and in this case you can't have localisation (quicker but not i18n)
. either you don't use Override Simple Fields/Description (let blank) and in this case must you provide Content/Data Resource structures in each languages you want to use (easier with seed data but you may also use content manager)

BTW I began this morning to take a look at your data but I did not get enough time to finish. Will see that ASAP.

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos_2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Marco Risaliti (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12436611 ] 
            
Marco Risaliti commented on OFBIZ-75:
-------------------------------------

Hi Jacques,

I have tested the new attached seed data and it's working correctly on the ecommerce/catalog applications.

Thanks
Marco


> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12436126 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Marco,

Sorry I did not check before my answer and I see your seed data know. I will try to understand ...

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos_2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commenté: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12418830 ] 

Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

One word about the patch : it was made from applications directory. I used Tortoise on WIndows to apply the patch from OFBiz Home and Tortoise saw that I was not on the right directory and automatically proposed applications. Tortoise seems to be a very clever tools to apply patches as actually it uses Merge (Tortoise graphicaly enhanced) and it is able to automatically detect conflicts and help you to resolve them.

Jacques

> I18n of categories
> ------------------
>
>          Key: OFBIZ-75
>          URL: http://issues.apache.org/jira/browse/OFBIZ-75
>      Project: The Open For Business Project
>         Type: Improvement

>   Components: ecommerce, order
>     Versions: SVN trunk
>     Reporter: Jacques Le Roux
>      Fix For: SVN trunk
>  Attachments: i18nCateg.patch, injectGizmos.xml
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12437780 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

I only added Demo Catalog categories in about DemoCategoriesI18nData.xml.

To see international values (at least english, french an italian for now) you only have to delete Demo Catalog categories descriptions

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12433979 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Thanks Marco,

Dis you try it ?

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12428686 ] 
            
Si Chen commented on OFBIZ-75:
------------------------------

Jacques,

Thanks for doing this -- I had noticed too that the category pages in ecommerce were not internationalized.

I think the stuff in the BSH should go into CategoryWorker.

Also, the formatting of some of your files is off -- is it 4 spaces formatting?

Last of all, I saw your seed data.  Does it actually work - ie, are you able to switch between english and french content with my patch from OFBIZ-161?  I was not able to, hence the patch there.

Si

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12428715 ] 
            
Si Chen commented on OFBIZ-75:
------------------------------

Also, Jacques - sorry to ask you this - but would you mind taking a look at the code in CategoryContentWrapper, maybe adding a couple of lines to debug and see what Content records it is pulling up as you switch from English to French and back.  To me it seems it can't possibly work as it is right now, because it is looking up a ProductCategoryContent record that has no localestring and just returning the first one, which could be anything, and then trying to render that in the locale of choice.

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12433738 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Hi,

Is anybody interested by i18n of categories ?

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12428704 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Actually for the formatting there are still some tabs in my files. And I think I used UltraEdit to change them to space in my patch. I surely did a mistake then.
In Eclipse 3.1.2, I use the scrapBook for .bsh : is there a way to tell it to replace tabs by 4 spaces when saving ?
Same question for the official Freemarcker Eclipse plugin (http://www.freemarker.org/eclipse/update) ?

Thanks

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Jacques Le Roux reassigned OFBIZ-75:
------------------------------------

    Assignee: Jacques Le Roux

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12430050 ] 
            
Si Chen commented on OFBIZ-75:
------------------------------

Jacques,

I just tried your patch.  It can cause some crashes in sidedeepcategory.ftl.  I think you would need to change this line which appears twice:

<#if catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>

to:

<#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>


> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Marco Risaliti (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12433922 ] 
            
Marco Risaliti commented on OFBIZ-75:
-------------------------------------

Hi Jacques,

I think it's a good improvements and I vote for it.

Marco

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12428712 ] 
            
Si Chen commented on OFBIZ-75:
------------------------------

Yes, I have deleted the old category descriptions, and they still didn't work for me.  Actually what was happening was that the French descriptions were coming up even on the English website.

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12436124 ] 
            
Jacques Le Roux commented on OFBIZ-75:
--------------------------------------

Thank you for the try Marco,

I see no reason why french labels should not work. So I guess that there is something in your seed data. ASA you will send them I will see that point.

For "categories are showed only if description of product category is null" please take a look at this David's comment taken from http://issues.apache.org/jira/browse/OFBIZ-81?page=comments#action_12419847
________________________________________
David E. Jones [08/juil./06 06:56 AM] 

For the Product description stuff: there isn't really any redundancy. If the fields on the Product entity are populated it won't look at the corresponding ProductContent records, that is part of the pattern. It works out very nicely and support the needs of both camps: those that want the simple fields and those that want the managed content, and this even though it was implemented this way incrementally as the fields on the Product entity were there from the beginning, and the ProductContent stuff was added later. The way this works has nothing to do with ECAs or anything. Copying that data over would kill the flexibility of the ProductContent model.

See also my comment just after (and it's an interesting issue about this subject).

Of course it works the same for categories : this is the "Override Simple Fields" concept (OSF) (better understood when you use OFBiz in english depending of the translation in you language).

Of course how this UI works is not easy to understand at the beginnig. But ASA you know the OSF concept it's clear. Moreover you may try to use content management with your own seed data to better understang the OSFconcept ( a great word for a simple thing but it's intended to set up the idea ;o)

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos_2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Jacques Le Roux closed OFBIZ-75.
--------------------------------

    Resolution: Fixed

Commited in revision: 449957  

Some points to note
The getCategoryContentWrappers is recursive
I have added categories i18n in BreadCrumbs
I have added a demo file : applications/content/data/DemoCategoriesI18nData.xml

I have commented System.out.println(....); lines in CategoryContentWrapper :
public CategoryContentWrapper(GenericValue productCategory, HttpServletRequest request) {
        this.productCategory = productCategory;
        this.locale = UtilHttp.getLocale(request);
        this.mimeTypeId = "text/html";
        /*System.out.println(productCategory);
         System.out.println(locale);
         System.out.println(mimeTypeId);*/
    }


> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml, injectGizmos2.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-75) I18n of categories

Posted by "Marco Risaliti (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-75?page=comments#action_12433997 ] 
            
Marco Risaliti commented on OFBIZ-75:
-------------------------------------

Hi Jacques,

No I'm sorry but I haven't tried your patch because I haven't the time to test it but I think it's a good idea.

Marco

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-75) I18n of categories

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-75?page=all ]

Jacques Le Roux updated OFBIZ-75:
---------------------------------

    Attachment: i18nCateg.patch

I put a new i18nCateg.patch (replacing the old).

I did not change files in wholesale (there is use of 2 sidedeepcategory.bsh files at least). Is it needed ?

Some points to help test if you use injectGizmos.xml. 
1. Don't forget to suppress the "normal" (ie not i10n) description
2. After you may edit with the content component. It works either with "en" or "en_US" types of locales
3. Of course if you suppress the "normal" description, you will see the new description only for languagues which have i10n content (french and english in injectGizmos.xml)

> I18n of categories
> ------------------
>
>                 Key: OFBIZ-75
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-75
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: i18nCateg.patch, injectGizmos.xml
>
>
> I propose this patch for i18n of categories. I found 3 places where I had to do something : eCommerce (Browse Categories and  Last Categories) and creation of order.
> I wrote it in BSH/FTL but I'm now asking myself whether it would not be better to write BSH part as a method of CategoryWorker. Because it's used in 2 files and could be consuming (not sure of overhead, cache ?).
> Attached is a data file wich creates DataResources (DESCRIPTION) in french and english for Gizmos categories. You may use it for test but have to delete the Gizmos categories (100, 101, 102) descriptions to see the changes (descriptions overrides else)
> I think I'll do something also for Catalog ASA I I'll find some time to...
> I did not change the MIT headers to ASL 2. I can do it in another patch if this one is OK and there is no pb with this change.
> Jacques

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira