Skip to content

Commit e326a3e

Browse files
committed
Edited the Rename conflict user message
1 parent 4b80dc5 commit e326a3e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Rubberduck.Refactorings/Rename/RenameRefactoring.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ private bool TrySetNewName(IRenamePresenter presenter)
249249

250250
if (conflicts.Any())
251251
{
252-
//TODO: Fix this message? - takes same name parameter twice
253-
var message = string.Format(RubberduckUI.RenameDialog_ConflictingNames, _model.NewName,
254-
_model.NewName);
252+
var message = string.Format(RubberduckUI.RenameDialog_ConflictingNames, _model.NewName, _model.Target.IdentifierName);
255253

256254
return _messageBox?.ConfirmYesNo(message, RubberduckUI.RenameDialog_Caption) ?? false;
257255
}

Rubberduck.Resources/RubberduckUI.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rubberduck.Resources/RubberduckUI.resx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,9 @@ Warning: All customized settings will be lost. Your old file will be saved in '
484484
<value>New</value>
485485
</data>
486486
<data name="RenameDialog_ConflictingNames" xml:space="preserve">
487-
<value>Renaming to '{0}' clashes with '{1}' in the same scope.
488-
Are you sure you want to proceed with this rename?</value>
487+
<value>'{0}' conflicts with an existing name. Renaming '{1}' to'{0}' may result in uncompilable code or a change in logic.
488+
Do you want to proceed with this rename?</value>
489+
<comment>0: NewName 1: CurrentName</comment>
489490
</data>
490491
<data name="RenameDialog_AmbiguousSelection" xml:space="preserve">
491492
<value>Please ensure that exactly 1 control is selected before renaming.</value>

0 commit comments

Comments
 (0)