changeset 81:3ff8e10de45a

Re #308: Make GTK# UI translatable * Make menu item/action names match WinForms for consistency * Add "_" to translations for keyboard shortcuts in menus
author IBBoard <dev@ibboard.co.uk>
date Tue, 28 Dec 2010 19:58:00 +0000
parents 9c9af2ce8c43
children fb16ca1cb52b
files FrmMainWindow.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs gtk-gui/gui.stetic translations/en.translation
diffstat 4 files changed, 31 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/FrmMainWindow.cs	Tue Dec 28 14:32:38 2010 +0000
+++ b/FrmMainWindow.cs	Tue Dec 28 19:58:00 2010 +0000
@@ -558,7 +558,7 @@
 			bool nonNullNewArmy = (newArmy != null);
 			miCloseArmy.Sensitive = nonNullNewArmy;
 			miSaveArmyAs.Sensitive = nonNullNewArmy;
-			miExportArmy.Sensitive = nonNullNewArmy;
+			miExportArmyAs.Sensitive = nonNullNewArmy;
 			hpaned2.Visible = nonNullNewArmy;
 			loadedArmyPath = null;
 			//New army has no changes, so we can't save it
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Tue Dec 28 14:32:38 2010 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Tue Dec 28 19:58:00 2010 +0000
@@ -6,7 +6,7 @@
 	{
 		private global::Gtk.UIManager UIManager;
 		private global::Gtk.Action menuFile;
-		private global::Gtk.Action miCreateArmy;
+		private global::Gtk.Action miNewArmy;
 		private global::Gtk.Action miOpenArmy;
 		private global::Gtk.Action miSaveArmy;
 		private global::Gtk.Action miSaveArmyAs;
@@ -26,7 +26,7 @@
 		private global::Gtk.Action redoActionButton;
 		private global::Gtk.Action goDown;
 		private global::Gtk.Action add;
-		private global::Gtk.Action miExportArmy;
+		private global::Gtk.Action miExportArmyAs;
 		private global::Gtk.Action miExportAsBasicHtml;
 		private global::Gtk.VBox vbox1;
 		private global::Gtk.MenuBar menubar1;
@@ -45,9 +45,9 @@
 			this.menuFile = new global::Gtk.Action("menuFile", global::Mono.Unix.Catalog.GetString("File"), null, null);
 			this.menuFile.ShortLabel = global::Mono.Unix.Catalog.GetString("File");
 			w1.Add(this.menuFile, null);
-			this.miCreateArmy = new global::Gtk.Action("miCreateArmy", global::Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new");
-			this.miCreateArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Create army");
-			w1.Add(this.miCreateArmy, null);
+			this.miNewArmy = new global::Gtk.Action("miNewArmy", global::Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new");
+			this.miNewArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Create army");
+			w1.Add(this.miNewArmy, null);
 			this.miOpenArmy = new global::Gtk.Action("miOpenArmy", global::Mono.Unix.Catalog.GetString("Open army"), null, "gtk-open");
 			this.miOpenArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Open army");
 			w1.Add(this.miOpenArmy, null);
@@ -106,10 +106,10 @@
 			w1.Add(this.goDown, null);
 			this.add = new global::Gtk.Action("add", null, null, "gtk-add");
 			w1.Add(this.add, null);
-			this.miExportArmy = new global::Gtk.Action("miExportArmy", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert");
-			this.miExportArmy.Sensitive = false;
-			this.miExportArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army");
-			w1.Add(this.miExportArmy, null);
+			this.miExportArmyAs = new global::Gtk.Action("miExportArmyAs", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert");
+			this.miExportArmyAs.Sensitive = false;
+			this.miExportArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army");
+			w1.Add(this.miExportArmyAs, null);
 			this.miExportAsBasicHtml = new global::Gtk.Action("miExportAsBasicHtml", global::Mono.Unix.Catalog.GetString("Basic HTML"), null, null);
 			this.miExportAsBasicHtml.ShortLabel = global::Mono.Unix.Catalog.GetString("Basic HTML");
 			w1.Add(this.miExportAsBasicHtml, null);
@@ -122,7 +122,7 @@
 			this.vbox1 = new global::Gtk.VBox();
 			this.vbox1.Name = "vbox1";
 			// Container child vbox1.Gtk.Box+BoxChild
-			this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miCreateArmy' action='miCreateArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmy' action='miExportArmy'><menuitem name='miExportAsBasicHtml' action='miExportAsBasicHtml'/></menu><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='refreshAction' action='refreshAction'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/></menu></menubar></ui>");
+			this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miNewArmy' action='miNewArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmyAs' action='miExportArmyAs'><menuitem name='miExportAsBasicHtml' action='miExportAsBasicHtml'/></menu><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='refreshAction' action='refreshAction'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/></menu></menubar></ui>");
 			this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
 			this.menubar1.Name = "menubar1";
 			this.vbox1.Add(this.menubar1);
@@ -183,7 +183,7 @@
 			this.DefaultHeight = 659;
 			this.hpaned2.Hide();
 			this.Show();
-			this.miCreateArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated);
+			this.miNewArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated);
 			this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated);
 			this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated);
 			this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated);
