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
|
||||
Work to support new feature C1, "Set Tool Command in Project".
|
||||
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 static final String PREFIX= CUIPlugin.PLUGIN_ID + ".";
|
||||
public static final String PREFIX= CUIPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
|
||||
|
||||
// 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 {
|
||||
return resourceBundle.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return "!" + key + "!";
|
||||
return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
} 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.remconf=Remove configurations for the platform
|
||||
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 -----------
|
||||
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 SHOW = "showAdvanced"; //$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)
|
||||
* The title of the dialog.
|
||||
*/
|
||||
private String title = "";
|
||||
private String title = ""; //$NON-NLS-1$
|
||||
|
||||
/* (non-Javadoc)
|
||||
* The message to display, or <code>null</code> if none.
|
||||
*/
|
||||
private String message = "";
|
||||
private String message = ""; //$NON-NLS-1$
|
||||
|
||||
/* (non-Javadoc)
|
||||
* The input value; the empty string by default.
|
||||
*/
|
||||
private String folderName = "";
|
||||
private String folderName = ""; //$NON-NLS-1$
|
||||
|
||||
/* (non-Javadoc)
|
||||
*
|
||||
|
@ -320,14 +321,14 @@ public class BrowseEntryDialog extends SelectionStatusDialog {
|
|||
protected void validateLocation() {
|
||||
folderName = text.getText();
|
||||
// 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));
|
||||
return;
|
||||
} else {
|
||||
// Make sure that the specified location exists
|
||||
IPath path = new Path(folderName);
|
||||
if (!path.isValidPath(folderName)) {
|
||||
updateStatus(IStatus.ERROR, "Folder name invalid");
|
||||
updateStatus(IStatus.ERROR, ManagedBuilderUIPlugin.getResourceString(ERROR_FOLDER_NAME_INVALID)); //$NON-NLS-1$
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -553,7 +553,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
|||
if (id < 0) {
|
||||
id *= -1;
|
||||
}
|
||||
String newId = parent.getId() + "." + id;
|
||||
String newId = parent.getId() + "." + id; //$NON-NLS-1$
|
||||
IConfiguration newConfig = selectedTarget.createConfiguration(parent, newId);
|
||||
newConfig.setName(name);
|
||||
// Update the config lists
|
||||
|
@ -627,7 +627,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
|||
return result.toString().trim();
|
||||
}
|
||||
|
||||
String[] tokens = arguments.trim().split("\\s");
|
||||
String[] tokens = arguments.trim().split("\\s"); //$NON-NLS-1$
|
||||
/*
|
||||
* Cases to consider
|
||||
* --<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
|
||||
* -<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
|
||||
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) {
|
||||
String currentToken = tokens[i];
|
||||
if (currentToken.startsWith("--")) {
|
||||
if (currentToken.startsWith("--")) { //$NON-NLS-1$
|
||||
result.append(currentToken);
|
||||
result.append(" ");
|
||||
} else if (currentToken.startsWith("-")) {
|
||||
result.append(" "); //$NON-NLS-1$
|
||||
} else if (currentToken.startsWith("-")) { //$NON-NLS-1$
|
||||
// Is there another token
|
||||
if (i + 1 >= tokens.length) {
|
||||
//We are done
|
||||
|
@ -657,19 +657,19 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
|||
if (!flagMatcher.find()) {
|
||||
// Evalutate whether the next token should be added normally
|
||||
result.append(currentToken);
|
||||
result.append(" ");
|
||||
result.append(" "); //$NON-NLS-1$
|
||||
} else {
|
||||
// Look for the case where there is no space between flag and arg
|
||||
if (mixedFlagWithArg.matcher(currentToken).matches()) {
|
||||
// Add this single token and keep going
|
||||
result.append(currentToken);
|
||||
result.append(" ");
|
||||
result.append(" "); //$NON-NLS-1$
|
||||
} else {
|
||||
// Add this token and the next one right now
|
||||
result.append(currentToken);
|
||||
result.append(" ");
|
||||
result.append(" "); //$NON-NLS-1$
|
||||
result.append(nextToken);
|
||||
result.append(" ");
|
||||
result.append(" "); //$NON-NLS-1$
|
||||
// Skip the next token the next time through, though
|
||||
++i;
|
||||
}
|
||||
|
@ -691,7 +691,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
|||
boolean hasSpace = false;
|
||||
|
||||
// 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:
|
||||
|
@ -709,14 +709,14 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
|||
} else {
|
||||
// See if the next segment is the start of the flags
|
||||
String nextSegment = result[i + 1];
|
||||
if (nextSegment.startsWith("-")) {
|
||||
if (nextSegment.startsWith("-")) { //$NON-NLS-1$
|
||||
// we have found the end of the command
|
||||
command.append(cmdSegment);
|
||||
break;
|
||||
} else {
|
||||
command.append(cmdSegment);
|
||||
// Add the whitespace back
|
||||
command.append(" ");
|
||||
command.append(" "); //$NON-NLS-1$
|
||||
hasSpace = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.jface.util.ListenerList;
|
|||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
|
||||
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
|
||||
private ListenerList listenerList;
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ManageConfigDialog extends Dialog {
|
|||
// Map of new configurations chosen by the user
|
||||
private SortedMap newConfigs;
|
||||
// The title of the dialog.
|
||||
private String title = "";
|
||||
private String title = ""; //$NON-NLS-1$
|
||||
// State of the check box on exit
|
||||
private boolean useDefaultMake;
|
||||
|
||||
|
@ -178,7 +178,7 @@ public class ManageConfigDialog extends Dialog {
|
|||
|
||||
final Label dotLabel = new Label(outputGroup, SWT.CENTER);
|
||||
dotLabel.setFont(outputGroup.getFont());
|
||||
dotLabel.setText(new String("."));
|
||||
dotLabel.setText(new String(".")); //$NON-NLS-1$
|
||||
dotLabel.setLayoutData(new GridData());
|
||||
|
||||
buildArtifactExt = new Text(outputGroup, SWT.SINGLE | SWT.BORDER);
|
||||
|
@ -581,7 +581,7 @@ public class ManageConfigDialog extends Dialog {
|
|||
makeCommand = managedTarget.getMakeCommand();
|
||||
String makeArgs = managedTarget.getMakeArguments();
|
||||
if (makeArgs.length() > 0) {
|
||||
makeCommand += " " + makeArgs;
|
||||
makeCommand += " " + makeArgs; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class NewConfigurationDialog extends Dialog {
|
|||
private ITarget target;
|
||||
private String newName;
|
||||
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 {
|
||||
// Whitespace character
|
||||
private static final String WHITESPACE = " ";
|
||||
private static final String WHITESPACE = " "; //$NON-NLS-1$
|
||||
|
||||
// The top level composite
|
||||
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.internal.ui.ManagedBuilderUIImages;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
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_CAT = ManagedBuilderUIImages.get(ManagedBuilderUIImages.IMG_BUILD_CAT);
|
||||
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) {
|
||||
// If the element is a configuration, return the folder image
|
||||
|
@ -51,6 +53,6 @@ class ToolListLabelProvider extends LabelProvider {
|
|||
}
|
||||
|
||||
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 {
|
||||
// String constants
|
||||
private static final String WZ_TITLE = "MngCWizard.title";
|
||||
private static final String WZ_DESC = "MngCWizard.description";
|
||||
private static final String WZ_TITLE = "MngCWizard.title"; //$NON-NLS-1$
|
||||
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_DESC= "MngCWizardSettings.description"; //$NON-NLS-1$
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
|
|||
if (id < 0) {
|
||||
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
|
||||
IConfiguration[] newConfigs = newTarget.getConfigurations();
|
||||
|
@ -172,7 +172,7 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
|
|||
* @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#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$
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue