Bug 517979 - FileDialog Localization
Summary: FileDialog Localization
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2017-06-08 03:39 EDT by Eugen Neufeld CLA
Modified: 2017-07-12 10:01 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot from example with browser set to German locale (168.27 KB, image/gif)
2017-07-12 06:32 EDT, Markus Knauer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugen Neufeld CLA 2017-06-08 03:39:27 EDT
Hi, 

The FileDialog is currently localize using the browser locale.
If you have a custom localization mechanism in your app you would like to also be able to influence the locale of the file dialog programmatically and not rely on the browser locale for this.

Cheers
Comment 1 Markus Knauer CLA 2017-07-05 08:57:49 EDT
I've been checking our code in in almost all cases (didn't check everything) we are using constructs like

  SWT.getMessage( "SWT_OK" )
  SWT.getMessage( "SWT_Cancel" )
  SWT.getMessage( "SWT_Add" )
  SWT.getMessage( "SWT_Browse" )

which is then delegated to RWTMessages.getMessage(). This uses internally RWT.getUISession().getLocale() to look up the locale of this particular UISession. Based on this result, the ResourceBundle is used to retrieve the (translated) string. The I18N mechanism is supposed to be the same as in other places that seem to work - so what is special or different? What is returned by RWT.getUISession().getLocale(), and is a dedicated locale set somewhere with RWT.getUISession().setLocale()? Are there any examples or further hints that could help to reproduce this?
Comment 2 Ivan Furnadjiev CLA 2017-07-12 05:55:33 EDT
Any additional input here?
Comment 3 Markus Knauer CLA 2017-07-12 06:32:51 EDT
Created attachment 269328 [details]
Screenshot from example with browser set to German locale

In the meantime I received the attached screenshot using [1] and showing a "Keine Datei ausgewählt." tooltip ("No file selected.") as an example.

It turns out that this particular tooltip is a native one, i.e. provided by the browser itself, and it is really up to the browser and its settings what to show there. More importantly, we cannot really influence the text that is shown there.

Maybe we can suppress all tooltips there as a workaround, but that needs some investigations if this is feasible.


[1] http://rap.eclipsesource.com/demo/release/rapdemo/#file-upload
Comment 4 Ivan Furnadjiev CLA 2017-07-12 10:01:41 EDT
Native tooltip has been suppressed with change https://git.eclipse.org/r/#/c/101099/