Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365139 - Localization parameters groups is not using the correct locale
Summary: Localization parameters groups is not using the correct locale
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.2.2   Edit
Assignee: Gang Liu CLA
QA Contact: Hao Zhou CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 16:38 EST by donino donino CLA
Modified: 2013-02-06 04:26 EST (History)
3 users (show)

See Also:


Attachments
Zip archive with a rptdesign example highlighting this issue, its related properties filesZip archive with a rptdesign example highlighting this issue, its related prope and screens within a PDF file (66.88 KB, application/x-zip-compressed)
2011-12-30 11:08 EST, donino donino CLA
no flags Details
I reattached the PDF file, there was a little mistake in scenario 2' description (69.31 KB, application/pdf)
2011-12-30 12:57 EST, donino donino CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description donino donino CLA 2011-11-29 16:38:16 EST
The group parameters prompts are displayed by using the application server locale, whereas it should be the request locale. 

This issue happens both with WebBirtViewer and a custom API servlet. 

For instance, if a WebBirtViewer is run in tomcat, with java starting option " -Duser.language=fr",  when using an url such:
http://localhost:8080/birt/frameset?__report=report/testlocale.rptdesign&__locale=en

Birt engine will correctly use "en" locale to get scalar parameters prompts, but will use "fr" for groups. 


This issue happens in a custom servlet/portlet context too:  using "task.setLocale(request.getLocale())" in a render task won't have any effect for groups, server default locale is always used.
Comment 1 Hao Zhou CLA 2011-12-30 02:54:21 EST
I can't reproduce this issue.
Could you provide a sample report and screenshot?
Comment 2 donino donino CLA 2011-12-30 11:08:56 EST
Created attachment 208873 [details]
Zip archive with a rptdesign example highlighting this issue, its related properties filesZip archive with a rptdesign example highlighting this issue, its related prope  and screens within a PDF file

Before running this example, copy the properties files in your webviewer's resource path root, and use URL parameter __locale with "en" or "fr" value  (must be different from your JVM's locale) to highlight the issue. 

Screencasts in the PDF file show the parameter dialog box results for 3 distinct scenarios:
1/Default locale JVM in english and url with __locale=en
2/Default locale JVM in english and url with __locale=fr
3/Default locale JVM in french and url with __locale=en

You can see the issue in action in scenario 2 and 3.

Please let me know if you need more informations

Dom
Comment 3 donino donino CLA 2011-12-30 12:57:41 EST
Created attachment 208880 [details]
I reattached the PDF file, there was a little mistake in scenario 2' description
Comment 4 Gang Liu CLA 2012-06-06 02:44:55 EDT
it's a bug of report engine.

fixed.
Comment 5 donino donino CLA 2012-07-08 14:05:07 EDT
Hi,

unfortunately this bug is not still fixed. Use the rptdesign initially attached, and deploy it on a Birt WebViewer 4.2 with its properties files. Try to change __locale parameter in URL: it affects parameter prompts, but not group prompts.
Comment 6 Xiaoying Gu CLA 2013-02-06 04:26:49 EST
I can not reproduce this issue with latest 4.2.2 build, both parameter prompts and group prompts can be localized.