OFBiz
  1. OFBiz
  2. OFBIZ-1897

Product default image I18N (CONTRIBUTION)

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: SVN trunk
    • Fix Version/s: SVN trunk
    • 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 Technologies S.L.)

        Activity

        Enrique Ruiz (DiSiD Technologies S.L.) created issue -
        Enrique Ruiz (DiSiD Technologies S.L.) made changes -
        Field Original Value New Value
        Attachment defaultImage-I18N.patch [ 12386944 ]
        Hide
        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 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
        Enrique Ruiz (DiSiD Technologies 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
        Enrique Ruiz (DiSiD Technologies 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 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 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 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 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 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 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 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 added a comment - Buno, Quiproco : in "I'm near ready to commit your contribution on datafile" I was speaking about OFBIZ-1888
        Hide
        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
        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 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 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
        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
        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.
        Gavin made changes -
        Workflow jira [ 12436112 ] OFbiz Workflow [ 12505800 ]

          People

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

            Dates

            • Created:
              Updated:

              Development