Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366945

Summary: Birt localization - Birt always uses first properties file in list
Product: z_Archived Reporter: purcel <sandra.purcz>
Component: BIRTAssignee: Birt-ReportViewer <Birt-ReportViewer-inbox>
Status: RESOLVED WONTFIX QA Contact: Hao Zhou <hao.zhou>
Severity: major    
Priority: P3 CC: bluesoldier, sandra.purcz
Version: 3.7.1   
Target Milestone: 4.2.2   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=365139
Whiteboard:

Description purcel CLA 2011-12-16 09:03:30 EST
Build Identifier: Eclipse Build Id 20110916-0149 Birt Version 3.7.1

I'm working with Birt Version 3.7.1.
I have two property files for localizing my report.
messages_de_DE.properties and messages_en_GB.properties.

When runnung the report viewer url with the __locale parameter (e.g: 
http://localhost:8080/Birt/run?__report=xyz.rptdesign&__locale=en_GB, this parameter affects only the metric description on the axes, like for example date values. These will be displayed with the correct locale.

But every key, which I had created for chart titles, labels and so on will be replaced with the value from that resource file, which is in the Resources-Properties Files List at first place. If I move up the german messages_de_DE.properties file in list, all keys will display the german values. If I move up the messages_en_GB.properties file in list, all keys will display the english values. The __locale parameter is ignored.

Same behaviour in the eclipse environment, when running the report's preview.

Reproducible: Always

Steps to Reproduce:
1. Create a report with a resource bundle of two localization properties files.
2. Externalize some chart titles.
3. Try to run the report using the __locale parameter.
Comment 1 Hao Zhou CLA 2012-06-06 02:00:53 EDT
Hi,purcel
  Only the default property file should be added into the report resource list, message file of others locale should be searched automatically.
  So you should only add messages.properties to resource list, messages_de_DE.properties and messages_en_GB.properties are under same folder and don't add to resource list.
  If you can still reproduce this issue, please mail me.

Thanks
Hao.
Comment 2 Xiaoying Gu CLA 2013-01-18 04:54:25 EST
set as wontfix