mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Bug 177011] NLS33:label truncations and un-externalized strings on C/C++ Prefs pages
This commit is contained in:
parent
47e1445a67
commit
8ceff372b4
8 changed files with 24 additions and 26 deletions
|
@ -158,7 +158,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
* Creates the group that contains the build artifact name controls.
|
||||
*/
|
||||
private void createAdvancedSettingsGroup(FontMetrics fm) {
|
||||
addField( createLabelEditor( getFieldEditorParent(), WHITESPACE ) ); //$NON-NLS-1$
|
||||
addField( createLabelEditor( getFieldEditorParent(), WHITESPACE ) );
|
||||
addField( createLabelEditor( getFieldEditorParent(), NewUIMessages.getResourceString(ADVANCED_GROUP) ) );
|
||||
|
||||
// Add a string editor to edit the tool command line pattern
|
||||
|
|
|
@ -26,9 +26,6 @@ import org.eclipse.swt.events.ModifyEvent;
|
|||
import org.eclipse.swt.events.ModifyListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.layout.FormAttachment;
|
||||
import org.eclipse.swt.layout.FormData;
|
||||
import org.eclipse.swt.layout.FormLayout;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
|
@ -201,11 +198,13 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
|||
}} );
|
||||
Composite c = new Composite(g5, SWT.NONE);
|
||||
setupControl(c, 2, GridData.FILL_HORIZONTAL);
|
||||
FormLayout f = new FormLayout();
|
||||
GridLayout f = new GridLayout(4, false);
|
||||
c.setLayout(f);
|
||||
b_dirVars = setupBottomButton(c, VARIABLESBUTTON_NAME, null);
|
||||
b_dirFile = setupBottomButton(c, FILESYSTEMBUTTON_NAME, b_dirVars);
|
||||
b_dirWsp = setupBottomButton(c, WORKSPACEBUTTON_NAME, b_dirFile);
|
||||
Label dummy = new Label(c, 0);
|
||||
dummy.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
b_dirWsp = setupBottomButton(c, WORKSPACEBUTTON_NAME);
|
||||
b_dirFile = setupBottomButton(c, FILESYSTEMBUTTON_NAME);
|
||||
b_dirVars = setupBottomButton(c, VARIABLESBUTTON_NAME);
|
||||
}
|
||||
|
||||
void setManagedBuild(boolean enable) {
|
||||
|
@ -301,16 +300,11 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
|||
}
|
||||
}
|
||||
|
||||
Button setupBottomButton(Composite c, String name, Control x) {
|
||||
Button setupBottomButton(Composite c, String name) {
|
||||
Button b = new Button(c, SWT.PUSH);
|
||||
b.setText(name);
|
||||
FormData fd = new FormData();
|
||||
fd.width = BUTTON_WIDTH;
|
||||
fd.top = new FormAttachment(0, 2);
|
||||
if (x != null)
|
||||
fd.right = new FormAttachment(x, -5);
|
||||
else
|
||||
fd.right = new FormAttachment(100, 0);
|
||||
b.setText(name);
|
||||
GridData fd = new GridData(GridData.CENTER);
|
||||
fd.minimumWidth = BUTTON_WIDTH;
|
||||
b.setLayoutData(fd);
|
||||
b.setData(t_dir);
|
||||
b.addSelectionListener(new SelectionAdapter() {
|
||||
|
|
|
@ -181,7 +181,7 @@ public class CPropertyVarsTab extends AbstractCPropertyTab {
|
|||
return "? " + var.getValueType(); //$NON-NLS-1$
|
||||
}
|
||||
case 2:
|
||||
return getString(var); //$NON-NLS-1$
|
||||
return getString(var);
|
||||
}
|
||||
return EMPTY_STR;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class CConfigWizardPage extends MBSCustomPage {
|
|||
});
|
||||
tv.setLabelProvider(new LabelProvider() {
|
||||
public String getText(Object element) {
|
||||
return element == null ? EMPTY_STR : ((CfgItem)element).name;//$NON-NLS-1$
|
||||
return element == null ? EMPTY_STR : ((CfgItem)element).name;
|
||||
}
|
||||
public Image getImage(Object element) { return IMG; }
|
||||
});
|
||||
|
|
|
@ -126,7 +126,7 @@ public abstract class NewModelProjectWizard extends BasicNewResourceWizard imple
|
|||
if (monitor == null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
monitor.beginTask(NewUIMessages.getResourceString(MSG_CREATE), 8); //$NON-NLS-1$
|
||||
monitor.beginTask(NewUIMessages.getResourceString(MSG_CREATE), 8);
|
||||
|
||||
newProject = createIProject(fMainPage.getProjectName(), fMainPage.getProjectLocation());
|
||||
if (newProject != null) {
|
||||
|
|
|
@ -77,7 +77,7 @@ import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
|||
* communication way for new CDT model pages and tabs.
|
||||
*/
|
||||
public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||
public static final int BUTTON_WIDTH = 100; // used as hint for all push buttons
|
||||
public static final int BUTTON_WIDTH = 120; // used as hint for all push buttons
|
||||
|
||||
// commonly used button names
|
||||
public static final String EMPTY_STR = ""; //$NON-NLS-1$
|
||||
|
@ -88,9 +88,9 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
public static final String MOVEDOWN_STR = NewUIMessages.getResourceString("FileListControl.movedown"); //$NON-NLS-1$
|
||||
public static final String WORKSPACEBUTTON_NAME = NewUIMessages.getResourceString("FileListControl.button.workspace"); //$NON-NLS-1$
|
||||
public static final String FILESYSTEMBUTTON_NAME = NewUIMessages.getResourceString("FileListControl.button.fs"); //$NON-NLS-1$
|
||||
public static final String VARIABLESBUTTON_NAME = "Variables..."; //$NON-NLS-1$
|
||||
public static final String VARIABLESBUTTON_NAME = NewUIMessages.getResourceString("AbstractCPropertyTab.1"); //$NON-NLS-1$
|
||||
public static final String FILESYSTEM_DIR_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.fs.dir.dlg.msg"); //$NON-NLS-1$
|
||||
public static final String FILESYSTEM_FILE_DIALOG_TITLE = ""; //$NON-NLS-1$
|
||||
public static final String FILESYSTEM_FILE_DIALOG_TITLE = EMPTY_STR;
|
||||
public static final String WORKSPACE_DIR_DIALOG_TITLE = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.dir.dlg.title"); //$NON-NLS-1$
|
||||
public static final String WORKSPACE_FILE_DIALOG_TITLE = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.file.dlg.title"); //$NON-NLS-1$
|
||||
public static final String WORKSPACE_DIR_DIALOG_MSG = NewUIMessages.getResourceString("BrowseEntryDialog.wsp.dir.dlg.msg"); //$NON-NLS-1$
|
||||
|
@ -159,7 +159,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
GridData gdb = new GridData(GridData.VERTICAL_ALIGN_CENTER);
|
||||
gdb.grabExcessHorizontalSpace = false;
|
||||
gdb.horizontalAlignment = SWT.FILL;
|
||||
gdb.widthHint = width;
|
||||
gdb.minimumWidth = width;
|
||||
|
||||
if (names[i] != null)
|
||||
buttons[i].setText(names[i]);
|
||||
|
@ -266,7 +266,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
b.setText(name);
|
||||
setupControl(b, span, mode);
|
||||
GridData g = (GridData)b.getLayoutData();
|
||||
g.widthHint = BUTTON_WIDTH;
|
||||
g.minimumWidth = BUTTON_WIDTH;
|
||||
g.horizontalAlignment = SWT.RIGHT;
|
||||
b.setLayoutData(g);
|
||||
return b;
|
||||
|
|
|
@ -65,7 +65,8 @@ public class ErrorParsTab extends AbstractCPropertyTab {
|
|||
|
||||
initButtons(new String[] {
|
||||
MOVEUP_STR, MOVEDOWN_STR, null,
|
||||
"Check all", "Uncheck all" //$NON-NLS-1$//$NON-NLS-2$
|
||||
NewUIMessages.getResourceString("ErrorParsTab.0"), //$NON-NLS-1$
|
||||
NewUIMessages.getResourceString("ErrorParsTab.1") //$NON-NLS-1$
|
||||
});
|
||||
initMapParsers();
|
||||
}
|
||||
|
|
|
@ -419,6 +419,7 @@ DiscoveredScannerConfigurationContainerPage.initialization.error.message=Error i
|
|||
# new strings
|
||||
|
||||
AbstractCPropertyTab.0=Select build variable
|
||||
AbstractCPropertyTab.1=Variables...
|
||||
AbstractPage.0=Unknown element selected
|
||||
AbstractPage.1=This file has no properties to display
|
||||
AbstractPage.2=This project is not a CDT project
|
||||
|
@ -494,3 +495,5 @@ ConfigDescriptionTab.0=Project Description
|
|||
ConfigDescriptionTab.1=Configuration Description
|
||||
ConfigDescriptionTab.2=Resource Description
|
||||
BinaryParsTab.0=Binary parser :
|
||||
ErrorParsTab.0=Check all
|
||||
ErrorParsTab.1=Uncheck all
|
||||
|
|
Loading…
Add table
Reference in a new issue