@@ -14,7 +14,7 @@ class BranchesView : Subview
14
14
private const string ConfirmSwitchTitle = "Confirm branch switch" ;
15
15
private const string ConfirmSwitchMessage = "Switch branch to {0}?" ;
16
16
private const string ConfirmSwitchOK = "Switch" ;
17
- private const string ConfirmSwitchCancel = "Cancel" ;
17
+ private const string ConfirmSwitchCancel = CancelButtonLabel ;
18
18
private const string NewBranchCancelButton = "x" ;
19
19
private const string NewBranchConfirmButton = "Create" ;
20
20
private const string FavoritesSetting = "Favorites" ;
@@ -23,6 +23,10 @@ class BranchesView : Subview
23
23
private const string LocalTitle = "Local branches" ;
24
24
private const string RemoteTitle = "Remote branches" ;
25
25
private const string CreateBranchButton = "New Branch" ;
26
+ private const string DeleteBranchMessageFormatString = "Are you sure you want to delete the branch: {0}?" ;
27
+ private const string DeleteBranchTitle = "Delete Branch?" ;
28
+ private const string DeleteBranchButton = "Delete" ;
29
+ private const string CancelButtonLabel = "Cancel" ;
26
30
27
31
private bool showLocalBranches = true ;
28
32
private bool showRemoteBranches = true ;
@@ -460,12 +464,11 @@ private void OnButtonBarGUI()
460
464
var disableDelete = activeBranchNode == selectedNode ;
461
465
EditorGUI . BeginDisabledGroup ( disableDelete ) ;
462
466
{
463
- if ( GUILayout . Button ( "Delete" , EditorStyles . miniButton , GUILayout . ExpandWidth ( false ) ) )
467
+ if ( GUILayout . Button ( DeleteBranchButton , EditorStyles . miniButton , GUILayout . ExpandWidth ( false ) ) )
464
468
{
465
469
var selectedBranchName = selectedNode . Name ;
466
- var dialogTitle = "Delete Branch: " + selectedBranchName ;
467
- var dialogMessage = "Are you sure you want to delete the branch: " + selectedBranchName + "?" ;
468
- if ( EditorUtility . DisplayDialog ( "Delete Branch?" , dialogMessage , "Delete" , "Cancel" ) )
470
+ var dialogMessage = string . Format ( DeleteBranchMessageFormatString , selectedBranchName ) ;
471
+ if ( EditorUtility . DisplayDialog ( DeleteBranchTitle , dialogMessage , DeleteBranchButton , CancelButtonLabel ) )
469
472
{
470
473
GitClient . DeleteBranch ( selectedBranchName , true ) . Start ( ) ;
471
474
}
0 commit comments