--- a/gtk-gui/gui.stetic	Tue Dec 28 14:32:38 2010 +0000
+++ b/gtk-gui/gui.stetic	Tue Dec 28 19:58:00 2010 +0000
@@ -15,7 +15,7 @@
         <property name="Label" translatable="yes">File</property>
         <property name="ShortLabel" translatable="yes">File</property>
       </action>
-      <action id="miCreateArmy">
+      <action id="miNewArmy">
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">Create army</property>
         <property name="ShortLabel" translatable="yes">Create army</property>
@@ -145,7 +145,7 @@
         <property name="Label" translatable="yes" />
         <property name="StockId">gtk-add</property>
       </action>
-      <action id="miExportArmy">
+      <action id="miExportArmyAs">
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">Export army as...</property>
         <property name="Sensitive">False</property>
@@ -170,11 +170,11 @@
             <property name="MemberName" />
             <node name="menubar1" type="Menubar">
               <node type="Menu" action="menuFile">
-                <node type="Menuitem" action="miCreateArmy" />
+                <node type="Menuitem" action="miNewArmy" />
                 <node type="Menuitem" action="miOpenArmy" />
                 <node type="Menuitem" action="miSaveArmy" />
                 <node type="Menuitem" action="miSaveArmyAs" />
-                <node type="Menu" action="miExportArmy">
+                <node type="Menu" action="miExportArmyAs">
                   <node type="Menuitem" action="miExportAsBasicHtml" />
                 </node>
                 <node type="Menuitem" action="miCloseArmy" />
--- a/translations/en.translation	Tue Dec 28 14:32:38 2010 +0000
+++ b/translations/en.translation	Tue Dec 28 19:58:00 2010 +0000
@@ -2,19 +2,21 @@
 <translations xmlns="http://ibboard.co.uk/translation"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 lang="en">
-<translation id="menuFile">File</translation>
-<translation id="menuEdit">Edit</translation>
-<translation id="menuHelp">Help</translation>
-<translation id="miNewArmy">Create army</translation>
-<translation id="miOpenArmy">Open army</translation>
-<translation id="miExit">Exit</translation>
-<translation id="miAbout">About</translation>
-<translation id="miSaveArmy">Save army</translation>
-<translation id="miSaveArmyAs">Save army as...</translation>
-<translation id="miCloseArmy">Close army</translation>
-<translation id="miChangeSystem">Change game system</translation>
-<translation id="miUndo">Undo</translation>
-<translation id="miRedo">Redo</translation>
+<translation id="menuFile">_File</translation>
+<translation id="menuEdit">_Edit</translation>
+<translation id="menuHelp">_Help</translation>
+<translation id="miNewArmy">Create _new army</translation>
+<translation id="miOpenArmy">_Open army</translation>
+<translation id="miSaveArmy">_Save army</translation>
+<translation id="miSaveArmyAs">Save _army as...</translation>
+<translation id="miExportArmyAs">_Export army as...</translation>
+<translation id="miExportArmyAsBasicHTML">Basic HTML</translation>
+<translation id="miCloseArmy">_Close army</translation>
+<translation id="miReloadFiles">_Reload files</translation>
+<translation id="miExit">_Quit</translation>
+<translation id="miUndo">_Undo</translation>
+<translation id="miRedo">_Redo</translation>
+<translation id="miAbout">_About</translation>
 <translation id="armyFileFilter">WarFoundry Army Files (*.army)</translation>
 <translation id="bttnSelectRace">Create army</translation>
 <translation id="bttnCancel">Cancel</translation>
@@ -34,8 +36,6 @@
 <translation id="bttnOpenArmy">Open army</translation>
 <translation id="bttnSaveArmy">Save army</translation>
 <translation id="statusPanelPoints">{0} pts / {1} pts</translation>
-<translation id="miReloadFiles">Reload files</translation>
-<translation id="miDebugWindow">Debug information</translation>
 <translation id="FrmNewUnit">Add New {0} Choice</translation>
 <translation id="IBBoard.WarFoundry.GUI.GTK.FrmAbout">About WarFoundry</translation>	
 </translations>
\ No newline at end of file