Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 52b6e60

Browse files
committed
1. Get rid of the placeholders in the strings
2. format changes
1 parent 2cfe748 commit 52b6e60

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -290,25 +290,42 @@ public override void DeleteMultipleItems ()
290290
if (CheckAllLinkedFile (files)) {
291291
RemoveFilesFromProject (false, files);
292292
} else {
293-
string behavior = fileExists ? "delete" : "remove";
294293
if (hasChildren) {
295-
if (files.Count == 1)
296-
question = GettextCatalog.GetString ("Are you sure you want to {0} the file {1} and " +
297-
"its code-behind children from project {2}?",
298-
behavior, Path.GetFileName (files [0].Name), files [0].Project.Name);
299-
else
300-
question = GettextCatalog.GetString ("Are you sure you want to {0} the selected files and " +
301-
"their code-behind children from the project?", behavior);
294+
if (files.Count == 1) {
295+
if (fileExists)
296+
question = GettextCatalog.GetString ("Are you sure you want to delete the file {0} and " +
297+
"its code-behind children from project {1}?",
298+
Path.GetFileName (files [0].Name), files [0].Project.Name);
299+
else
300+
question = GettextCatalog.GetString ("Are you sure you want to remove the file {0} and " +
301+
"its code-behind children from project {1}?",
302+
Path.GetFileName (files [0].Name), files [0].Project.Name);
303+
} else {
304+
if (fileExists)
305+
question = GettextCatalog.GetString ("Are you sure you want to delete the selected files and " +
306+
"their code-behind children from the project?");
307+
else
308+
question = GettextCatalog.GetString ("Are you sure you want to remove the selected files and " +
309+
"their code-behind children from the project?");
310+
}
302311
} else {
303-
if (files.Count == 1)
304-
question = GettextCatalog.GetString ("Are you sure you want to {0} file {1} from project {2}?",
305-
behavior, Path.GetFileName (files [0].Name), files [0].Project.Name);
306-
else
307-
question = GettextCatalog.GetString ("Are you sure you want to {0} the selected files from the project?", behavior);
312+
if (files.Count == 1) {
313+
if (fileExists)
314+
question = GettextCatalog.GetString ("Are you sure you want to delete file {0} from project {1}?",
315+
Path.GetFileName (files [0].Name), files [0].Project.Name);
316+
else
317+
question = GettextCatalog.GetString ("Are you sure you want to remove file {0} from project {1}?",
318+
Path.GetFileName (files [0].Name), files [0].Project.Name);
319+
320+
} else {
321+
if (fileExists)
322+
question = GettextCatalog.GetString ("Are you sure you want to delete the selected files from the project?");
323+
else
324+
question = GettextCatalog.GetString ("Are you sure you want to remove the selected files from the project?");
325+
}
308326
}
309327

310328
var result = MessageService.AskQuestion (question, new [] { AlertButton.Cancel, fileExists ? AlertButton.Delete : AlertButton.Remove });
311-
312329
if(result == AlertButton.Cancel)
313330
return;
314331
else
@@ -327,7 +344,7 @@ void OnUpdateDeleteMultipleItems (CommandInfo info)
327344
var pf = (ProjectFile)node.DataItem;
328345
files.Add (pf);
329346
}
330-
if( !CheckAnyFileExists(files) )
347+
if(!CheckAnyFileExists(files))
331348
info.Text = GettextCatalog.GetString ("Remove");
332349
}
333350

0 commit comments

Comments
 (0)