Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2017-10-16 12:56:17 +0000
committerPierre-Charles David2017-12-07 14:45:12 +0000
commit14b7c04f0b08b1b012bef6bea99b24f01c3dea39 (patch)
tree48731a1246426a4f879944ea11e8917700bd0e6a
parente02ca04e82ae8aee28aedb3941fca7537b69d126 (diff)
downloadorg.eclipse.eef-14b7c04f0b08b1b012bef6bea99b24f01c3dea39.tar.gz
org.eclipse.eef-14b7c04f0b08b1b012bef6bea99b24f01c3dea39.tar.xz
org.eclipse.eef-14b7c04f0b08b1b012bef6bea99b24f01c3dea39.zip
[525990] Complete I18N of org.eclipse.eef.properties.ui plug-in
Add missing strings and fix the Messages class initialization. Bug: 525990 Change-Id: I93fa48fca6e9b2b039a696dbd3a34be82e1832d7 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.properties.ui/plugin.properties6
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/Messages.java18
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/extension/impl/EEFDescriptorRegistryEventListener.java8
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTabbedPropertyList.java5
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTopNavigationElement.java3
5 files changed, 31 insertions, 9 deletions
diff --git a/plugins/org.eclipse.eef.properties.ui/plugin.properties b/plugins/org.eclipse.eef.properties.ui/plugin.properties
index 945b9d0d5..88d2b7580 100644
--- a/plugins/org.eclipse.eef.properties.ui/plugin.properties
+++ b/plugins/org.eclipse.eef.properties.ui/plugin.properties
@@ -12,5 +12,9 @@ eefTabDescriptorFilterExtensionPoint.name = EEF Tab Descriptor Filter
DescriptorRegistryEventListener_missingAttribute=The attribute {1} is missing from the configuration element {0}.
DescriptorRegistryEventListener_extensionAlreadyContributed=The extension {0} has already been contributed.
+DescriptorRegistryEventListener_cannotInstantiateExtension=The extension {0} cannot be instantiated.
-EEFTabbedPropertyRegistry_MissingSectionDescriptorId=The section descriptor does not have an identifier, it cannot be used. \ No newline at end of file
+EEFTabbedPropertyRegistry_MissingSectionDescriptorId=The section descriptor does not have an identifier, it cannot be used.
+
+EEFTopNavigationElement_noPropertiesAvailable=No properties available
+EEFTabbedPropertyList_propertiesNotAvailable=Properties not available
diff --git a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/Messages.java b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/Messages.java
index df704e0d3..9e03debff 100644
--- a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/Messages.java
+++ b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/Messages.java
@@ -10,21 +10,39 @@
*******************************************************************************/
package org.eclipse.eef.properties.ui.internal;
+import org.eclipse.eef.common.api.utils.I18N;
+import org.eclipse.eef.common.api.utils.I18N.TranslatableMessage;
+
/**
* Utility class used to hold the messages of the bundle.
*
* @author mbats
*/
public final class Messages {
+ static {
+ I18N.initializeMessages(Messages.class, EEFTabbedPropertyViewPlugin.INSTANCE);
+ }
// CHECKSTYLE:OFF
+ @TranslatableMessage
public static String DescriptorRegistryEventListener_missingAttribute;
+ @TranslatableMessage
public static String DescriptorRegistryEventListener_extensionAlreadyContributed;
+ @TranslatableMessage
public static String EEFTabbedPropertyRegistry_MissingSectionDescriptorId;
+ @TranslatableMessage
+ public static String DescriptorRegistryEventListener_cannotInstantiateExtension;
+
+ @TranslatableMessage
+ public static String EEFTopNavigationElement_noPropertiesAvailable;
+
+ @TranslatableMessage
+ public static String EEFTabbedPropertyList_propertiesNotAvailable;
+
// CHECKSTYLE:ON
/**
diff --git a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/extension/impl/EEFDescriptorRegistryEventListener.java b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/extension/impl/EEFDescriptorRegistryEventListener.java
index 4ceff3cad..fb873b731 100644
--- a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/extension/impl/EEFDescriptorRegistryEventListener.java
+++ b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/extension/impl/EEFDescriptorRegistryEventListener.java
@@ -136,11 +136,9 @@ public class EEFDescriptorRegistryEventListener<T> extends AbstractRegistryEvent
EEFTabbedPropertyViewPlugin.getPlugin().error(message);
}
} catch (CoreException e) {
- // String message =
- // MessageFormat.format(Messages.DescriptorRegistryEventListener_cannotInstantiateExtension,
- // configurationElement.getAttribute(IMPL_CLASS_DESCRIPTOR_ATTR));
- // EEFTabbedPropertyViewPlugin.getInstance().logError(message);
-
+ String message = MessageFormat.format(Messages.DescriptorRegistryEventListener_cannotInstantiateExtension,
+ configurationElement.getAttribute(IMPL_CLASS_DESCRIPTOR_ATTR));
+ EEFTabbedPropertyViewPlugin.getPlugin().error(message, e);
return false;
}
diff --git a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTabbedPropertyList.java b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTabbedPropertyList.java
index 76ff54d12..2de6a5073 100644
--- a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTabbedPropertyList.java
+++ b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTabbedPropertyList.java
@@ -20,6 +20,7 @@ import java.util.Map;
import org.eclipse.eef.common.ui.api.EEFWidgetFactory;
import org.eclipse.eef.properties.ui.api.IEEFTabItem;
+import org.eclipse.eef.properties.ui.internal.Messages;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.ACC;
@@ -46,8 +47,8 @@ import org.eclipse.swt.widgets.Listener;
* @author Anthony Hunter
* @author Stephane Begaudeau
*/
-public class EEFTabbedPropertyList extends Composite {
+public class EEFTabbedPropertyList extends Composite {
/**
* This constant is used to indicate NONE (for example the index of the currently selected tab).
*/
@@ -409,7 +410,7 @@ public class EEFTabbedPropertyList extends Composite {
public Point computeSize(int wHint, int hHint, boolean changed) {
Point result = super.computeSize(hHint, wHint, changed);
if (widestLabelIndex == -1) {
- String propertiesNotAvailable = "Properties not available"; //$NON-NLS-1$
+ String propertiesNotAvailable = Messages.EEFTabbedPropertyList_propertiesNotAvailable;
result.x = getTextDimension(propertiesNotAvailable).x + INDENT;
} else {
/*
diff --git a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTopNavigationElement.java b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTopNavigationElement.java
index b9fec3892..87c41c41e 100644
--- a/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTopNavigationElement.java
+++ b/plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/page/propertylist/EEFTopNavigationElement.java
@@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.eef.properties.ui.internal.page.propertylist;
+import org.eclipse.eef.properties.ui.internal.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
@@ -93,7 +94,7 @@ public class EEFTopNavigationElement extends Canvas {
int height = fm.getHeight();
int textMiddle = (bounds.height - height) / 2;
event.gc.setForeground(this.tabPropertyList.getColorHolder().getWidgetForeground());
- String propertiesNotAvailable = "No properties available"; //$NON-NLS-1$
+ String propertiesNotAvailable = Messages.EEFTopNavigationElement_noPropertiesAvailable;
event.gc.drawText(propertiesNotAvailable, textIndent, textMiddle);
}

Back to the top