| Summary: | GVT: Zoom input field not I18N compliant (decimal separator) | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Michael Hanner <mhanner> |
| Component: | GEF-Legacy GEF (MVC) | Assignee: | Anthony Hunter <ahunter.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.2 | ||
| Target Milestone: | 3.4.1 (Ganymede SR1) | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The problem appears to be with the GEF ZoomManager that uses Double.parseDouble
and should probably use NumberFormat to parse the original string:
From ZoomManager:
//Trim off the '%'
if (zoomString.charAt(zoomString.length() - 1) == '%')
zoomString = zoomString.substring(0, zoomString.length() - 1);
--> double newZoom = Double.parseDouble(zoomString) / 100;
setZoom(newZoom / multiplier);
double newZoom = Double.parseDouble(zoomString) / 100; changed to double newZoom = NumberFormat.getInstance().parse(zoomString).doubleValue() /100; Tested with German on Windows XP to verify. |
STEPS: 1. On an ENU system change the locale to German (Regional Options) 4. Create a diagram 5. Change the Zoom % to e.g. 95.5 6. Zoom adjusts to 96% (expected behavior) 7. Now change the zoom to 95,5 but use a comma as the separator (European format) Result: Nothing Expected: The format in the zoom input field to adjust according to the set locale