Skip to content

Commit e5007f9

Browse files
ptzieglerazoitl
authored andcommitted
Bug 205221 - ZoomManager does not support turkish properly
In e.g. Turkish, the percent sign is supposed to be on the left side of the number. This change converts the format used for showing the zoom level to an i18n string, so that language packs can account for such differences. Closes https://bugs.eclipse.org/bugs/show_bug.cgi?id=205221
1 parent 2a86541 commit e5007f9

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

org.eclipse.draw2d/src/org/eclipse/draw2d/internal/Messages.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024 Patrick Ziegler and others.
2+
* Copyright (c) 2024, 2025 Patrick Ziegler and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -28,4 +28,5 @@ private Messages() {
2828
}
2929

3030
public static final String LayoutManager_InvalidConstraint = BUNDLE.getString("LayoutManager_InvalidConstraint"); //$NON-NLS-1$
31+
public static final String AbstractZoomManager_PercentFormat = BUNDLE.getString("AbstractZoomManager_PercentFormat"); //$NON-NLS-1$
3132
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
LayoutManager_InvalidConstraint = {0} was given {1} as constraint for Figure. {2} expected!
1+
LayoutManager_InvalidConstraint = {0} was given {1} as constraint for Figure. {2} expected!
2+
AbstractZoomManager_PercentFormat = ####%

org.eclipse.draw2d/src/org/eclipse/draw2d/zoom/AbstractZoomManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2023 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -27,6 +27,7 @@
2727
import org.eclipse.draw2d.geometry.Dimension;
2828
import org.eclipse.draw2d.geometry.Point;
2929
import org.eclipse.draw2d.geometry.Rectangle;
30+
import org.eclipse.draw2d.internal.Messages;
3031

3132
/**
3233
* Manage the primary zoom function in a graphical viewer.
@@ -64,7 +65,7 @@ public abstract class AbstractZoomManager {
6465

6566
private List<String> zoomLevelContributions = Collections.emptyList();
6667

67-
DecimalFormat format = new DecimalFormat("####%"); //$NON-NLS-1$
68+
DecimalFormat format = new DecimalFormat(Messages.AbstractZoomManager_PercentFormat);
6869

6970
/**
7071
* The zoom scroll policy associated with this zoom manager. Zoom scroll

0 commit comments

Comments
 (0)