From 8fcc98e15c7e2d0c2705caedf8848637959ef487 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 14 May 2010 18:42:11 +0000 Subject: [PATCH] Bug 312467: Strings were not translated properly. --- .../InstructionPointerManager.java | 6 ++-- .../dsf/debug/ui/sourcelookup/Messages.java | 30 +++++++++++++++++++ .../debug/ui/sourcelookup/Messages.properties | 13 ++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.java create mode 100644 dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.properties diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java index b94b7dc3a2a..0b5d7d70dd8 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/InstructionPointerManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 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 @@ -229,7 +229,7 @@ class InstructionPointerManager { if (frame.getLevel() == 0) { id = ID_CURRENT_IP; if (text == null) { - text = "Debug Current Instruction Pointer"; //$NON-NLS-1$ + text = Messages.IPAnnotation_primary; } if (image == null) { image = DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER_TOP); @@ -237,7 +237,7 @@ class InstructionPointerManager { } else { id = ID_SECONDARY_IP; if (text == null) { - text = "Debug Call Stack"; //$NON-NLS-1$ + text = Messages.IPAnnotation_secondary; } if (image == null) { image = DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER); diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.java new file mode 100644 index 00000000000..a29572a676a --- /dev/null +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2010 Ericsson 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Ericsson - initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.dsf.debug.ui.sourcelookup; + +import org.eclipse.osgi.util.NLS; + +/** + * @since 2.1 + */ +public class Messages extends NLS { + + public static String IPAnnotation_primary; + public static String IPAnnotation_secondary; + + static { + // initialize resource bundle + NLS.initializeMessages(Messages.class.getName(), Messages.class); + } + + private Messages() { + } +} diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.properties b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.properties new file mode 100644 index 00000000000..53845c8b95c --- /dev/null +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/Messages.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2010 Ericsson 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Ericsson - initial API and implementation +############################################################################### + +IPAnnotation_primary=Debug Current Instruction Pointer +IPAnnotation_secondary=Debug Call Stack