Bug 351033 - "In Binding View" label for Keys Preferences unexternalized
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/LocalizationHelper.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/LocalizationHelper.java
index 9f9d5d2..d15278c 100644
--- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/LocalizationHelper.java
+++ b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/LocalizationHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -126,6 +126,8 @@
 	 */
 	public static String getLocalized(String key, MApplicationElement element,
 			IEclipseContext context) {
+		if (key == null)
+			return null;
 		TranslationService translation = context.get(TranslationService.class);
 		if (translation == null)
 			return key;
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/ContextProcessingAddon.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/ContextProcessingAddon.java
index 4d05430..a2831a4 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/ContextProcessingAddon.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/ContextProcessingAddon.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@
 import org.eclipse.e4.core.services.events.IEventBroker;
 import org.eclipse.e4.ui.internal.workbench.Activator;
 import org.eclipse.e4.ui.internal.workbench.Policy;
+import org.eclipse.e4.ui.model.LocalizationHelper;
 import org.eclipse.e4.ui.model.application.MApplication;
 import org.eclipse.e4.ui.model.application.commands.MBindingContext;
 import org.eclipse.e4.ui.workbench.UIEvents;
@@ -57,8 +58,12 @@
 	private void defineContexts(MBindingContext parent, MBindingContext current) {
 		Context context = contextManager.getContext(current.getElementId());
 		if (!context.isDefined()) {
-			context.define(current.getName(), current.getDescription(), parent == null ? null
-					: parent.getElementId());
+			String localizedName = LocalizationHelper.getLocalized(current.getName(), current,
+					application.getContext());
+			String localizedDescriptor = LocalizationHelper.getLocalized(current.getDescription(),
+					current, application.getContext());
+			context.define(localizedName, localizedDescriptor,
+					parent == null ? null : parent.getElementId());
 		}
 		for (MBindingContext child : current.getChildren()) {
 			defineContexts(current, child);