| Summary: | [Help] Help System is displaying in different locale (when the browser is set to English) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Snehasish Paul <snehpaul> | ||||
| Component: | User Assistance | Assignee: | platform-ua-inbox <platform-ua-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | cgold, snehpaul | ||||
| Version: | 4.1 | ||||||
| Target Milestone: | 3.8 M3 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Snehasish Paul
Created attachment 196520 [details] WebappResources.java from Vivian >> Comments from Vivian Hi Chris, We do observe this problem, ResourceBundle.getBundle(String baseName, Locale locale) doesn't return exact bundle, so we rewrite the method in WebappResources class. Please have a try to verify whether it fix the problem. Notice: If using this method, WebappResource.properties should be moved to org.eclipse.help.webapp/src Best Regards, Vivian (Zhang Hao) Snehashish, can you give more information on the circumstances under which this occurs: You said that the default language is English, and the OS language of the server was Japanese and that Japanese strings were displayed What was the OS and locale of the client and which browser were they using? I can reproduce the problem now. The rules for displaying resources fro an infocenter should work as follows: 1. Determine the clients locale from the HttpRequest 2. Search for a resource bundle corresponding to that locale. 3. If a resource bundle for that locale is found use it, otherwise use the default bundle. The scenario where the webapp gets this wrong is where 1. The clients locale ( cl ) is one for which no file WebappResources_cl.properties does not exist in any bundle. 2. The webapp is hosted on a server with locale sl and WebappResources_sl.properties is found. In your example cl is "en" and sl is "ja" In order to debug the problem on a system running the "en" locale create a fragment for org.eclispe.help.webapp which contains the properties file /org/eclipse/help/internal/webapp/WebappResources_en.properties, this should contain the resources for some language other than English, do not install any other language fragments. Launch the infocenter and open help/index.jsp?lang=fr. Expected result: the default resources are used. Actual result: the resources are read from WebappResources_en.properties, and the labels appear in whatever language you used to create that file. I have reviewed Vivian's patch and it is good. I will change it slightly so that WebappResources.properties does not have to move and then commit. I have committed to master Vivian's patch with the modification to pick up WebappResources.properties from the usual location. The commit message is: Bug 347121 - [Help] Help System is displaying in different locale (when the browser is set to English) Snehashish, can you verify that this fixes the problem. (In reply to comment #5) > Snehashish, can you verify that this fixes the problem. Chris, I tested with the latest changes in org.eclipse.help.webapp/../WebappResources.java. It's working as expected. Thanks for the update. - Snehasish |