OFBiz
  1. OFBiz
  2. OFBIZ-4652

The Label Manager is wrongly overriding CommonEmptyHeader

    Details

      Description

      So
      <xml:lang="en" xml:space="preserve">
      is replaced by
      <value xml:lang="en" xml:space="preserve"/>

      We shoul also add </value><Unable to render embedded object: File (-- do not remove this) not found. --> to docvument the feature (todo better, more a reminder)

        Activity

        Hide
        Adrian Crum added a comment -

        I never understood the point of the CommonEmptyHeader property. If the only value it will ever contain is a single space, then why not use a single space instead of a UI label property?

        Show
        Adrian Crum added a comment - I never understood the point of the CommonEmptyHeader property. If the only value it will ever contain is a single space, then why not use a single space instead of a UI label property?
        Show
        Jacques Le Roux added a comment - Yes you are right, it's my own wrong interpretation of http://www.w3.org/TR/REC-xml/#sec-white-space . I thought it would solve the problem at hand, when it actually does anything. This should be specifically handled in Label Manager code. I think it's interesting to keep history here: http://markmail.org/message/nrovxy6zxejjoqfk https://issues.apache.org/jira/browse/OFBIZ-2349 http://svn.apache.org/viewvc?view=revision&revision=768123 https://issues.apache.org/jira/browse/OFBIZ-2171?focusedCommentId=12671931&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12671931 http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?view=diff&r1=768194&r2=768195&pathrev=768195 http://svn.apache.org/viewvc?view=revision&revision=767845 http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?r1=768195&r2=768194&pathrev=768195
        Hide
        Jacques Le Roux added a comment -

        We still need a solution here. Else we have a problem when editing a label of CommonUiLabels.xml with the Labels Manager...

        Show
        Jacques Le Roux added a comment - We still need a solution here. Else we have a problem when editing a label of CommonUiLabels.xml with the Labels Manager...
        Hide
        Adrian Crum added a comment -

        I believe the ideal solution would be to find out why the label is needed, and fix the code that depends on it - so the label is not needed any more.

        Show
        Adrian Crum added a comment - I believe the ideal solution would be to find out why the label is needed, and fix the code that depends on it - so the label is not needed any more.
        Hide
        Jacques Le Roux added a comment -

        Yes I tend to agree, I will try to check that...

        Show
        Jacques Le Roux added a comment - Yes I tend to agree, I will try to check that...
        Hide
        Jacques Le Roux added a comment -

        Why this label is needed is explained at http://markmail.org/message/42mp6djd546ici7g (part of the thread I referred about above). I think I have an idea to keep CommonEmptyHeader and address this issue. CommonEmptyHeader can be used in other cases and as proven be helpful in some projects already: we should keep it.

        Show
        Jacques Le Roux added a comment - Why this label is needed is explained at http://markmail.org/message/42mp6djd546ici7g (part of the thread I referred about above). I think I have an idea to keep CommonEmptyHeader and address this issue. CommonEmptyHeader can be used in other cases and as proven be helpful in some projects already: we should keep it.
        Hide
        Jacques Le Roux added a comment -

        Fixed in
        trunk r1338831
        R12.04 r1338836
        R11.04 r1338842
        R10.04 r1338843

        • Adds a keepSpace boolean to UtilXml.writeXmlDocument(), this allows to use xsl:preserve-space into UtilXml.createOutputTransformer()
        • Uses it into SaveLabelsToXmlFile.saveLabelsToXmlFile()
        • Adds some French labels into CommonUiLabels.xml using Labels Manager to test the new functionality
        • Adds the xml:space attribute into the valueType complexType
        • Adds the ofbiz-properties.xsd schema into the base-catalog.xml

        I got an issue when 1st trying to commit:
        Commit failed (details follow):
        While preparing
        'D:\workspace\ofbizClean\framework\common\config\CommonUiLabels.xml' for commit
        Inconsistent line ending style

        So I forced the EOLs to my locale platform value (Win XP)

        Show
        Jacques Le Roux added a comment - Fixed in trunk r1338831 R12.04 r1338836 R11.04 r1338842 R10.04 r1338843 Adds a keepSpace boolean to UtilXml.writeXmlDocument(), this allows to use xsl:preserve-space into UtilXml.createOutputTransformer() Uses it into SaveLabelsToXmlFile.saveLabelsToXmlFile() Adds some French labels into CommonUiLabels.xml using Labels Manager to test the new functionality Adds the xml:space attribute into the valueType complexType Adds the ofbiz-properties.xsd schema into the base-catalog.xml I got an issue when 1st trying to commit: Commit failed (details follow): While preparing 'D:\workspace\ofbizClean\framework\common\config\CommonUiLabels.xml' for commit Inconsistent line ending style So I forced the EOLs to my locale platform value (Win XP)
        Hide
        Jacques Le Roux added a comment - - edited

        == TYPO ==
        Forgot to ant clean, fixed and completed at
        trunk r1338845
        r12.04 r1338847
        r11.04 r1338846
        r10.04 r1338848

        Show
        Jacques Le Roux added a comment - - edited == TYPO == Forgot to ant clean, fixed and completed at trunk r1338845 r12.04 r1338847 r11.04 r1338846 r10.04 r1338848
        Hide
        Jacques Le Roux added a comment -

        Arg, I should have used the Eclipse refactor feature :/
        Definitively fixed and completed at
        trunk r1338856
        R12.04 r1338859
        R11.04 r1338858
        R10.04 r1338860

        Show
        Jacques Le Roux added a comment - Arg, I should have used the Eclipse refactor feature :/ Definitively fixed and completed at trunk r1338856 R12.04 r1338859 R11.04 r1338858 R10.04 r1338860
        Hide
        Jacques Le Roux added a comment -

        On Scott's recommendation I have deprecated w/out keepSpace versions of UtilXml.createOutputTransformer() and UtilXml.writeXmlDocument() in trunk and R12.04 at respectively r1338974 and r1338976. I have reverted from released branches (ie R11.04 and R10.04), deprecation should not be backported

        Show
        Jacques Le Roux added a comment - On Scott's recommendation I have deprecated w/out keepSpace versions of UtilXml.createOutputTransformer() and UtilXml.writeXmlDocument() in trunk and R12.04 at respectively r1338974 and r1338976. I have reverted from released branches (ie R11.04 and R10.04), deprecation should not be backported
        Hide
        Adrian Crum added a comment -

        Jacques, that email link describes what needs to be fixed, NOT why it should stay that way.

        Show
        Adrian Crum added a comment - Jacques, that email link describes what needs to be fixed, NOT why it should stay that way.
        Hide
        Jacques Le Roux added a comment - - edited

        == TYPO ==
        Hi Adrian,

        Answered on dev ML

        Show
        Jacques Le Roux added a comment - - edited == TYPO == Hi Adrian, Answered on dev ML
        Hide
        Jacques Le Roux added a comment -

        I reverted all (trunk and r12.04), because it would break the correct indentation done by UtilXml.writeXmlDocument()
        We will rather try this (quoting Adrian)

        There is a chance the XML parser treats an attribute containing a single space as an empty attribute. If that is the case, then the widget schemas can be updated to prevent that interpretation.

        Show
        Jacques Le Roux added a comment - I reverted all (trunk and r12.04), because it would break the correct indentation done by UtilXml.writeXmlDocument() We will rather try this (quoting Adrian) There is a chance the XML parser treats an attribute containing a single space as an empty attribute. If that is the case, then the widget schemas can be updated to prevent that interpretation.
        Hide
        Jacques Le Roux added a comment -

        Definitevely closed in trunk at r1340372. We simply need to replace title="$

        {uiLabelMap.CommonEmptyHeader}

        " by title=" ", even if this must be done carefully...

        Show
        Jacques Le Roux added a comment - Definitevely closed in trunk at r1340372. We simply need to replace title="$ {uiLabelMap.CommonEmptyHeader} " by title=" ", even if this must be done carefully...

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Jacques Le Roux
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development