changeset 132:cff58ea990c4

Fixes #361: Add XML export UI to GTK# * Use translatable widgets * Add English translations
author IBBoard <dev@ibboard.co.uk>
date Sat, 08 Oct 2011 20:33:37 +0100
parents 0d8004d6a4e5
children 3b4863c61db8
files Widgets/TransformXmlWidget.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs gtk-gui/gui.stetic translations/en.translation
diffstat 4 files changed, 14 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/Widgets/TransformXmlWidget.cs	Sat Oct 01 20:46:53 2011 +0100
     1.2 +++ b/Widgets/TransformXmlWidget.cs	Sat Oct 08 20:33:37 2011 +0100
     1.3 @@ -5,6 +5,7 @@
     1.4  using System.IO;
     1.5  using System.Collections.Generic;
     1.6  using IBBoard.GtkSharp;
     1.7 +using IBBoard.GtkSharp.Translatable;
     1.8  
     1.9  namespace IBBoard.WarFoundry.GUI.GTK
    1.10  {
    1.11 @@ -17,6 +18,7 @@
    1.12  		{
    1.13  			this.Build();
    1.14  			FillXsltList();
    1.15 +			ControlTranslator.TranslateWidget(this);
    1.16  		}
    1.17  
    1.18  		private void FillXsltList()
     2.1 --- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs	Sat Oct 01 20:46:53 2011 +0100
     2.2 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs	Sat Oct 08 20:33:37 2011 +0100
     2.3 @@ -5,7 +5,7 @@
     2.4  	public partial class TransformXmlWidget
     2.5  	{
     2.6  		private global::Gtk.Table table1;
     2.7 -		private global::Gtk.CheckButton doTransformWidget;
     2.8 +		private global::IBBoard.GtkSharp.Translatable.TranslatableCheckButton doTransformWidget;
     2.9  		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblTransform;
    2.10  		private global::Gtk.ComboBox transformList;
    2.11  		
    2.12 @@ -21,7 +21,7 @@
    2.13  			this.table1.RowSpacing = ((uint)(6));
    2.14  			this.table1.ColumnSpacing = ((uint)(6));
    2.15  			// Container child table1.Gtk.Table+TableChild
    2.16 -			this.doTransformWidget = new global::Gtk.CheckButton ();
    2.17 +			this.doTransformWidget = new global::IBBoard.GtkSharp.Translatable.TranslatableCheckButton ();
    2.18  			this.doTransformWidget.CanFocus = true;
    2.19  			this.doTransformWidget.Name = "doTransformWidget";
    2.20  			this.doTransformWidget.Label = global::Mono.Unix.Catalog.GetString ("transform output");
     3.1 --- a/gtk-gui/gui.stetic	Sat Oct 01 20:46:53 2011 +0100
     3.2 +++ b/gtk-gui/gui.stetic	Sat Oct 08 20:33:37 2011 +0100
     3.3 @@ -10,7 +10,7 @@
     3.4    </import>
     3.5    <widget class="Gtk.Window" id="IBBoard.WarFoundry.GUI.GTK.FrmMainWindow" design-size="832 659">
     3.6      <action-group name="Default">
     3.7 -      <action id="menuFile">
     3.8 +      <action id="FileAction">
     3.9          <property name="Type">Action</property>
    3.10          <property name="Label" translatable="yes">File</property>
    3.11          <property name="ShortLabel" translatable="yes">File</property>
    3.12 @@ -165,7 +165,7 @@
    3.13          <property name="StockId">gtk-preferences</property>
    3.14          <signal name="Activated" handler="miPreferencesClicked" />
    3.15        </action>
    3.16 -      <action id="transformedXmlAction">
    3.17 +      <action id="miExportArmyAsTransformedXml">
    3.18          <property name="Type">Action</property>
    3.19          <property name="Label" translatable="yes">transformed xml</property>
    3.20          <property name="ShortLabel" translatable="yes">transformed xml</property>
    3.21 @@ -182,14 +182,14 @@
    3.22            <widget class="Gtk.MenuBar" id="menubar1">
    3.23              <property name="MemberName" />
    3.24              <node name="menubar1" type="Menubar">
    3.25 -              <node type="Menu" action="menuFile">
    3.26 +              <node type="Menu" action="FileAction">
    3.27                  <node type="Menuitem" action="miNewArmy" />
    3.28                  <node type="Menuitem" action="miOpenArmy" />
    3.29                  <node type="Menuitem" action="miSaveArmy" />
    3.30                  <node type="Menuitem" action="miSaveArmyAs" />
    3.31                  <node type="Menu" action="miExportArmyAs">
    3.32                    <node type="Menuitem" action="miExportArmyAsBasicHTML" />
    3.33 -                  <node type="Menuitem" action="transformedXmlAction" />
    3.34 +                  <node type="Menuitem" action="miExportArmyAsTransformedXml" />
    3.35                  </node>
    3.36                  <node type="Menuitem" action="miCloseArmy" />
    3.37                  <node type="Separator" />
    3.38 @@ -2532,7 +2532,7 @@
    3.39        </widget>
    3.40      </child>
    3.41    </widget>
    3.42 -  <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget" design-size="300 55">
    3.43 +  <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget" design-size="348 55">
    3.44      <property name="MemberName" />
    3.45      <property name="Visible">False</property>
    3.46      <child>
    3.47 @@ -2546,7 +2546,7 @@
    3.48            <placeholder />
    3.49          </child>
    3.50          <child>
    3.51 -          <widget class="Gtk.CheckButton" id="doTransformWidget">
    3.52 +          <widget class="IBBoard.GtkSharp.Translatable.TranslatableCheckButton" id="doTransformWidget">
    3.53              <property name="MemberName" />
    3.54              <property name="CanFocus">True</property>
    3.55              <property name="Label" translatable="yes">transform output</property>
     4.1 --- a/translations/en.translation	Sat Oct 01 20:46:53 2011 +0100
     4.2 +++ b/translations/en.translation	Sat Oct 08 20:33:37 2011 +0100
     4.3 @@ -18,6 +18,7 @@
     4.4  <translation id="miSaveArmyAs">Save _army as...</translation>
     4.5  <translation id="miExportArmyAs">_Export army as...</translation>
     4.6  <translation id="miExportArmyAsBasicHTML">Basic HTML</translation>
     4.7 +<translation id="miExportArmyAsTransformedXml">Transformable XML</translation>
     4.8  <translation id="miCloseArmy">_Close army</translation>
     4.9  <translation id="miReloadFiles">_Reload files</translation>
    4.10  <translation id="miExit">_Quit</translation>
    4.11 @@ -122,6 +123,9 @@
    4.12  <translation id="armyHtmlExportEquipAmountPercentage">{0}% ({1})</translation>
    4.13  <translation id="armyHtmlExportEquipAmountNumber">{0}</translation>
    4.14  <translation id="armyHtmlExportEquipAmountRatio">{0} for {1}</translation>
    4.15 +<!-- Export / XML -->
    4.16 +<translation id="lblTransform">Transformation:</translation>
    4.17 +<translation id="doTransformWidget">Transform Output</translation>
    4.18  <!-- API -->
    4.19  <translation id="defaultUnitName">Unit of {0} {1}</translation>
    4.20  <translation id="setEquipmentAmountCommandDescription">Set {0} amount for {1} to {2}</translation>