[Monodevelop-patches-list] r1346 - in trunk/MonoDevelop: po src/Main/Base src/Main/Base/Gui/Dialogs src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions src/Main/Base/Gui/Dialogs/ReferenceDialog

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Fri Apr 2 06:58:33 EST 2004


Author: tberman
Date: 2004-04-02 06:58:33 -0500 (Fri, 02 Apr 2004)
New Revision: 1346

Modified:
   trunk/MonoDevelop/po/POTFILES.in
   trunk/MonoDevelop/src/Main/Base/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/WordCountDialog.cs
Log:
lots more gettextifyin action.


Modified: trunk/MonoDevelop/po/POTFILES.in
===================================================================
--- trunk/MonoDevelop/po/POTFILES.in	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/po/POTFILES.in	2004-04-02 11:58:33 UTC (rev 1346)
@@ -6,3 +6,13 @@
 src/Main/Base/Gui/Dialogs/OptionPanels/EditTemplateDialog.cs
 src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
 src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs
+src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs
+src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs
+src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs
+src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs
+src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
+src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs
+src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
+src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
+src/Main/Base/Gui/Dialogs/TreeViewOptions.cs
+src/Main/Base/Gui/Dialogs/WordCountDialog.cs

Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-04-02 11:58:33 UTC (rev 1346)
@@ -1,5 +1,21 @@
-2004-04-02  Todd berman  <tberman at sevenl.net>
+2004-04-02  Todd Berman  <tberman at sevenl.net>
 
