[Monodevelop-patches-list] r1348 - in trunk/MonoDevelop: po src/Main/Base src/Main/Base/Commands src/Main/Base/Commands/ClassBrowserCommands src/Main/Base/Commands/ProjectBrowserCommands
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Apr 2 10:46:33 EST 2004
Author: tberman
Date: 2004-04-02 10:46:33 -0500 (Fri, 02 Apr 2004)
New Revision: 1348
Modified:
trunk/MonoDevelop/po/POTFILES.in
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/MenuItemBuilders.cs
trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/ProjectCommands.cs
trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs
Log:
gettextify all of Commands/
Modified: trunk/MonoDevelop/po/POTFILES.in
===================================================================
--- trunk/MonoDevelop/po/POTFILES.in 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/po/POTFILES.in 2004-04-02 15:46:33 UTC (rev 1348)
@@ -38,3 +38,12 @@
src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs
+src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs
+src/Main/Base/Commands/FileCommands.cs
+src/Main/Base/Commands/HelpCommands.cs
+src/Main/Base/Commands/MenuItemBuilders.cs
+src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
+src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
+src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs
+src/Main/Base/Commands/ProjectCommands.cs
+src/Main/Base/Commands/RunCommands.cs
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-02 15:46:33 UTC (rev 1348)
@@ -1,5 +1,19 @@
2004-04-02 Todd Berman <tberman at sevenl.net>
+ * Commands/MenuItemBuilders.cs:
+ * Commands/RunCommands.cs:
+ * Commands/ClassBrowserCommands/ClassBrowserCommands.cs:
+ * Commands/ProjectCommands.cs:
+ * Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs:
+ * Commands/ProjectBrowserCommands/FolderNodeCommands.cs:
+ * Commands/ProjectBrowserCommands/CombineNodeCommands.cs:
+ * Commands/FileCommands.cs:
+ * Commands/HelpCommands.cs:
+ gettextify all of the in-use Commands/
+
+
+2004-04-02 Todd Berman <tberman at sevenl.net>
+
* Gui/Dialogs/SharpDevelopAboutPanels.cs:
* Gui/Dialogs/ProjectOptionsDialog.cs:
* Gui/Dialogs/WordCountDialog.cs:
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -41,7 +41,7 @@
if (node != null) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowWarning("Not implemented");
+ messageService.ShowWarning(GettextCatalog.GetString ("Not implemented"));
}
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/FileCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -101,7 +101,7 @@
if (window != null && window.ViewContent.ContentName != null && !window.ViewContent.IsViewOnly) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- if (messageService.AskQuestion("${res:ICSharpCode.SharpDevelop.Commands.ReloadFile.ReloadFileQuestion}")) {
+ if (messageService.AskQuestion(GettextCatalog.GetString ("Are you sure that you want to reload the file?")) {
IXmlConvertable memento = null;
if (window.ViewContent is IMementoCapable) {
memento = ((IMementoCapable)window.ViewContent).CreateMemento();
@@ -146,7 +146,7 @@
}
}*/
- using (Gtk.FileSelection fdiag = new Gtk.FileSelection ("Save as...")) {
+ using (Gtk.FileSelection fdiag = new Gtk.FileSelection (GettextCatalog.GetString ("Save as..."))) {
fdiag.Filename = window.ViewContent.ContentName;
int response = fdiag.Run ();
string filename = fdiag.Filename;
@@ -158,7 +158,7 @@
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
if (!fileUtilityService.IsValidFileName(filename)) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowMessage("File name " + filename +" is invalid");
+ messageService.ShowMessage(String.Format (GettextCatalog.GetString ("File name {0} is invalid"), filename));
return;
}
@@ -190,7 +190,7 @@
if (content.ContentName == null)
{
- using (Gtk.FileSelection fdiag = new Gtk.FileSelection ("Save File As..."))
+ using (Gtk.FileSelection fdiag = new Gtk.FileSelection (GettextCatalog.GetString ("Save File As...")))
{
fdiag.Filename = System.Environment.GetEnvironmentVariable ("HOME");
if (fdiag.Run () == (int) Gtk.ResponseType.Ok)
@@ -206,7 +206,7 @@
if (fileUtilityService.ObservedSave(new NamedFileOperationDelegate(content.Save), fileName) == FileOperationResult.OK)
{
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowMessage(fileName, "File saved");
+ messageService.ShowMessage(fileName, GettextCatalog.GetString ("File saved"));
}
}
@@ -227,7 +227,7 @@
public override void Run()
{
- using (Gtk.FileSelection fs = new Gtk.FileSelection ("File to Open")) {
+ using (Gtk.FileSelection fs = new Gtk.FileSelection (GettextCatalog.GetString ("File to Open"))) {
string defaultFolder = PropertyService.GetProperty(
"MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath",
System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
@@ -251,7 +251,7 @@
break;
default:
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("Can't open file " + name + "as project");
+ messageService.ShowError(String.Format (GettextCatalog.GetString ("Can't open file {0} as project"), name));
break;
}
}
@@ -297,7 +297,7 @@
}
}
- using (Gtk.FileSelection fs = new Gtk.FileSelection ("File to Open")) {
+ using (Gtk.FileSelection fs = new Gtk.FileSelection (GettextCatalog.GetString ("File to Open"))) {
string defaultFolder = PropertyService.GetProperty(
"MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath",
System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
@@ -400,7 +400,7 @@
IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IFileService));
IMessageService messageService = (IMessageService) MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IMessageService));
- if (fileService.RecentOpen.RecentFile != null && fileService.RecentOpen.RecentFile.Count > 0 && messageService.AskQuestion("Are you sure you want to clear recent files list?", "Clear recent files"))
+ if (fileService.RecentOpen.RecentFile != null && fileService.RecentOpen.RecentFile.Count > 0 && messageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to clear recent files list?"), GettextCatalog.GetString ("Clear recent files")))
{
fileService.RecentOpen.ClearRecentFiles();
}
@@ -416,7 +416,7 @@
IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IFileService));
IMessageService messageService = (IMessageService) MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IMessageService));
- if (fileService.RecentOpen.RecentProject != null && fileService.RecentOpen.RecentProject.Count > 0 && messageService.AskQuestion("Are you sure you want to clear recent projects list?", "Clear recent projects"))
+ if (fileService.RecentOpen.RecentProject != null && fileService.RecentOpen.RecentProject.Count > 0 && messageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to clear recent projects list?"), GettextCatalog.GetString ("Clear recent projects")))
{
fileService.RecentOpen.ClearRecentProjects();
}
Modified: trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/HelpCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -78,7 +78,7 @@
Process.Start(file);
} catch (Exception) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("Can't execute/view " + file + "\n Please check that the file exists and that you can open this file.");
+ messageService.ShowError(String.Format (GettextCatalog.GetString ("Can't execute/view {0}\n Please check that the file exists and that you can open this file."), file));
}
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Commands/MenuItemBuilders.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/MenuItemBuilders.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/MenuItemBuilders.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -52,7 +52,7 @@
return items;
}
- SdMenuCommand defaultMenu = new SdMenuCommand(null, null, resourceService.GetString("Dialog.Componnents.RichMenuItem.NoRecentFilesString"));
+ SdMenuCommand defaultMenu = new SdMenuCommand(null, null, GettextCatalog.GetString("recent files"));
defaultMenu.Sensitive = false;
return new SdMenuCommand[] { defaultMenu };
@@ -82,13 +82,12 @@
string accelaratorKeyPrefix = i < 10 ? "&" + ((i + 1) % 10).ToString() + " " : "";
items[i] = new SdMenuCommand(null, null, accelaratorKeyPrefix + recentOpen.RecentProject[i].ToString(), new EventHandler(LoadRecentProject));
items[i].Tag = recentOpen.RecentProject[i].ToString();
- items[i].Description = stringParserService.Parse(resourceService.GetString("Dialog.Componnents.RichMenuItem.LoadProjectDescription"),
- new string[,] { {"PROJECT", recentOpen.RecentProject[i].ToString()} });
+ items[i].Description = String.Format (GettextCatalog.GetString ("load solution {0}"), recentOpen.RecentProject[i].ToString ());
}
return items;
}
- SdMenuCommand defaultMenu = new SdMenuCommand(null, null, resourceService.GetString("Dialog.Componnents.RichMenuItem.NoRecentProjectsString"));
+ SdMenuCommand defaultMenu = new SdMenuCommand(null, null, GettextCatalog.GetString ("recent solutions"));
defaultMenu.Sensitive = false;
return new SdMenuCommand[] { defaultMenu };
@@ -118,7 +117,7 @@
SdMenuCommand[] items = new SdMenuCommand[ToolLoader.Tool.Count];
for (int i = 0; i < ToolLoader.Tool.Count; ++i) {
SdMenuCommand item = new SdMenuCommand(null, null, ToolLoader.Tool[i].ToString(), new EventHandler(ToolEvt));
- item.Description = "Start tool " + String.Join(String.Empty, ToolLoader.Tool[i].ToString().Split('&'));
+ item.Description = GettextCatalog.GetString ("Start tool") + " " + String.Join(String.Empty, ToolLoader.Tool[i].ToString().Split('&'));
items[i] = item;
}
return items;
@@ -142,10 +141,7 @@
string args = stringParserService.Parse(tool.Arguments);
// prompt for args if needed
if (tool.PromptForArguments) {
- args = messageService.GetTextResponse(
- "Enter any arguments you want to use while launching tool, " + tool.MenuCommand + ":",
- "Command Arguments for " + tool.MenuCommand,
- args);
+ args = messageService.GetTextResponse(String.Format (GettextCatalog.GetString ("Enter any arguments you want to use while launching tool, {0}:"), tool.MenuCommand), String.Format (GettextCatalog.GetString ("Command Arguments for {0}"), tool.MenuCommand), args);
// if user selected cancel string will be null
if (args == null) {
@@ -172,8 +168,7 @@
// FIXME: need to find a way to wire the console output into the output window if specified
Process.Start(startinfo);
- } catch (Exception ex) {
- messageService.ShowError(ex, "External program execution failed.\nError while starting:\n '" + command + " " + args + "'");
+ } catch (Exception ex) { messageService.ShowError(ex, String.Format (GettextCatalog.GetString ("External program execution failed.\nError while starting:\n '{0} {1}'"), command, args));
}
break;
}
@@ -216,7 +211,7 @@
} else {
item.Active = false;
}
- item.Description = "Activate this window ";
+ item.Description = GettextCatalog.GetString ("Activate this window");
if (i + 1 <= 9) {
string accel_path = "<MonoDevelop>/MainWindow/" + content.WorkbenchWindow.Title + (i + 1).ToString ();
if (!Gtk.Accel.MapLookupEntry (accel_path, new Gtk.AccelKey ())) {
@@ -278,8 +273,8 @@
public Gtk.MenuItem[] BuildSubmenu(ConditionCollection conditionCollection, object owner)
{
browser = (ProjectBrowserView)owner;
- includeInCompileItem = new MyMenuItem(this, "${res:ProjectComponent.ContextMenu.IncludeMenu.InCompile}", new EventHandler(ChangeCompileInclude));
- includeInDeployItem = new MyMenuItem(this, "${res:ProjectComponent.ContextMenu.IncludeMenu.InDeploy}", new EventHandler(ChangeDeployInclude));
+ includeInCompileItem = new MyMenuItem(this, GettextCatalog.GetString ("Compile"), new EventHandler(ChangeCompileInclude));
+ includeInDeployItem = new MyMenuItem(this, GettextCatalog.GetString ("Deploy"), new EventHandler(ChangeDeployInclude));
return new Gtk.MenuItem[] {
includeInCompileItem,
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -80,7 +80,7 @@
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
if (node != null) {
- using (Gtk.FileSelection fdiag = new Gtk.FileSelection ("Add a Project")) {
+ using (Gtk.FileSelection fdiag = new Gtk.FileSelection (GettextCatalog.GetString ("Add a Project"))) {
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
string defaultFolder = propertyService.GetProperty(
"MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath",
@@ -121,7 +121,7 @@
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService (typeof (PropertyService));
if (node != null) {
- using (Gtk.FileSelection fdiag = new Gtk.FileSelection ("Add a Combine")) {
+ using (Gtk.FileSelection fdiag = new Gtk.FileSelection (GettextCatalog.GetString ("Add a Combine"))) {
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
string defaultFolder = propertyService.GetProperty(
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -40,7 +40,7 @@
AbstractBrowserNode node = (AbstractBrowserNode)browser.SelectedNode;
- using (FileSelection fdiag = new FileSelection ("Add a file")) {
+ using (FileSelection fdiag = new FileSelection (GettextCatalog.GetString ("Add a file"))) {
fdiag.SelectMultiple = true;
string defaultPath = Path.Combine (Environment.GetEnvironmentVariable ("HOME"), "MonoDevelopProjects");
fdiag.Complete (defaultPath);
@@ -58,9 +58,9 @@
(Window) WorkbenchSingleton.Workbench,
DialogFlags.Modal | DialogFlags.DestroyWithParent,
MessageType.Question, ButtonsType.None,
- "The file is outside the project directory, what should I do?")) {
+ GettextCatalog.GetString ("The file is outside the project directory, what should I do?"))) {
md.AddButton (Gtk.Stock.Copy, 1);
- md.AddButton ("_Move", 2);
+ md.AddButton (GettextCatalog.GetString ("_Move"), 2);
md.AddButton (Gtk.Stock.Cancel, ResponseType.Cancel);
int ret = md.Run ();
@@ -175,7 +175,7 @@
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
- string directoryName = fileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + resourceService.GetString("ProjectComponent.NewFolderString");
+ string directoryName = fileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + GettextCatalog.GetString("New Folder");
int index = -1;
if (Directory.Exists(directoryName)) {
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -44,7 +44,7 @@
show_dialog:
- using (Gtk.FileSelection fs = new Gtk.FileSelection ("File to Open")) {
+ using (Gtk.FileSelection fs = new Gtk.FileSelection (GettextCatalog.GetString ("File to Open"))) {
fs.SelectMultiple = true;
fs.Filename = project.BaseDirectory;
int response = fs.Run ();
@@ -57,7 +57,7 @@
foreach (string file in files) {
if (! File.Exists (file)) {
IMessageService messageService = (IMessageService) ServiceManager.Services.GetService (typeof (IMessageService));
- messageService.ShowError (String.Format ("Resource file `{0}' does not exist", file));
+ messageService.ShowError (String.Format (GettextCatalog.GetString ("Resource file '{0}' does not exist"), file));
goto show_dialog;
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -34,7 +34,7 @@
if (!File.Exists(assembly)) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("Assembly not Found (Compile the project first)");
+ messageService.ShowError(GettextCatalog.GetString ("Assembly not Found (Compile the project first)"));
} else {
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
string command = fileUtilityService.SharpDevelopRootPath +
Modified: trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs 2004-04-02 14:00:21 UTC (rev 1347)
+++ trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs 2004-04-02 15:46:33 UTC (rev 1348)
@@ -43,12 +43,10 @@
TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(TaskService));
IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));
if (!taskService.SomethingWentWrong) {
- statusBarService.SetMessage("${res:MainWindow.StatusBar.SuccessfulMessage}");
+ statusBarService.SetMessage(GettextCatalog.GetString ("Successful"));
} else {
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
- stringParserService.Properties["Errors"] = taskService.Errors.ToString();
- stringParserService.Properties["Warnings"] = taskService.Warnings.ToString();
- statusBarService.SetMessage("${res:MainWindow.StatusBar.ErrorWarningsMessage}");
+ statusBarService.SetMessage(String.Format (GettextCatalog.GetString ("{0} errors, {1} warnings"), taskService.Errors.ToString (); taskService.Warnings.ToString ());
}
}
@@ -74,7 +72,7 @@
if (binding != null) {
if (binding == null || !binding.CanCompile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName)) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("Language binding " + binding.Language + " can't compile " + WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+ messageService.ShowError(String.Format (GettextCatalog.GetString ("Language binding {0} can't compile {1}"), binding.Language, WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName));
} else {
new SaveFile().Run();
ICompilerResult res = binding.CompileFile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
@@ -88,15 +86,14 @@
}
} else {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("No source file for compilation found. Please save unsaved files");
+ messageService.ShowError(GettextCatalog.GetString ("No source file for compilation found. Please save unsaved files"));
}
}
}
- taskService.CompilerOutput += resourceService.GetString("MainWindow.CompilerMessages.DoneLabel") + "\n\n" +
- stringParserService.Parse("${res:MainWindow.CompilerMessages.StatsOutput}", new string[,] { {"SUCCEEDED", CombineEntry.BuildProjects.ToString()}, {"FAILED", CombineEntry.BuildErrors.ToString()} }) + "\n";
+ taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: ${0} succeeded, ${1} failed\n"), CombineEntry.BuildProjects.ToString (), CombineEntry.BuildErrors.ToString ());
} catch (Exception e) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e, "Error while compiling");
+ messageService.ShowError(e, GettextCatalog.GetString ("Error while compiling"));
}
projectService.OnEndBuild();
//}
@@ -149,7 +146,7 @@
if (binding != null) {
if (binding == null || !binding.CanCompile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName)) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("Language binding " + binding.Language + " can't compile " + WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+ messageService.ShowError(String.Format (GettextCatalog.GetString ("Language binding {0} can't compile {1}"), binding.Language, WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName));
} else {
new SaveFile().Run();
ICompilerResult res = binding.CompileFile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
@@ -163,15 +160,14 @@
}
} else {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("No source file for compilation found. Please save unsaved files");
+ messageService.ShowError(GettextCatalog.GetString ("No source file for compilation found. Please save unsaved files"));
}
}
}
- taskService.CompilerOutput += resourceService.GetString("MainWindow.CompilerMessages.DoneLabel") + "\n\n" +
- stringParserService.Parse("${res:MainWindow.CompilerMessages.StatsOutput}", new string[,] { {"SUCCEEDED", CombineEntry.BuildProjects.ToString()}, {"FAILED", CombineEntry.BuildErrors.ToString()} }) + "\n";
+ taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: ${0} succeeded, ${1} failed\n"), CombineEntry.BuildProjects.ToString(), CombineEntry.BuildErrors.ToString());
} catch (Exception e) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e, "Error while compiling");
+ messageService.ShowError(e, GettextCatalog.GetString ("Error while compiling"));
}
projectService.OnEndBuild();
}
@@ -206,7 +202,7 @@
IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));
try {
- statusBarService.SetMessage("${res:MainWindow.StatusBar.ExecutingMessage}");
+ statusBarService.SetMessage(GettextCatalog.GetString ("Executing"));
if (projectService.CurrentOpenCombine != null) {
try {
if (projectService.NeedsCompiling) {
@@ -219,7 +215,7 @@
} catch (NoStartupCombineDefinedException) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("Cannot execute Run command, cannot find startup project.\nPlease define a startup project for the combine in the combine properties.");
+ messageService.ShowError(GettextCatalog.GetString ("Cannot execute Run command, cannot find startup project.\nPlease define a startup project for the combine in the combine properties."));
}
} else {
if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
@@ -232,16 +228,16 @@
binding.Execute(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
} else {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError("No runnable executable found.");
+ messageService.ShowError(GettextCatalog.GetString ("No runnable executable found."));
}
}
}
}
} catch (Exception e) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e, "Error while running");
+ messageService.ShowError(e, GettextCatalog.GetString ("Error while running"));
}
- statusBarService.SetMessage("${res:MainWindow.StatusBar.ReadyMessage}");
+ statusBarService.SetMessage(GettextCatalog.GetString ("Ready"));
return false;
}
}
@@ -281,11 +277,10 @@
projectService.OnStartBuild();
projectService.CompileProject(projectService.CurrentSelectedProject);
- taskService.CompilerOutput += resourceService.GetString("MainWindow.CompilerMessages.DoneLabel") + "\n\n" +
- stringParserService.Parse("${res:MainWindow.CompilerMessages.StatsOutput}", new string[,] { {"SUCCEEDED", CombineEntry.BuildProjects.ToString()}, {"FAILED", CombineEntry.BuildErrors.ToString()} }) + "\n";
+ taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: ${0} succeeded, ${1} failed\n"), CombineEntry.BuildProjects.ToString(), CombineEntry.BuildErrors.ToString());
} catch (Exception e) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e, "Error while compiling project " + projectService.CurrentSelectedProject.Name);
+ messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Error while compiling project {0}"), projectService.CurrentSelectedProject.Name));
}
projectService.OnEndBuild();
}
@@ -316,11 +311,10 @@
projectService.OnStartBuild();
projectService.RecompileProject(projectService.CurrentSelectedProject);
- taskService.CompilerOutput += resourceService.GetString("MainWindow.CompilerMessages.DoneLabel") + "\n\n" +
- stringParserService.Parse("${res:MainWindow.CompilerMessages.StatsOutput}", new string[,] { {"SUCCEEDED", CombineEntry.BuildProjects.ToString()}, {"FAILED", CombineEntry.BuildErrors.ToString()} }) + "\n";
+ taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: ${0} succeeded, ${1} failed\n"), CombineEntry.BuildProjects.ToString(), CombineEntry.BuildErrors.ToString());
} catch (Exception e) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(e, "Error while compiling project " + projectService.CurrentSelectedProject.Name);
+ messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Error while compiling project {0}"), projectService.CurrentSelectedProject.Name));
}
projectService.OnEndBuild();
}
More information about the Monodevelop-patches-list
mailing list