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 wrap: on
line diff
--- a/Widgets/TransformXmlWidget.cs	Sat Oct 01 20:46:53 2011 +0100
+++ b/Widgets/TransformXmlWidget.cs	Sat Oct 08 20:33:37 2011 +0100
@@ -5,6 +5,7 @@
 using System.IO;
 using System.Collections.Generic;
 using IBBoard.GtkSharp;
+using IBBoard.GtkSharp.Translatable;
 
 namespace IBBoard.WarFoundry.GUI.GTK
 {
@@ -17,6 +18,7 @@
 		{
 			this.Build();
 			FillXsltList();
+			ControlTranslator.TranslateWidget(this);
 		}
 
 		private void FillXsltList()
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs	Sat Oct 01 20:46:53 2011 +0100
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs	Sat Oct 08 20:33:37 2011 +0100
@@ -5,7 +5,7 @@
 	public partial class TransformXmlWidget
 	{
 		private global::Gtk.Table table1;
-		private global::Gtk.CheckButton doTransformWidget;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableCheckButton doTransformWidget;
 		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblTransform;
 		private global::Gtk.ComboBox transformList;
 		
@@ -21,7 +21,7 @@
 			this.table1.RowSpacing = ((uint)(6));
 			this.table1.ColumnSpacing = ((uint)(6));
 			// Container child table1.Gtk.Table+TableChild
-			this.doTransformWidget = new global::Gtk.CheckButton ();
+			this.doTransformWidget = new global::IBBoard.GtkSharp.Translatable.TranslatableCheckButton ();
 			this.doTransformWidget.CanFocus = true;
 			this.doTransformWidget.Name = "doTransformWidget";
 			this.doTransformWidget.Label = global::Mono.Unix.Catalog.GetString ("transform output");
--- a/gtk-gui/gui.stetic	Sat Oct 01 20:46:53 2011 +0100
+++ b/gtk-gui/gui.stetic	Sat Oct 08 20:33:37 2011 +0100
@@ -10,7 +10,7 @@
   </import>
   <widget class="Gtk.Window" id="IBBoard.WarFoundry.GUI.GTK.FrmMainWindow" design-size="832 659">
     <action-group name="Default">
-      <action id="menuFile">
+      <action id="FileAction">
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">File</property>
         <property name="ShortLabel" translatable="yes">File</property>
@@ -165,7 +165,7 @@
         <property name="StockId">gtk-preferences</property>
         <signal name="Activated" handler="miPreferencesClicked" />
       </action>
-      <action id="transformedXmlAction">
+      <action id="miExportArmyAsTransformedXml">
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">transformed xml</property>
         <property name="ShortLabel" translatable="yes">transformed xml</property>
@@ -182,14 +182,14 @@
           <widget class="Gtk.MenuBar" id="menubar1">
             <property name="MemberName" />
             <node name="menubar1" type="Menubar">
-              <node type="Menu" action="menuFile">
+              <node type="Menu" action="FileAction">
                 <node type="Menuitem" action="miNewArmy" />
                 <node type="Menuitem" action="miOpenArmy" />
                 <node type="Menuitem" action="miSaveArmy" />
                 <node type="Menuitem" action="miSaveArmyAs" />
                 <node type="Menu" action="miExportArmyAs">
                   <node type="Menuitem" action="miExportArmyAsBasicHTML" />
-                  <node type="Menuitem" action="transformedXmlAction" />
+                  <node type="Menuitem" action="miExportArmyAsTransformedXml" />
                 </node>
                 <node type="Menuitem" action="miCloseArmy" />
                 <node type="Separator" />
@@ -2532,7 +2532,7 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget" design-size="300 55">
+  <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget" design-size="348 55">
     <property name="MemberName" />
     <property name="Visible">False</property>
     <child>
@@ -2546,7 +2546,7 @@
           <placeholder />
         </child>
         <child>
-          <widget class="Gtk.CheckButton" id="doTransformWidget">
+          <widget class="IBBoard.GtkSharp.Translatable.TranslatableCheckButton" id="doTransformWidget">
             <property name="MemberName" />
             <property name="CanFocus">True</property>
             <property name="Label" translatable="yes">transform output</property>
--- a/translations/en.translation	Sat Oct 01 20:46:53 2011 +0100
+++ b/translations/en.translation	Sat Oct 08 20:33:37 2011 +0100
@@ -18,6 +18,7 @@
 <translation id="miSaveArmyAs">Save _army as...</translation>
 <translation id="miExportArmyAs">_Export army as...</translation>
 <translation id="miExportArmyAsBasicHTML">Basic HTML</translation>
+<translation id="miExportArmyAsTransformedXml">Transformable XML</translation>
 <translation id="miCloseArmy">_Close army</translation>
 <translation id="miReloadFiles">_Reload files</translation>
 <translation id="miExit">_Quit</translation>
@@ -122,6 +123,9 @@
 <translation id="armyHtmlExportEquipAmountPercentage">{0}% ({1})</translation>
 <translation id="armyHtmlExportEquipAmountNumber">{0}</translation>
 <translation id="armyHtmlExportEquipAmountRatio">{0} for {1}</translation>
+<!-- Export / XML -->
+<translation id="lblTransform">Transformation:</translation>
+<translation id="doTransformWidget">Transform Output</translation>
 <!-- API -->
 <translation id="defaultUnitName">Unit of {0} {1}</translation>
 <translation id="setEquipmentAmountCommandDescription">Set {0} amount for {1} to {2}</translation>