eclipse-birt / birt

Eclipse BIRT™ The open source reporting and data visualization project.
http://www.eclipse.org/birt
Eclipse Public License 2.0
447 stars 388 forks source link

body/label/text-property is not localized in XLSX output #1745

Closed hdre-GFT closed 3 months ago

hdre-GFT commented 3 months ago

Observed in BIRT Designer 4.16 and 4.13.

Report design:

<simple-property-list name="includeResource">
    <value>../resources/locale_test</value>
</simple-property-list>
...
<body>
    <label id="555547">
        <text-property name="text" key="myproperty">LOCALIZATION 1 FAILED!</text-property>
    </label>
    <table id="470">
        <property name="dataSet">data</property>
        <header>
            <row id="471">
                <cell id="473">
                    <label id="547">
                        <text-property name="text" key="myproperty">LOCALIZATION 2 FAILED!</text-property>
                    </label>
                </cell>
            </row>
        </header>
    </table>
</body>

The resource bundle consists of 1 file resources/locale_test.properties with the following one-liner:

myproperty=SUCCESS!

At least the web viewer and PDF outputs are correct. In Excel output only the label in the table is localized. See attachments. locale_test.pdf locale_test.xlsx locale_test.zip

speckyspooky commented 3 months ago

Hello @hdre-GFT, I can confirm the problem and the issue is a very old one to it exists already with BIRT 4.8. The problem is located into the spudsoft-excel emitter and the label-text-validation. The code means: use at first the label text if it set and not the localization.

I will provide a fix for the issue.

In the meantime you can use a workaround and add the label into the table too or also into a grid.

merks commented 3 months ago

You’re awesome 😎

speckyspooky commented 3 months ago

The fix is added with PR #1746

speckyspooky commented 3 months ago

The fix will be available with BIRT 4.17