+	* Gui/Dialogs/SharpDevelopAboutPanels.cs:
+	* Gui/Dialogs/ProjectOptionsDialog.cs:
+	* Gui/Dialogs/WordCountDialog.cs:
+	* Gui/Dialogs/TreeViewOptions.cs:
+	* Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs:
+	* Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs:
+	* Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs:
+	* Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs:
+	* Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs:
+	* Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs:
+	* Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs:
+	gettextify, this finishes Gui/Dialogs/* that we use currently i think.
+
+
+2004-04-02  Todd Berman  <tberman at sevenl.net>
+
 	* Gui/Dialogs/OptionPanels/ExternalToolPanel.cs:
 	* Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs:
 	* Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs:

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -17,6 +17,7 @@
 using MonoDevelop.Core.Services;
 using MonoDevelop.Core.Properties;
 using MonoDevelop.Gui.Components;
+using MonoDevelop.Services;
 
 using Gtk;
 using MonoDevelop.Gui.Widgets;
@@ -49,8 +50,6 @@
 			{
 				this.project = (IProject)((IProperties)CustomizationObject).GetProperty("Project");	
 				
-				includeLabel.Text =  StringParserService.Parse(
-					"${res:Dialog.Options.PrjOptions.CompileFile.IncludeGroupBox}");
 				includeLabel.UseUnderline = true;
 				store = new ListStore (typeof(bool), typeof(string));
 				includeTreeView.Selection.Mode = SelectionMode.None;
@@ -100,12 +99,11 @@
 					if (j < project.ProjectFiles.Count) {
 						project.ProjectFiles[j].BuildAction = (bool) store.GetValue(current, 0) ? BuildAction.Compile : BuildAction.Nothing;
 					} else {
-						string message = "File " + name + " not found in " + project.Name;
 						MessageDialog dialog = new MessageDialog ((Window) WorkbenchSingleton.Workbench, 
 								DialogFlags.DestroyWithParent,
 								MessageType.Error, 
 								ButtonsType.Close, 
-								message);	
+								String.Format (GettextCatalog.GetString ("File {0} not found in {1}."), name, project.Name));
 						dialog.Run ();
 						dialog.Hide ();
 						dialog.Dispose ();

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -17,6 +17,8 @@
 using MonoDevelop.Core.AddIns.Codons;
 using MonoDevelop.Gui.Components;
 
+using MonoDevelop.Services;
+
 using Gtk;
 using MonoDevelop.Gui.Widgets;
 
@@ -94,7 +96,7 @@
 			//FIXME : Finish details in this dialog.
 			void SelectScriptFileEvent(object sender, EventArgs e)
 			{
-				using (FileSelection fs = new FileSelection ("Select your File")) { // Put correct title 
+				using (FileSelection fs = new FileSelection (GettextCatalog.GetString ("Select your File"))) { // Put correct title 
 					fs.Complete("*.txt");
 					if ( fs.Run () == (int) ResponseType.Ok) {
  						deployScriptEntry.Text = fs.SelectionEntry.Text;
@@ -105,7 +107,7 @@
 			
 			void SelectTargetFolderEvent(object sender, EventArgs e)
 			{
-				using (FileSelection fs = new FileSelection ("${res:Dialog.Options.PrjOptions.DeployFile.FolderDialogDescription}")) {
+				using (FileSelection fs = new FileSelection (GettextCatalog.GetString ("Select the target directory"))) {
 					if ( fs.Run () == (int) ResponseType.Ok) {
 						deployTargetEntry.Text = fs.SelectionEntry.Text;
 					}
@@ -139,7 +141,7 @@
 								DialogFlags.DestroyWithParent,
 								MessageType.Error, 
 								ButtonsType.Close, 
-								"Invalid deploy target specified");
+								GettextCatalog.GetString ("Invalid deploy target specified"));
 						dialog.Run ();
 						dialog.Hide ();
 						dialog.Dispose ();
@@ -153,7 +155,7 @@
 								DialogFlags.DestroyWithParent,
 								MessageType.Error, 
 								ButtonsType.Close, 
-								"Invalid deploy script specified");
+								GettextCatalog.GetString ("Invalid deploy script specified"));
 						dialog.Run ();
 						dialog.Hide ();
 						dialog.Dispose ();
@@ -166,7 +168,7 @@
 							DialogFlags.DestroyWithParent,
 							MessageType.Error, 
 							ButtonsType.Close, 
-							"Deploy script doesn't exists");
+							GettextCatalog.GetString ("Deploy script doesn't exists"));
 					dialog.Run ();
 					dialog.Hide ();
 					dialog.Dispose ();

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -54,26 +54,10 @@
 			{
 				this.project = (IProject)((IProperties)CustomizationObject).GetProperty("Project");
 
-				nameLabel.Text = StringParserService.Parse(
-					"${res:Dialog.Options.PrjOptions.General.ProjectNameLabel}");
 				nameLabel.UseUnderline = true;
 				
-				descriptionLabel.Text = StringParserService.Parse(
-					"${res:Dialog.Options.PrjOptions.General.ProjectDescriptionLabel}");
 				descriptionLabel.UseUnderline = true;
 
-				// FIXME: il8n this
-				informationHeaderLabel.Markup = "<b>" + "Project Information" + "</b>";
-				// FIXME: il8n this
-				onProjectLoadHeaderLabel.Markup = "<b>" + "On Project Load" + "</b>";
-
-				newFilesOnLoadCheckButton.Label = StringParserService.Parse(
-					"${res:Dialog.Options.PrjOptions.General.SearchNewFileOnLoadCheckBox}");
-				autoInsertNewFilesCheckButton.Label = StringParserService.Parse(
-					"${res:Dialog.Options.PrjOptions.General.AutoIncludeFilesCheckBox}");
-				enableViewStateCheckButton.Label = StringParserService.Parse(
-					"${res:Dialog.Options.PrjOptions.General.ViewStateCheckBox}" );
-
 				projectNameEntry.Text = project.Name;
 				projectDescriptionTextView.Buffer.Text = project.Description;
 				enableViewStateCheckButton.Active = project.EnableViewState;

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -37,7 +37,7 @@
 		{
 			this.project = project;
 			this.configurationNode = configurationNode;
-			this.Title = StringParserService.Parse("${res:Dialog.Options.ProjectOptions.DialogName}");
+			this.Title = GettextCatalog.GetString ("Project Options");
 			
 			properties = new DefaultProperties();
 			properties.SetProperty("Project", project);
@@ -56,13 +56,13 @@
 		
 		void AddConfigurationNodes()
 		{
-			configurationTreeNode = treeStore.AppendValues (StringParserService.Parse("${res:Dialog.Options.ProjectOptions.ConfigurationsNodeName}"), null);
+			configurationTreeNode = treeStore.AppendValues (GettextCatalog.GetString ("Configurations"), null);
 			
 			foreach (IConfiguration config in project.Configurations) {
 				Gtk.TreeIter newNode ;
 				
 				if (config == project.ActiveConfiguration) {
-					newNode = treeStore.AppendValues (configurationTreeNode, config.Name + " (Active)", config);
+					newNode = treeStore.AppendValues (configurationTreeNode, config.Name + " " + GettextCatalog.GetString ("(Active)"), config);
 					//newNode.NodeFont = boldFont;
 				} else {
 					newNode = treeStore.AppendValues (configurationTreeNode, config.Name, config); 
@@ -173,7 +173,7 @@
 						// determine if this is the active config
 						IConfiguration config = (IConfiguration) treeStore.GetValue(node, 1);
 						if (project.ActiveConfiguration == config) {
-							treeStore.SetValue(node, 0, config.Name + " (Active)");
+							treeStore.SetValue(node, 0, config.Name + " " + GettextCatalog.GetString ("(Active)"));
 						} else {
 							treeStore.SetValue(node, 0, config.Name);
 						}
@@ -206,7 +206,7 @@
 					// see if it's the active columne (if so remove the active text on the end) before editing
 					if (project.ActiveConfiguration == config) {
 						string name = (string) mdl.GetValue(iter, 0);
-						name = name.Replace(" (Active)", string.Empty);
+						name = name.Replace(" " + GettextCatalog.GetString ("(Active)"), string.Empty);
 						mdl.SetValue(iter, 0, name);
 					}
 					

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -10,6 +10,7 @@
 using System.Text;
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 using Gtk;
 
@@ -23,7 +24,7 @@
 		{
 			this.selectDialog = selectDialog;
 			// FIXME: il8n this
-			Gtk.Button browseButton = new Gtk.Button("Browse");
+			Gtk.Button browseButton = new Gtk.Button(GettextCatalog.GetString ("Browse"));
 			browseButton.Clicked += new EventHandler(SelectReferenceDialog);
 			PackStart(browseButton, false, false, 6);
 			ShowAll();
@@ -33,7 +34,7 @@
 		{
 			// FIXME: il8n the dialog name
 			StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
-			using (FileSelection fdiag = new FileSelection("Find .Net Assembly")) {
+			using (FileSelection fdiag = new FileSelection(GettextCatalog.GetString ("Find .Net Assembly"))) {
 			// FIXME: this should only allow dll's and exe's
 			// fdiag.Complete("*");
 				fdiag.SelectMultiple = true;
@@ -58,7 +59,7 @@
 						} else {
 							IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
 							// FIXME: il8n this
-							messageService.ShowError("File " + file + "is not a valid .Net Assembly");
+							messageService.ShowError(String.Format (GettextCatalog.GetString ("File {0} is not a valid .Net Assembly"), file));
 						}
 					}
 				}

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -14,6 +14,7 @@
 using MonoDevelop.Internal.Project;
 
 using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 using Gtk;
 
@@ -35,7 +36,7 @@
 			treeView = new TreeView (store);
 
 			TreeViewColumn firstColumn = new TreeViewColumn ();
-			firstColumn.Title = resourceService.GetString ("Dialog.SelectReferenceDialog.GacReferencePanel.ReferenceHeader");
+			firstColumn.Title = GettextCatalog.GetString ("Reference Name");
 			CellRendererToggle tog_render = new CellRendererToggle ();
 			tog_render.Toggled += new Gtk.ToggledHandler (AddReference);
 			firstColumn.PackStart (tog_render, false);
@@ -46,8 +47,8 @@
 			firstColumn.AddAttribute (text_render, "text", 0);
 			
 			treeView.AppendColumn (firstColumn);
-			treeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.GacReferencePanel.VersionHeader"), new CellRendererText (), "text", 1);
-			treeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.GacReferencePanel.PathHeader"), new CellRendererText (), "text", 2);
+			treeView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 1);
+			treeView.AppendColumn (GettextCatalog.GetString ("Path"), new CellRendererText (), "text", 2);
 		
 			
 			PrintCache();
@@ -122,7 +123,7 @@
 			//FIXME: gac.
 			System.Reflection.MethodInfo gac = typeof (System.Environment).GetMethod ("internalGetGacPath", System.Reflection.BindingFlags.Static|System.Reflection.BindingFlags.NonPublic);
 			if (gac == null) {
-				Console.WriteLine ("ERROR: non-mono runtime detected, please use the mono runtime for this piece of MonoDevelop for the time being");
+				Console.WriteLine (GettextCatalog.GetString ("ERROR: non-mono runtime detected, please use the mono runtime for this piece of MonoDevelop for the time being"));
 				Environment.Exit (1);
 			}
 			string gac_path = System.IO.Path.Combine ((string)gac.Invoke (null, null), "");

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -30,8 +30,8 @@
 			
 			store = new TreeStore (typeof (string), typeof (string), typeof(IProject));
 			treeView = new TreeView (store);
-			treeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.ProjectReferencePanel.NameHeader"), new CellRendererText (), "text", 0);
-			treeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.ProjectReferencePanel.DirectoryHeader"), new CellRendererText (), "text", 1);
+			treeView.AppendColumn (GettextCatalog.GetString ("Project Name"), new CellRendererText (), "text", 0);
+			treeView.AppendColumn (GettextCatalog.GetString ("Project Directory"), new CellRendererText (), "text", 1);
 			
 			
 			PopulateListView ();

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -13,6 +13,7 @@
 
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 using Gtk;
 
@@ -69,14 +70,12 @@
 			Glade.XML refXML = new Glade.XML (null, "Base.glade", "AddReferenceDialog", null);
 			refXML.Autoconnect (this);
 			
-			AddReferenceDialog.Title = resourceService.GetString("Dialog.SelectReferenceDialog.DialogName");
-			
 			refTreeStore = new Gtk.TreeStore (typeof (string), typeof(string), typeof(string), typeof(ProjectReference));
 			ReferencesTreeView.Model = refTreeStore;
 
-			ReferencesTreeView.AppendColumn (resourceService.GetString("Dialog.SelectReferenceDialog.ReferenceHeader"), new CellRendererText (), "text", 0);
-			ReferencesTreeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.TypeHeader"), new CellRendererText (), "text", 1);
-			ReferencesTreeView.AppendColumn (resourceService.GetString ("Dialog.SelectReferenceDialog.LocationHeader"), new CellRendererText (), "text", 2);
+			ReferencesTreeView.AppendColumn (GettextCatalog.GetString("Reference Name"), new CellRendererText (), "text", 0);
+			ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Type"), new CellRendererText (), "text", 1);
+			ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", 2);
 			
 			gacRefPanel = new GacReferencePanel (this);
 			
@@ -92,10 +91,10 @@
 				}
 			}
 			mainBook.RemovePage (mainBook.CurrentPage);
-			mainBook.AppendPage (gacRefPanel, new Gtk.Label ("System Assemblies"));
-			mainBook.AppendPage (new ProjectReferencePanel (this), new Gtk.Label (resourceService.GetString("Dialog.SelectReferenceDialog.ProjectTabPage")));			
+			mainBook.AppendPage (gacRefPanel, new Gtk.Label (GettextCatalog.GetString ("System Assemblies")));
+			mainBook.AppendPage (new ProjectReferencePanel (this), new Gtk.Label (GettextCatalog.GetString ("Projects")));
 			// FIXME il8n the assembly tab name			
-			mainBook.AppendPage (new AssemblyReferencePanel (this), new Gtk.Label (".Net Assembly"));
+			mainBook.AppendPage (new AssemblyReferencePanel (this), new Gtk.Label (GettextCatalog.GetString (".Net Assembly")));
 			//comTabPage.Controls.Add(new COMReferencePanel(this));
 			AddReferenceDialog.ShowAll ();
 		}

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -49,7 +49,7 @@
 			buildTextBox.Text   = v.Revision + "." + v.Build;
 			
 			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
-			versionLabel.Text = resourceService.GetString("Dialog.About.label1Text");
+			versionLabel.Text = GettextCatalog.GetString("Version");
 			
 			//versionLabel.TabIndex = 1;
 			hbox.PackStart (versionLabel, false, false, 10);
@@ -57,7 +57,7 @@
 			//versionTextBox.TabIndex = 4;
 			hbox.PackStart (versionTextBox, false, false, 10);
 			
-			buildLabel.Text = resourceService.GetString("Dialog.About.label2Text");
+			buildLabel.Text = GettextCatalog.GetString("Build");
 			//buildLabel.TabIndex = 2;
 			hbox.PackStart (buildLabel, false, false, 10);
 			
@@ -65,7 +65,7 @@
 			hbox.PackStart (buildTextBox, false, false, 10);
 			this.PackStart (hbox, false, false, 5);
 			
-			sponsorLabel.Text = "Released under the GNU General Public license.";
+			sponsorLabel.Text = GettextCatalog.GetString ("Released under the GNU General Public license.");
 				               // "Sponsored by AlphaSierraPapa\n" +
 			                   // "                   http://www.AlphaSierraPapa.com";
 			//sponsorLabel.TabIndex = 8;
@@ -172,9 +172,9 @@
 	
 			TreeView listView = new TreeView ();
 			listView.RulesHint = true;
-			listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.NameColumn"), new CellRendererText (), "text", 0);
-			listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.VersionColumn"), new CellRendererText (), "text", 1);
-			listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.PathColumn"), new CellRendererText (), "text", 2);
+			listView.AppendColumn (GettextCatalog.GetString ("Name"), new CellRendererText (), "text", 0);
+			listView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 1);
+			listView.AppendColumn (GettextCatalog.GetString ("Path"), new CellRendererText (), "text", 2);
 			
 			FillListView ();
 			ScrolledWindow sw = new ScrolledWindow ();
@@ -204,7 +204,7 @@
 				try {
 					loc = asm.Location;
 				} catch (Exception) {
-					loc = "dynamic";
+					loc = GettextCatalog.GetString ("dynamic");
 				}
 				
 				store.AppendValues (name.Name, name.Version.ToString(), loc);
@@ -227,7 +227,7 @@
 				try {
 					versionInfo.Append(asm.Location);
 				} catch (Exception) {
-					versionInfo.Append("dynamic");
+					versionInfo.Append(GettextCatalog.GetString ("dynamic"));
 				}
 				
 				versionInfo.Append(Environment.NewLine);

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -150,7 +150,7 @@
 			TreeViewOptionDialog.TransientFor = (Gtk.Window)WorkbenchSingleton.Workbench;
 			TreeViewOptionDialog.WindowPosition = Gtk.WindowPosition.CenterOnParent;
 		
-			TreeViewOptionDialog.Title = StringParserService.Parse("${res:Dialog.Options.TreeViewOptions.DialogName}");
+			TreeViewOptionDialog.Title = GettextCatalog.GetString ("MonoDevelop options");
 
 			this.InitializeComponent();
 			

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/WordCountDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/WordCountDialog.cs	2004-04-02 11:03:55 UTC (rev 1345)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/WordCountDialog.cs	2004-04-02 11:58:33 UTC (rev 1346)
@@ -55,7 +55,7 @@
 			public static Report operator+(Report r, Report s)
 			{
 				ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
-				Report tmpReport = new Report (resourceService.GetString ("Dialog.WordCountDialog.TotalText"), s.chars, s.words, s.lines);
+				Report tmpReport = new Report (GettextCatalog.GetString("total"), s.chars, s.words, s.lines);
 				
 				tmpReport.chars += r.chars;
 				tmpReport.words += r.words;
@@ -97,7 +97,7 @@
 					IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
 					if (window != null) {
 						if (window.ViewContent.ContentName == null) {
-							messageService.ShowWarning ("${res:Dialog.WordCountDialog.SaveTheFileWarning}");
+							messageService.ShowWarning (GettextCatalog.GetString ("You must save the file"));
 						} else {
 							Report r = GetReport(window.ViewContent.ContentName);
 							if (r != null) items.Add(r);
@@ -111,10 +111,10 @@
 				if (WorkbenchSingleton.Workbench.ViewContentCollection.Count > 0) {
 					bool dirty = false;
 					
-					total = new Report (stringParserService.Parse ("${res:Dialog.WordCountDialog.TotalText}"), 0, 0, 0);
+					total = new Report (GettextCatalog.GetString ("total"), 0, 0, 0);
 					foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
 						if (content.ContentName == null) {
-							messageService.ShowWarning ("${res:Dialog.WordCountDialog.SaveAllFileWarning}");
+							messageService.ShowWarning (GettextCatalog.GetString ("You must save the file"));
 							continue;
 						} else {
 							Report r = GetReport(content.ContentName);
@@ -129,7 +129,7 @@
 					}
 					
 					if (dirty) {
-						messageService.ShowWarning ("${res:Dialog.WordCountDialog.DirtyWarning}");
+						messageService.ShowWarning (GettextCatalog.GetString ("Unsaved changed to open files were not included in counting"));
 					}
 					
 					store.AppendValues ("", "", "", "");
@@ -142,10 +142,10 @@
 					IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 					
 					if (projectService.CurrentOpenCombine == null) {
-						messageService.ShowError ("${res:Dialog.WordCountDialog.MustBeInProtectedModeWarning}");
+						messageService.ShowError (GettextCatalog.GetString ("You must be in project mode"));
 						break;
 					}
-					total = new Report (stringParserService.Parse ("${res:Dialog.WordCountDialog.TotalText}"), 0, 0, 0);
+					total = new Report (GettextCatalog.GetString ("total"), 0, 0, 0);
 					CountCombine(projectService.CurrentOpenCombine, ref total);
 					store.AppendValues ("", "", "", "");
 					//string[] allItems = all.ToListItem ();
@@ -250,23 +250,19 @@
 		void SortEvt (object sender, EventArgs e)
 		{
 			TreeViewColumn col = (TreeViewColumn) sender;
+			string file = GettextCatalog.GetString ("File");
+			string chars = GettextCatalog.GetString ("Chars");
+			string words = GettextCatalog.GetString ("Words");
+			string lines = GettextCatalog.GetString ("Lines");
 			
-			switch (col.Title) {
-				case "file":
+			if (file == col.Title)
 					store.SetSortColumnId (0, ReverseSort (col.SortOrder));
-					break;
-				case "Chars":
+			else if (chars == col.Title)
 					store.SetSortColumnId (1, ReverseSort (col.SortOrder));
-					break;
-				case "Words":
+			else if (words == col.Title)
 					store.SetSortColumnId (2, ReverseSort (col.SortOrder));
-					break;
-				case "Lines":
+			else if (lines == col.Title)
 					store.SetSortColumnId (3, ReverseSort (col.SortOrder));
-					break;
-				default:
-					break;
-			}
 			
 			//UpdateList ((TreeViewColumn)e.Column);
 		}
@@ -293,7 +289,7 @@
 		void InitializeComponents()
 		{
 			this.SetDefaultSize (300, 300);
-			this.Title = "Word Count";
+			this.Title = GettextCatalog.GetString ("Word Count");
 			Button startButton = new Button (Gtk.Stock.Execute);
 			startButton.Clicked += new EventHandler (startEvent);
 
@@ -309,19 +305,19 @@
 			resultListView = new TreeView ();
 			resultListView.RulesHint = true;
 
-			TreeViewColumn fileColumn = new TreeViewColumn ("file", new CellRendererText (), "text", 0);
+			TreeViewColumn fileColumn = new TreeViewColumn (GettextCatalog.GetString ("File"), new CellRendererText (), "text", 0);
 			fileColumn.Clicked += new EventHandler (SortEvt);
 			resultListView.AppendColumn (fileColumn);
 			
-			TreeViewColumn charsColumn = new TreeViewColumn ("Chars", new CellRendererText (), "text", 1);
+			TreeViewColumn charsColumn = new TreeViewColumn (GettextCatalog.GetString ("Chars"), new CellRendererText (), "text", 1);
 			charsColumn.Clicked += new EventHandler (SortEvt);
 			resultListView.AppendColumn (charsColumn);
 			
-			TreeViewColumn wordsColumn = new TreeViewColumn ("Words", new CellRendererText (), "text", 2);
+			TreeViewColumn wordsColumn = new TreeViewColumn (GettextCatalog.GetString ("Words"), new CellRendererText (), "text", 2);
 			wordsColumn.Clicked += new EventHandler (SortEvt);
 			resultListView.AppendColumn (wordsColumn);
 			
-			TreeViewColumn linesColumn = new TreeViewColumn ("Lines", new CellRendererText (), "text", 3);
+			TreeViewColumn linesColumn = new TreeViewColumn (GettextCatalog.GetString ("Lines"), new CellRendererText (), "text", 3);
 			linesColumn.Clicked += new EventHandler (SortEvt);
 			resultListView.AppendColumn (linesColumn);
 			
@@ -334,15 +330,15 @@
 			this.TransientFor = (Window) WorkbenchSingleton.Workbench;
 			
 			HBox hbox = new HBox (false, 0);
-			Label l = new Label ("_Count where");
+			Label l = new Label (GettextCatalog.GetString ("_Count where"));
 			hbox.PackStart (l);
 			
 			OptionMenu locationComboBox = new OptionMenu ();
 			locationComboBox.Changed += new EventHandler (OnOptionChanged);
 			Menu m = new Menu ();
-			m.Append (new MenuItem (stringParserService.Parse ("${res:Global.Location.currentfile}")));
-			m.Append (new MenuItem (stringParserService.Parse ("${res:Global.Location.allopenfiles}")));
-			m.Append (new MenuItem (stringParserService.Parse ("${res:Global.Location.wholeproject}")));
+			m.Append (new MenuItem (GettextCatalog.GetString ("Current file")));
+			m.Append (new MenuItem (GettextCatalog.GetString ("All open files")));
+			m.Append (new MenuItem (GettextCatalog.GetString ("Whole solution")));
 			locationComboBox.Menu = m;
 			hbox.PackStart (locationComboBox);
 			




More information about the Monodevelop-patches-list mailing list