aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Thun2010-12-03 06:33:22 -0500
committerPhilipp Thun2010-12-03 06:33:22 -0500
commitb4bb762988caebc49eea450469dd3b2cc56e5763 (patch)
treebc9c69d7ad8299c7e08b3534a00ac7c7ead7a998
parentcc8c842bd630dadc3670469fba283cd8f0b0e803 (diff)
downloadegit-b4bb762988caebc49eea450469dd3b2cc56e5763.zip
egit-b4bb762988caebc49eea450469dd3b2cc56e5763.tar.gz
egit-b4bb762988caebc49eea450469dd3b2cc56e5763.tar.xz
Fix reuse of field labels (incl. shortcut mnemonic) in error messages
This patch fixes the reuse of field labels in error messages on the clone wizard. This is necessary due to the fact that field labels contain a shortcut mnemonic (&) that is not interpreted but displayed when the label is reused as part of an error message. Change-Id: Ica0ddc9ea6d5316ac9429f86424f9db9cfd65346 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java12
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java9
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties8
3 files changed, 17 insertions, 12 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
index e084f98..f05494a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
@@ -803,18 +803,24 @@ public class UIText extends NLS {
public static String CloneDestinationPage_promptRemoteName;
/** */
- public static String CloneDestinationPage_fieldRequired;
-
- /** */
public static String CloneDestinationPage_browseButton;
/** */
public static String CloneDestinationPage_DefaultRepoFolderTooltip;
/** */
+ public static String CloneDestinationPage_errorDirectoryRequired;
+
+ /** */
+ public static String CloneDestinationPage_errorInitialBranchRequired;
+
+ /** */
public static String CloneDestinationPage_errorNotEmptyDir;
/** */
+ public static String CloneDestinationPage_errorRemoteNameRequired;
+
+ /** */
public static String RefContentProposal_blob;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
index a2108f4..86d7563 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/CloneDestinationPage.java
@@ -225,8 +225,7 @@ class CloneDestinationPage extends WizardPage {
private void checkPage() {
final String dstpath = directoryText.getText();
if (dstpath.length() == 0) {
- setErrorMessage(NLS.bind(UIText.CloneDestinationPage_fieldRequired,
- UIText.CloneDestinationPage_promptDirectory));
+ setErrorMessage(UIText.CloneDestinationPage_errorDirectoryRequired);
setPageComplete(false);
return;
}
@@ -247,14 +246,12 @@ class CloneDestinationPage extends WizardPage {
}
if (!availableRefs.isEmpty()
&& initialBranch.getSelectionIndex() < 0) {
- setErrorMessage(NLS.bind(UIText.CloneDestinationPage_fieldRequired,
- UIText.CloneDestinationPage_promptInitialBranch));
+ setErrorMessage(UIText.CloneDestinationPage_errorInitialBranchRequired);
setPageComplete(false);
return;
}
if (remoteText.getText().length() == 0) {
- setErrorMessage(NLS.bind(UIText.CloneDestinationPage_fieldRequired,
- UIText.CloneDestinationPage_promptRemoteName));
+ setErrorMessage(UIText.CloneDestinationPage_errorRemoteNameRequired);
setPageComplete(false);
return;
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
index be01c5c..0aa7bd8 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
@@ -1,4 +1,3 @@
-AbortRebaseCommand_CancelDialogTitle=Abort of Rebase was canceled
###############################################################################
# Copyright (c) 2005, 2009 Shawn Pearce and others.
# All rights reserved. This program and the accompanying materials
@@ -9,6 +8,7 @@ AbortRebaseCommand_CancelDialogTitle=Abort of Rebase was canceled
###############################################################################
AbortRebaseCommand_CancelDialogMessage=The Abort operation was canceled
+AbortRebaseCommand_CancelDialogTitle=Abort of Rebase was canceled
AbortRebaseCommand_JobName=Aborting Rebase
AbstractHistoryCommanndHandler_NoInputMessage=Could not get the current input from the history view
AbstractHistoryCommanndHandler_NoUniqueRepository=Resources belong to different Repositories
@@ -278,10 +278,12 @@ CloneDestinationPage_groupConfiguration=Configuration
CloneDestinationPage_promptDirectory=&Directory
CloneDestinationPage_promptInitialBranch=Initial branc&h
CloneDestinationPage_promptRemoteName=Remote na&me
-CloneDestinationPage_fieldRequired={0} is required.
CloneDestinationPage_browseButton=Bro&wse
CloneDestinationPage_DefaultRepoFolderTooltip=You can change the default parent folder in the Git Preferences
+CloneDestinationPage_errorDirectoryRequired=Directory is required
+CloneDestinationPage_errorInitialBranchRequired=Initial branch is required
CloneDestinationPage_errorNotEmptyDir={0} is not an empty directory.
+CloneDestinationPage_errorRemoteNameRequired=Remote name is required
RefContentProposal_blob=blob
RefContentProposal_branch=branch
@@ -933,4 +935,4 @@ GitMergeEditorInput_MergeEditorTitle=Repository "{0}": merging "{1}" into "{2}"
GitMergeEditorInput_WorkspaceHeader=Workspace Version
GitModelIndex_index=<staged changes>
-GitModelWorkingTree_workingTree=<working tree> \ No newline at end of file
+GitModelWorkingTree_workingTree=<working tree>