mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Marked those strings that are non-translatable as such and externalized those strings that can be translated.
This commit is contained in:
parent
6cb732a6d4
commit
463db40e82
13 changed files with 58 additions and 34 deletions
|
@ -1,3 +1,20 @@
|
||||||
|
2004-03-03 James Ciesielski
|
||||||
|
Marked those strings that are non-translatable as such and externalized
|
||||||
|
those strings that can be translated.
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderHelpContextIds.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/ui/ManagedBuilderUIPlugin.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/properties/BrowseEntryDialog.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolsSettingsStore.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedConfigDialog.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/properties/NewConfigurationDialog.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/properties/SummaryFieldEditor.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListLabelProvider.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedCProjectWizard.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java
|
||||||
|
|
||||||
2004-03-02 Sean Evoy
|
2004-03-02 Sean Evoy
|
||||||
Work to support new feature C1, "Set Tool Command in Project".
|
Work to support new feature C1, "Set Tool Command in Project".
|
||||||
Created a new preference page that has a single string field editor
|
Created a new preference page that has a single string field editor
|
||||||
|
|
|
@ -14,9 +14,9 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
* **********************************************************************/
|
* **********************************************************************/
|
||||||
|
|
||||||
public interface ManagedBuilderHelpContextIds {
|
public interface ManagedBuilderHelpContextIds {
|
||||||
public static final String PREFIX= CUIPlugin.PLUGIN_ID + ".";
|
public static final String PREFIX= CUIPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
|
||||||
|
|
||||||
// Wizard pages
|
// Wizard pages
|
||||||
public static final String MAN_PROJ_PLATFORM_HELP = PREFIX + "man_proj_platform_help";
|
public static final String MAN_PROJ_PLATFORM_HELP = PREFIX + "man_proj_platform_help"; //$NON-NLS-1$
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,9 +49,9 @@ public class ManagedBuilderUIPlugin extends Plugin {
|
||||||
try {
|
try {
|
||||||
return resourceBundle.getString(key);
|
return resourceBundle.getString(key);
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException e) {
|
||||||
return "!" + key + "!";
|
return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
return "#" + key + "#";
|
return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,10 @@ BuildPropertyPage.tip.config=Select the configuration to edit
|
||||||
BuildPropertyPage.tip.addconf=Add configurations for the platform
|
BuildPropertyPage.tip.addconf=Add configurations for the platform
|
||||||
BuildPropertyPage.tip.remconf=Remove configurations for the platform
|
BuildPropertyPage.tip.remconf=Remove configurations for the platform
|
||||||
BuildPropertyPage.manage.title=Manage
|
BuildPropertyPage.manage.title=Manage
|
||||||
|
BuildPropertyPage.error.Unknown_tree_element=Unknown type of element in tree of type {0}
|
||||||
|
|
||||||
|
# ----------- Entry Dialog -----------
|
||||||
|
BrowseEntryDialog.error.Folder_name_invalid=Folder name invalid
|
||||||
|
|
||||||
# ----------- New Configuration -----------
|
# ----------- New Configuration -----------
|
||||||
NewConfiguration.label.name=Configuration name:
|
NewConfiguration.label.name=Configuration name:
|
||||||
|
|
|
@ -51,21 +51,22 @@ public class BrowseEntryDialog extends SelectionStatusDialog {
|
||||||
private static final String HIDE = "hideAdvanced"; //$NON-NLS-1$
|
private static final String HIDE = "hideAdvanced"; //$NON-NLS-1$
|
||||||
private static final String SHOW = "showAdvanced"; //$NON-NLS-1$
|
private static final String SHOW = "showAdvanced"; //$NON-NLS-1$
|
||||||
private static final String EMPTY = "NewFolderDialog.folderNameEmpty"; //$NON-NLS-1$
|
private static final String EMPTY = "NewFolderDialog.folderNameEmpty"; //$NON-NLS-1$
|
||||||
|
private static final String ERROR_FOLDER_NAME_INVALID = PREFIX + ".error.Folder_name_invalid"; //$NON-NLS-1$
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* The title of the dialog.
|
* The title of the dialog.
|
||||||
*/
|
*/
|
||||||
private String title = "";
|
private String title = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* The message to display, or <code>null</code> if none.
|
* The message to display, or <code>null</code> if none.
|
||||||
*/
|
*/
|
||||||
private String message = "";
|
private String message = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* The input value; the empty string by default.
|
* The input value; the empty string by default.
|
||||||
*/
|
*/
|
||||||
private String folderName = "";
|
private String folderName = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -320,14 +321,14 @@ public class BrowseEntryDialog extends SelectionStatusDialog {
|
||||||
protected void validateLocation() {
|
protected void validateLocation() {
|
||||||
folderName = text.getText();
|
folderName = text.getText();
|
||||||
// Empty or null string is invalid
|
// Empty or null string is invalid
|
||||||
if (folderName == null || folderName.equals("")) {
|
if (folderName == null || folderName.equals("")) { //$NON-NLS-1$
|
||||||
updateStatus(IStatus.ERROR, IDEWorkbenchMessages.getString(EMPTY));
|
updateStatus(IStatus.ERROR, IDEWorkbenchMessages.getString(EMPTY));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// Make sure that the specified location exists
|
// Make sure that the specified location exists
|
||||||
IPath path = new Path(folderName);
|
IPath path = new Path(folderName);
|
||||||
if (!path.isValidPath(folderName)) {
|
if (!path.isValidPath(folderName)) {
|
||||||
updateStatus(IStatus.ERROR, "Folder name invalid");
|
updateStatus(IStatus.ERROR, ManagedBuilderUIPlugin.getResourceString(ERROR_FOLDER_NAME_INVALID)); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -553,7 +553,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
id *= -1;
|
id *= -1;
|
||||||
}
|
}
|
||||||
String newId = parent.getId() + "." + id;
|
String newId = parent.getId() + "." + id; //$NON-NLS-1$
|
||||||
IConfiguration newConfig = selectedTarget.createConfiguration(parent, newId);
|
IConfiguration newConfig = selectedTarget.createConfiguration(parent, newId);
|
||||||
newConfig.setName(name);
|
newConfig.setName(name);
|
||||||
// Update the config lists
|
// Update the config lists
|
||||||
|
@ -627,7 +627,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
return result.toString().trim();
|
return result.toString().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] tokens = arguments.trim().split("\\s");
|
String[] tokens = arguments.trim().split("\\s"); //$NON-NLS-1$
|
||||||
/*
|
/*
|
||||||
* Cases to consider
|
* Cases to consider
|
||||||
* --<flag> Sensible, modern single flag. Add to result and continue.
|
* --<flag> Sensible, modern single flag. Add to result and continue.
|
||||||
|
@ -637,15 +637,15 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
* -<flag_with_arg>ARG Corrupt case where next token should be arg but isn't
|
* -<flag_with_arg>ARG Corrupt case where next token should be arg but isn't
|
||||||
* -<flags> [target].. Flags with no args, another token, add flags and stop.
|
* -<flags> [target].. Flags with no args, another token, add flags and stop.
|
||||||
*/
|
*/
|
||||||
Pattern flagPattern = Pattern.compile("C|f|I|j|l|O|W");
|
Pattern flagPattern = Pattern.compile("C|f|I|j|l|O|W"); //$NON-NLS-1$
|
||||||
// Look for a '-' followed by 1 or more flags with no args and exactly 1 that expects args
|
// Look for a '-' followed by 1 or more flags with no args and exactly 1 that expects args
|
||||||
Pattern mixedFlagWithArg = Pattern.compile("-[^CfIjloW]*[CfIjloW]{1}.+");
|
Pattern mixedFlagWithArg = Pattern.compile("-[^CfIjloW]*[CfIjloW]{1}.+"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < tokens.length; ++i) {
|
for (int i = 0; i < tokens.length; ++i) {
|
||||||
String currentToken = tokens[i];
|
String currentToken = tokens[i];
|
||||||
if (currentToken.startsWith("--")) {
|
if (currentToken.startsWith("--")) { //$NON-NLS-1$
|
||||||
result.append(currentToken);
|
result.append(currentToken);
|
||||||
result.append(" ");
|
result.append(" "); //$NON-NLS-1$
|
||||||
} else if (currentToken.startsWith("-")) {
|
} else if (currentToken.startsWith("-")) { //$NON-NLS-1$
|
||||||
// Is there another token
|
// Is there another token
|
||||||
if (i + 1 >= tokens.length) {
|
if (i + 1 >= tokens.length) {
|
||||||
//We are done
|
//We are done
|
||||||
|
@ -657,19 +657,19 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
if (!flagMatcher.find()) {
|
if (!flagMatcher.find()) {
|
||||||
// Evalutate whether the next token should be added normally
|
// Evalutate whether the next token should be added normally
|
||||||
result.append(currentToken);
|
result.append(currentToken);
|
||||||
result.append(" ");
|
result.append(" "); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
// Look for the case where there is no space between flag and arg
|
// Look for the case where there is no space between flag and arg
|
||||||
if (mixedFlagWithArg.matcher(currentToken).matches()) {
|
if (mixedFlagWithArg.matcher(currentToken).matches()) {
|
||||||
// Add this single token and keep going
|
// Add this single token and keep going
|
||||||
result.append(currentToken);
|
result.append(currentToken);
|
||||||
result.append(" ");
|
result.append(" "); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
// Add this token and the next one right now
|
// Add this token and the next one right now
|
||||||
result.append(currentToken);
|
result.append(currentToken);
|
||||||
result.append(" ");
|
result.append(" "); //$NON-NLS-1$
|
||||||
result.append(nextToken);
|
result.append(nextToken);
|
||||||
result.append(" ");
|
result.append(" "); //$NON-NLS-1$
|
||||||
// Skip the next token the next time through, though
|
// Skip the next token the next time through, though
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
@ -691,7 +691,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
boolean hasSpace = false;
|
boolean hasSpace = false;
|
||||||
|
|
||||||
// Try to separate out the command from the arguments
|
// Try to separate out the command from the arguments
|
||||||
String[] result = rawCommand.split("\\s");
|
String[] result = rawCommand.split("\\s"); //$NON-NLS-1$
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Here are the cases to consider:
|
* Here are the cases to consider:
|
||||||
|
@ -709,14 +709,14 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
} else {
|
} else {
|
||||||
// See if the next segment is the start of the flags
|
// See if the next segment is the start of the flags
|
||||||
String nextSegment = result[i + 1];
|
String nextSegment = result[i + 1];
|
||||||
if (nextSegment.startsWith("-")) {
|
if (nextSegment.startsWith("-")) { //$NON-NLS-1$
|
||||||
// we have found the end of the command
|
// we have found the end of the command
|
||||||
command.append(cmdSegment);
|
command.append(cmdSegment);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
command.append(cmdSegment);
|
command.append(cmdSegment);
|
||||||
// Add the whitespace back
|
// Add the whitespace back
|
||||||
command.append(" ");
|
command.append(" "); //$NON-NLS-1$
|
||||||
hasSpace = true;
|
hasSpace = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.jface.util.ListenerList;
|
||||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
|
|
||||||
public class BuildToolsSettingsStore implements IPreferenceStore {
|
public class BuildToolsSettingsStore implements IPreferenceStore {
|
||||||
public static final String DEFAULT_SEPERATOR = ";";
|
public static final String DEFAULT_SEPERATOR = ";"; //$NON-NLS-1$
|
||||||
|
|
||||||
// List of listeners on the property store
|
// List of listeners on the property store
|
||||||
private ListenerList listenerList;
|
private ListenerList listenerList;
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class ManageConfigDialog extends Dialog {
|
||||||
// Map of new configurations chosen by the user
|
// Map of new configurations chosen by the user
|
||||||
private SortedMap newConfigs;
|
private SortedMap newConfigs;
|
||||||
// The title of the dialog.
|
// The title of the dialog.
|
||||||
private String title = "";
|
private String title = ""; //$NON-NLS-1$
|
||||||
// State of the check box on exit
|
// State of the check box on exit
|
||||||
private boolean useDefaultMake;
|
private boolean useDefaultMake;
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ public class ManageConfigDialog extends Dialog {
|
||||||
|
|
||||||
final Label dotLabel = new Label(outputGroup, SWT.CENTER);
|
final Label dotLabel = new Label(outputGroup, SWT.CENTER);
|
||||||
dotLabel.setFont(outputGroup.getFont());
|
dotLabel.setFont(outputGroup.getFont());
|
||||||
dotLabel.setText(new String("."));
|
dotLabel.setText(new String(".")); //$NON-NLS-1$
|
||||||
dotLabel.setLayoutData(new GridData());
|
dotLabel.setLayoutData(new GridData());
|
||||||
|
|
||||||
buildArtifactExt = new Text(outputGroup, SWT.SINGLE | SWT.BORDER);
|
buildArtifactExt = new Text(outputGroup, SWT.SINGLE | SWT.BORDER);
|
||||||
|
@ -581,7 +581,7 @@ public class ManageConfigDialog extends Dialog {
|
||||||
makeCommand = managedTarget.getMakeCommand();
|
makeCommand = managedTarget.getMakeCommand();
|
||||||
String makeArgs = managedTarget.getMakeArguments();
|
String makeArgs = managedTarget.getMakeArguments();
|
||||||
if (makeArgs.length() > 0) {
|
if (makeArgs.length() > 0) {
|
||||||
makeCommand += " " + makeArgs;
|
makeCommand += " " + makeArgs; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class NewConfigurationDialog extends Dialog {
|
||||||
private ITarget target;
|
private ITarget target;
|
||||||
private String newName;
|
private String newName;
|
||||||
private String [] allNames;
|
private String [] allNames;
|
||||||
private String title = "";
|
private String title = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Text;
|
||||||
|
|
||||||
public class SummaryFieldEditor extends FieldEditor {
|
public class SummaryFieldEditor extends FieldEditor {
|
||||||
// Whitespace character
|
// Whitespace character
|
||||||
private static final String WHITESPACE = " ";
|
private static final String WHITESPACE = " "; //$NON-NLS-1$
|
||||||
|
|
||||||
// The top level composite
|
// The top level composite
|
||||||
protected Composite parent;
|
protected Composite parent;
|
||||||
|
|
|
@ -13,6 +13,7 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
|
||||||
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIImages;
|
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIImages;
|
||||||
|
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin;
|
||||||
import org.eclipse.jface.viewers.LabelProvider;
|
import org.eclipse.jface.viewers.LabelProvider;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
|
|
||||||
|
@ -20,6 +21,7 @@ class ToolListLabelProvider extends LabelProvider {
|
||||||
private final Image IMG_TOOL = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_TOOL);
|
private final Image IMG_TOOL = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_TOOL);
|
||||||
private final Image IMG_CAT = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT);
|
private final Image IMG_CAT = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT);
|
||||||
private static final String TREE_LABEL = "BuildPropertyPage.label.ToolTree"; //$NON-NLS-1$
|
private static final String TREE_LABEL = "BuildPropertyPage.label.ToolTree"; //$NON-NLS-1$
|
||||||
|
private static final String ERROR_UNKNOWN_ELEMENT = "BuildPropertyPage.error.Unknown_tree_element"; //$NON-NLS-1$
|
||||||
|
|
||||||
public Image getImage(Object element) {
|
public Image getImage(Object element) {
|
||||||
// If the element is a configuration, return the folder image
|
// If the element is a configuration, return the folder image
|
||||||
|
@ -51,6 +53,6 @@ class ToolListLabelProvider extends LabelProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected RuntimeException unknownElement(Object element) {
|
protected RuntimeException unknownElement(Object element) {
|
||||||
return new RuntimeException("Unknown type of element in tree of type " + element.getClass().getName());
|
return new RuntimeException(ManagedBuilderUIPlugin.getFormattedString(ERROR_UNKNOWN_ELEMENT, element.getClass().getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,8 +15,8 @@ import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin;
|
||||||
|
|
||||||
public class NewManagedCProjectWizard extends NewManagedProjectWizard {
|
public class NewManagedCProjectWizard extends NewManagedProjectWizard {
|
||||||
// String constants
|
// String constants
|
||||||
private static final String WZ_TITLE = "MngCWizard.title";
|
private static final String WZ_TITLE = "MngCWizard.title"; //$NON-NLS-1$
|
||||||
private static final String WZ_DESC = "MngCWizard.description";
|
private static final String WZ_DESC = "MngCWizard.description"; //$NON-NLS-1$
|
||||||
private static final String SETTINGS_TITLE= "MngCWizardSettings.title"; //$NON-NLS-1$
|
private static final String SETTINGS_TITLE= "MngCWizardSettings.title"; //$NON-NLS-1$
|
||||||
private static final String SETTINGS_DESC= "MngCWizardSettings.description"; //$NON-NLS-1$
|
private static final String SETTINGS_DESC= "MngCWizardSettings.description"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
id *= -1;
|
id *= -1;
|
||||||
}
|
}
|
||||||
newTarget.createConfiguration(config, config.getId() + "." + id);
|
newTarget.createConfiguration(config, config.getId() + "." + id); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
// Now add the first config in the list as the default
|
// Now add the first config in the list as the default
|
||||||
IConfiguration[] newConfigs = newTarget.getConfigurations();
|
IConfiguration[] newConfigs = newTarget.getConfigurations();
|
||||||
|
@ -172,7 +172,7 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
|
||||||
* @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#getProjectID()
|
* @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#getProjectID()
|
||||||
*/
|
*/
|
||||||
public String getProjectID() {
|
public String getProjectID() {
|
||||||
return "org.eclipse.cdt.make.core.make";
|
return "org.eclipse.cdt.make.core.make"; //$NON-NLS-1$
|
||||||
// return ManagedBuilderCorePlugin.getUniqueIdentifier() + ".make"; //$NON-NLS-1$
|
// return ManagedBuilderCorePlugin.getUniqueIdentifier() + ".make"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue