Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1897

Product default image I18N (CONTRIBUTION)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: order
    • Labels:
      None
    • Environment:

      Ubuntu 8.04, JDK 1.5

      Description

      I have added support for internationalizing the Product's defaultImage.jpg.

      Attached I have included the patch.

      Best regards.

      1. defaultImage-I18N.patch
        8 kB
        Enrique Ruiz (DiSiD Corporation S.L.)

        Activity

        Hide
        bruno.busco Bruno Busco added a comment -

        Interesting...but...
        ...shouldn't we use the new XML format for things like this? We have moved away (almost completely) from the .properties format for locale dependent stuff.

        Show
        bruno.busco Bruno Busco added a comment - Interesting...but... ...shouldn't we use the new XML format for things like this? We have moved away (almost completely) from the .properties format for locale dependent stuff.
        Hide
        eruiz Enrique Ruiz (DiSiD Corporation S.L.) added a comment -

        Ups, sorry, I didn't know this new XML format. Do you have some link or reference to learn about this theme?

        Show
        eruiz Enrique Ruiz (DiSiD Corporation S.L.) added a comment - Ups, sorry, I didn't know this new XML format. Do you have some link or reference to learn about this theme?
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Yes, and please take care of tabs in your patches. BTW I'm near ready to commit your contribution on datafile but I take the time to convert the bsh to groovy (another new "feature" ;o)

        Thanks

        Show
        jacques.le.roux Jacques Le Roux added a comment - Yes, and please take care of tabs in your patches. BTW I'm near ready to commit your contribution on datafile but I take the time to convert the bsh to groovy (another new "feature" ;o) Thanks
        Hide
        bruno.busco Bruno Busco added a comment -

        Enrique,
        you can just look for any *UILabels.xml file. They are tipically located in the component/config folder.
        The schema is really simple.

        Show
        bruno.busco Bruno Busco added a comment - Enrique, you can just look for any *UILabels.xml file. They are tipically located in the component/config folder. The schema is really simple.
        Hide
        bruno.busco Bruno Busco added a comment -

        Jacques,
        I cannot see any bsh file in the patch.
        It is as simple as a definition of a locale dependent string and a replace of a constant file name with that string.

        Show
        bruno.busco Bruno Busco added a comment - Jacques, I cannot see any bsh file in the patch. It is as simple as a definition of a locale dependent string and a replace of a constant file name with that string.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Buno,

        Quiproco : in "I'm near ready to commit your contribution on datafile" I was speaking about OFBIZ-1888

        Show
        jacques.le.roux Jacques Le Roux added a comment - Buno, Quiproco : in "I'm near ready to commit your contribution on datafile" I was speaking about OFBIZ-1888
        Hide
        jonesde David E. Jones added a comment -

        Why wouldn't we put this sort of setting in the database, like we do with the other content settings?

        Show
        jonesde David E. Jones added a comment - Why wouldn't we put this sort of setting in the database, like we do with the other content settings?
        Hide
        bruno.busco Bruno Busco added a comment -

        David,
        could you please give some more details about your suggested way of doing this?

        I have tryed the following but I am not sure to be on the right path:

        I have created two Image-type DataResources one with locale "en" and one with locale "it". For each one of them I uploaded a proper image.
        The two DataResources have, of course, got two different dataResourceId.

        I can display the first with:
        http://localhost:8080/content/control/ViewSimpleContent?dataResourceId=defaultimage
        and the second with:
        http://localhost:8080/content/control/ViewSimpleContent?dataResourceId=10000

        Is there a way to embed the locale in the link and have the content manager select the correct dataResource?

        Many thanks

        Show
        bruno.busco Bruno Busco added a comment - David, could you please give some more details about your suggested way of doing this? I have tryed the following but I am not sure to be on the right path: I have created two Image-type DataResources one with locale "en" and one with locale "it". For each one of them I uploaded a proper image. The two DataResources have, of course, got two different dataResourceId. I can display the first with: http://localhost:8080/content/control/ViewSimpleContent?dataResourceId=defaultimage and the second with: http://localhost:8080/content/control/ViewSimpleContent?dataResourceId=10000 Is there a way to embed the locale in the link and have the content manager select the correct dataResource? Many thanks
        Hide
        jonesde David E. Jones added a comment -

        Localization in content rendering is done through the Content entity, using the ContentAssoc with a type of alternate locale.

        DataResource records are much more simple and meant to be in a single locale, and not have related data resources in alternate locales (in other words the association is done through the alternate locale).

        You can look at the ecommerce/data product demo data to see some examples of products with content in multiple locales.

        Show
        jonesde David E. Jones added a comment - Localization in content rendering is done through the Content entity, using the ContentAssoc with a type of alternate locale. DataResource records are much more simple and meant to be in a single locale, and not have related data resources in alternate locales (in other words the association is done through the alternate locale). You can look at the ecommerce/data product demo data to see some examples of products with content in multiple locales.

          People

          • Assignee:
            Unassigned
            Reporter:
            eruiz Enrique Ruiz (DiSiD Corporation S.L.)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development