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 diff
     1.1 --- a/FrmMainWindow.cs	Tue Dec 28 14:32:38 2010 +0000
     1.2 +++ b/FrmMainWindow.cs	Tue Dec 28 19:58:00 2010 +0000
     1.3 @@ -558,7 +558,7 @@
     1.4  			bool nonNullNewArmy = (newArmy != null);
     1.5  			miCloseArmy.Sensitive = nonNullNewArmy;
     1.6  			miSaveArmyAs.Sensitive = nonNullNewArmy;
     1.7 -			miExportArmy.Sensitive = nonNullNewArmy;
     1.8 +			miExportArmyAs.Sensitive = nonNullNewArmy;
     1.9  			hpaned2.Visible = nonNullNewArmy;
    1.10  			loadedArmyPath = null;
    1.11  			//New army has no changes, so we can't save it
     2.1 --- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Tue Dec 28 14:32:38 2010 +0000
     2.2 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Tue Dec 28 19:58:00 2010 +0000
     2.3 @@ -6,7 +6,7 @@
     2.4  	{
     2.5  		private global::Gtk.UIManager UIManager;
     2.6  		private global::Gtk.Action menuFile;
     2.7 -		private global::Gtk.Action miCreateArmy;
     2.8 +		private global::Gtk.Action miNewArmy;
     2.9  		private global::Gtk.Action miOpenArmy;
    2.10  		private global::Gtk.Action miSaveArmy;
    2.11  		private global::Gtk.Action miSaveArmyAs;
    2.12 @@ -26,7 +26,7 @@
    2.13  		private global::Gtk.Action redoActionButton;
    2.14  		private global::Gtk.Action goDown;
    2.15  		private global::Gtk.Action add;
    2.16 -		private global::Gtk.Action miExportArmy;
    2.17 +		private global::Gtk.Action miExportArmyAs;
    2.18  		private global::Gtk.Action miExportAsBasicHtml;
    2.19  		private global::Gtk.VBox vbox1;
    2.20  		private global::Gtk.MenuBar menubar1;
    2.21 @@ -45,9 +45,9 @@
    2.22  			this.menuFile = new global::Gtk.Action("menuFile", global::Mono.Unix.Catalog.GetString("File"), null, null);
    2.23  			this.menuFile.ShortLabel = global::Mono.Unix.Catalog.GetString("File");
    2.24  			w1.Add(this.menuFile, null);
    2.25 -			this.miCreateArmy = new global::Gtk.Action("miCreateArmy", global::Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new");
    2.26 -			this.miCreateArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Create army");
    2.27 -			w1.Add(this.miCreateArmy, null);
    2.28 +			this.miNewArmy = new global::Gtk.Action("miNewArmy", global::Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new");
    2.29 +			this.miNewArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Create army");
    2.30 +			w1.Add(this.miNewArmy, null);
    2.31  			this.miOpenArmy = new global::Gtk.Action("miOpenArmy", global::Mono.Unix.Catalog.GetString("Open army"), null, "gtk-open");
    2.32  			this.miOpenArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Open army");
    2.33  			w1.Add(this.miOpenArmy, null);
    2.34 @@ -106,10 +106,10 @@
    2.35  			w1.Add(this.goDown, null);
    2.36  			this.add = new global::Gtk.Action("add", null, null, "gtk-add");
    2.37  			w1.Add(this.add, null);
    2.38 -			this.miExportArmy = new global::Gtk.Action("miExportArmy", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert");
    2.39 -			this.miExportArmy.Sensitive = false;
    2.40 -			this.miExportArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army");
    2.41 -			w1.Add(this.miExportArmy, null);
    2.42 +			this.miExportArmyAs = new global::Gtk.Action("miExportArmyAs", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert");
    2.43 +			this.miExportArmyAs.Sensitive = false;
    2.44 +			this.miExportArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army");
    2.45 +			w1.Add(this.miExportArmyAs, null);
    2.46  			this.miExportAsBasicHtml = new global::Gtk.Action("miExportAsBasicHtml", global::Mono.Unix.Catalog.GetString("Basic HTML"), null, null);
    2.47  			this.miExportAsBasicHtml.ShortLabel = global::Mono.Unix.Catalog.GetString("Basic HTML");
    2.48  			w1.Add(this.miExportAsBasicHtml, null);
    2.49 @@ -122,7 +122,7 @@
    2.50  			this.vbox1 = new global::Gtk.VBox();
    2.51  			this.vbox1.Name = "vbox1";
    2.52  			// Container child vbox1.Gtk.Box+BoxChild
    2.53 -			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>");
    2.54 +			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>");
    2.55  			this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
    2.56  			this.menubar1.Name = "menubar1";
    2.57  			this.vbox1.Add(this.menubar1);
    2.58 @@ -183,7 +183,7 @@
    2.59  			this.DefaultHeight = 659;
    2.60  			this.hpaned2.Hide();
    2.61  			this.Show();
    2.62 -			this.miCreateArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated);
    2.63 +			this.miNewArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated);
    2.64  			this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated);
    2.65  			this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated);
    2.66  			this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated);
     3.1 --- a/gtk-gui/gui.stetic	Tue Dec 28 14:32:38 2010 +0000
     3.2 +++ b/gtk-gui/gui.stetic	Tue Dec 28 19:58:00 2010 +0000
     3.3 @@ -15,7 +15,7 @@
     3.4          <property name="Label" translatable="yes">File</property>
     3.5          <property name="ShortLabel" translatable="yes">File</property>
     3.6        </action>
     3.7 -      <action id="miCreateArmy">
     3.8 +      <action id="miNewArmy">
     3.9          <property name="Type">Action</property>
    3.10          <property name="Label" translatable="yes">Create army</property>
    3.11          <property name="ShortLabel" translatable="yes">Create army</property>
    3.12 @@ -145,7 +145,7 @@
    3.13          <property name="Label" translatable="yes" />
    3.14          <property name="StockId">gtk-add</property>
    3.15        </action>
    3.16 -      <action id="miExportArmy">
    3.17 +      <action id="miExportArmyAs">
    3.18          <property name="Type">Action</property>
    3.19          <property name="Label" translatable="yes">Export army as...</property>
    3.20          <property name="Sensitive">False</property>
    3.21 @@ -170,11 +170,11 @@
    3.22              <property name="MemberName" />
    3.23              <node name="menubar1" type="Menubar">
    3.24                <node type="Menu" action="menuFile">
    3.25 -                <node type="Menuitem" action="miCreateArmy" />
    3.26 +                <node type="Menuitem" action="miNewArmy" />
    3.27                  <node type="Menuitem" action="miOpenArmy" />
    3.28                  <node type="Menuitem" action="miSaveArmy" />
    3.29                  <node type="Menuitem" action="miSaveArmyAs" />
    3.30 -                <node type="Menu" action="miExportArmy">
    3.31 +                <node type="Menu" action="miExportArmyAs">
    3.32                    <node type="Menuitem" action="miExportAsBasicHtml" />
    3.33                  </node>
    3.34                  <node type="Menuitem" action="miCloseArmy" />
     4.1 --- a/translations/en.translation	Tue Dec 28 14:32:38 2010 +0000
     4.2 +++ b/translations/en.translation	Tue Dec 28 19:58:00 2010 +0000
     4.3 @@ -2,19 +2,21 @@
     4.4  <translations xmlns="http://ibboard.co.uk/translation"
     4.5  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     4.6  lang="en">
     4.7 -<translation id="menuFile">File</translation>
     4.8 -<translation id="menuEdit">Edit</translation>
     4.9 -<translation id="menuHelp">Help</translation>
    4.10 -<translation id="miNewArmy">Create army</translation>
    4.11 -<translation id="miOpenArmy">Open army</translation>
    4.12 -<translation id="miExit">Exit</translation>
    4.13 -<translation id="miAbout">About</translation>
    4.14 -<translation id="miSaveArmy">Save army</translation>
    4.15 -<translation id="miSaveArmyAs">Save army as...</translation>
    4.16 -<translation id="miCloseArmy">Close army</translation>
    4.17 -<translation id="miChangeSystem">Change game system</translation>
    4.18 -<translation id="miUndo">Undo</translation>
    4.19 -<translation id="miRedo">Redo</translation>
    4.20 +<translation id="menuFile">_File</translation>
    4.21 +<translation id="menuEdit">_Edit</translation>
    4.22 +<translation id="menuHelp">_Help</translation>
    4.23 +<translation id="miNewArmy">Create _new army</translation>
    4.24 +<translation id="miOpenArmy">_Open army</translation>
    4.25 +<translation id="miSaveArmy">_Save army</translation>
    4.26 +<translation id="miSaveArmyAs">Save _army as...</translation>
    4.27 +<translation id="miExportArmyAs">_Export army as...</translation>
    4.28 +<translation id="miExportArmyAsBasicHTML">Basic HTML</translation>
    4.29 +<translation id="miCloseArmy">_Close army</translation>
    4.30 +<translation id="miReloadFiles">_Reload files</translation>
    4.31 +<translation id="miExit">_Quit</translation>
    4.32 +<translation id="miUndo">_Undo</translation>
    4.33 +<translation id="miRedo">_Redo</translation>
    4.34 +<translation id="miAbout">_About</translation>
    4.35  <translation id="armyFileFilter">WarFoundry Army Files (*.army)</translation>
    4.36  <translation id="bttnSelectRace">Create army</translation>
    4.37  <translation id="bttnCancel">Cancel</translation>
    4.38 @@ -34,8 +36,6 @@
    4.39  <translation id="bttnOpenArmy">Open army</translation>
    4.40  <translation id="bttnSaveArmy">Save army</translation>
    4.41  <translation id="statusPanelPoints">{0} pts / {1} pts</translation>
    4.42 -<translation id="miReloadFiles">Reload files</translation>
    4.43 -<translation id="miDebugWindow">Debug information</translation>
    4.44  <translation id="FrmNewUnit">Add New {0} Choice</translation>
    4.45  <translation id="IBBoard.WarFoundry.GUI.GTK.FrmAbout">About WarFoundry</translation>	
    4.46  </translations>
    4.47 \ No newline at end of file