Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2017-10-16 12:56:17 +0000
committerPierre-Charles David2017-12-20 09:11:38 +0000
commitae4813ce20844eaf3d3438895bc4d458ab064a8e (patch)
tree1b1df6b02b7c25dd2979ba66a661b64d7582e8fb
parent366168b87211e89ee15db04d5a9c1c6769a20ef8 (diff)
downloadorg.eclipse.eef-ae4813ce20844eaf3d3438895bc4d458ab064a8e.tar.gz
org.eclipse.eef-ae4813ce20844eaf3d3438895bc4d458ab064a8e.tar.xz
org.eclipse.eef-ae4813ce20844eaf3d3438895bc4d458ab064a8e.zip
[528993] Complete I18N of org.eclipse.eef.properties.ui plug-in
Add missing strings and fix the Messages class initialization. Bug: 528993 Change-Id: I653a39ddf2b1d60d2ecabb89548b2b9da7eca101 Cherry-Picks: 525990 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.eef.properties.ui/plugin.properties7
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/Messages.java16
-rw-r--r--plugins/org.eclipse.eef.properties.ui/src/org/eclipse/eef/properties/ui/internal/extension/impl/EEFDescriptorRegistryEventListener.java1
-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, 26 insertions, 6 deletions
diff --git a/plugins/org.eclipse.eef.properties.ui/plugin.properties b/plugins/org.eclipse.eef.properties.ui/plugin.properties
index 84c42f451..1c27654d2 100644
--- a/plugins/org.eclipse.eef.properties.ui/plugin.properties
+++ b/plugins/org.eclipse.eef.properties.ui/plugin.properties
@@ -12,6 +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} has not been successfully instantiated.
+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 2cf37f860..409293642 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,23 +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 64db3238c..9cf36368e 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
@@ -139,7 +139,6 @@ public class EEFDescriptorRegistryEventListener<T> extends AbstractRegistryEvent
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