# HG changeset patch # User IBBoard # Date 1293566280 0 # Node ID 3ff8e10de45a86605c9d95152eecbebf06486b18 # Parent 9c9af2ce8c432f65ef0bfe93cf97cbf09cdc9d21 Re #308: Make GTK# UI translatable * Make menu item/action names match WinForms for consistency * Add "_" to translations for keyboard shortcuts in menus diff -r 9c9af2ce8c43 -r 3ff8e10de45a FrmMainWindow.cs --- 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 diff -r 9c9af2ce8c43 -r 3ff8e10de45a gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs --- 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(""); + this.UIManager.AddUiFromString(""); 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); diff -r 9c9af2ce8c43 -r 3ff8e10de45a gtk-gui/gui.stetic --- 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 @@ File File - + Action Create army Create army @@ -145,7 +145,7 @@ gtk-add - + Action Export army as... False @@ -170,11 +170,11 @@ - + - + diff -r 9c9af2ce8c43 -r 3ff8e10de45a translations/en.translation --- 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 @@ -File -Edit -Help -Create army -Open army -Exit -About -Save army -Save army as... -Close army -Change game system -Undo -Redo +_File +_Edit +_Help +Create _new army +_Open army +_Save army +Save _army as... +_Export army as... +Basic HTML +_Close army +_Reload files +_Quit +_Undo +_Redo +_About WarFoundry Army Files (*.army) Create army Cancel @@ -34,8 +36,6 @@ Open army Save army {0} pts / {1} pts -Reload files -Debug information Add New {0} Choice About WarFoundry \ No newline at end of file