changeset 95:ea4069bbe6e9

Re #309: Add initial preference dialog with language support * Add first preference dialog * Add French translations (based on WinForms file) Re #308: Make GTK# UI translatable * Add some missing English translations (API strings)
author IBBoard <dev@ibboard.co.uk>
date Sat, 01 Jan 2011 20:55:07 +0000
parents 26e4525b49cf
children b4416ca69153
files FrmMainWindow.cs FrmPreferences.cs IBBoard.WarFoundry.GUI.GTK.csproj gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmPreferences.cs gtk-gui/gui.stetic translations/en.translation translations/fr.translation
diffstat 8 files changed, 586 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/FrmMainWindow.cs	Fri Dec 31 15:43:05 2010 +0000
+++ b/FrmMainWindow.cs	Sat Jan 01 20:55:07 2011 +0000
@@ -1118,6 +1118,13 @@
 			form.Hide();
 		}
 
+		protected virtual void miPreferencesClicked(object sender, System.EventArgs e)
+		{
+			FrmPreferences form = new FrmPreferences(Preferences);
+			form.Run();
+			form.Hide();
+		}
+
 		public override ICollection<Action> Actions
 		{
 			get
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FrmPreferences.cs	Sat Jan 01 20:55:07 2011 +0000
@@ -0,0 +1,104 @@
+//  This file (FrmPreferences.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2011 IBBoard
+// 
+//  The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+
+using System;
+using IBBoard.GtkSharp.Translatable;
+using IBBoard.Lang;
+using Gtk;
+using System.Collections.Generic;
+using IBBoard.GtkSharp;
+using System.Globalization;
+using log4net;
+
+namespace IBBoard.WarFoundry.GUI.GTK
+{
+	public partial class FrmPreferences : TranslatableDialog
+	{
+		private ILog logger = LogManager.GetLogger(typeof(FrmPreferences));
+		private Preferences prefs;
+		private string initialLang;
+
+		public FrmPreferences(Preferences preferences)
+		{
+			prefs = preferences;
+			initialLang = Translation.GetTranslationLanguage();
+			this.Build();
+			BuildPreferenceCategoryTree();
+			BuildLanguageList();
+			Translate();
+		}
+
+		protected override void Translate()
+		{
+			base.Translate();
+			frameLabel.Text = Translation.GetTranslation("languagesGroup", "languages");
+
+		}
+
+		private void RenderPreference(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
+		{
+			object obj = model.GetValue(iter, 0);
+
+			if (obj is string)
+			{
+				(cell as CellRendererText).Text = (string)obj;
+			}
+		}
+
+		private void BuildPreferenceCategoryTree()
+		{
+			TreeViewColumn mainColumn = new TreeViewColumn();
+			CellRendererText mainCell = new CellRendererText();
+			mainColumn.PackStart(mainCell, true);
+			preferencesTree.AppendColumn(mainColumn);
+			mainColumn.SetCellDataFunc(mainCell, new TreeCellDataFunc(RenderPreference));
+			TreeStore model = new TreeStore(typeof(string));
+			preferencesTree.Model = model;
+			model.AppendValues(Translation.GetTranslation("languagePrefSection", "Language"));
+		}
+
+		private void BuildLanguageList()
+		{
+			ICollection<TranslationLanguage> langs = Translation.GetLanguages();
+			List<TranslationLanguage> sortedLangs = new List<TranslationLanguage>(langs);
+			sortedLangs.Sort(CompareLanguages);
+			ComboBoxUtils.FillCombo(languageList, sortedLangs, delegate(TranslationLanguage lang){return lang.Name;});
+			ComboBoxUtils.SelectItem(languageList, Translation.GetTranslationSet(initialLang).Language);
+		}
+
+		private int CompareLanguages(TranslationLanguage lang1, TranslationLanguage lang2)
+		{
+			CompareOptions options = CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth;
+			return CultureInfo.CurrentCulture.CompareInfo.Compare(lang1.Name, lang2.Name, options);
+		}
+
+		protected virtual void bttnOkayClicked(object sender, System.EventArgs e)
+		{
+			prefs["language"] = Translation.GetTranslationLanguage();
+			prefs.Save();
+			Respond(ResponseType.Ok);
+		}
+
+		protected virtual void bttnCancelClicked(object sender, System.EventArgs e)
+		{
+			Translation.LoadTranslation(initialLang);
+			Respond(ResponseType.Cancel);
+		}
+
+		protected virtual void languageListChanged(object sender, System.EventArgs e)
+		{
+			TranslationLanguage selectedLang = ComboBoxUtils.GetSelectedItem<TranslationLanguage>(languageList);
+			string code = selectedLang == null ? "" : selectedLang.Code;
+			logger.Debug("New language: " + code);
+			Translation.LoadTranslation(code);
+			bttnOkay.Sensitive = !initialLang.Equals(code);
+
+		}
+
+
+
+
+	}
+}
+
--- a/IBBoard.WarFoundry.GUI.GTK.csproj	Fri Dec 31 15:43:05 2010 +0000
+++ b/IBBoard.WarFoundry.GUI.GTK.csproj	Sat Jan 01 20:55:07 2011 +0000
@@ -69,6 +69,8 @@
     <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.cs" />
     <Compile Include="FrmAboutCredits.cs" />
     <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmAboutCredits.cs" />
+    <Compile Include="FrmPreferences.cs" />
+    <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmPreferences.cs" />
   </ItemGroup>
   <ItemGroup>
     <Content Include="App.png" />
@@ -87,6 +89,9 @@
     <None Include="WarFoundry-GTKPref.xml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="translations\fr.translation">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Fri Dec 31 15:43:05 2010 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Sat Jan 01 20:55:07 2011 +0000
@@ -28,6 +28,7 @@
 		private global::Gtk.Action add;
 		private global::Gtk.Action miExportArmyAs;
 		private global::Gtk.Action miExportAsBasicHtml;
+		private global::Gtk.Action miPreferences;
 		private global::Gtk.VBox vbox1;
 		private global::Gtk.MenuBar menubar1;
 		private global::Gtk.Toolbar toolbar;
@@ -108,11 +109,14 @@
 			w1.Add(this.add, 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");
+			this.miExportArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army as...");
 			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);
+			this.miPreferences = new global::Gtk.Action("miPreferences", global::Mono.Unix.Catalog.GetString("preferences"), null, "gtk-preferences");
+			this.miPreferences.ShortLabel = global::Mono.Unix.Catalog.GetString("preferences");
+			w1.Add(this.miPreferences, null);
 			this.UIManager.InsertActionGroup(w1, 0);
 			this.AddAccelGroup(this.UIManager.AccelGroup);
 			this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmMainWindow";
@@ -122,7 +126,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='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='miReloadFiles' action='miReloadFiles'/><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='miReloadFiles' action='miReloadFiles'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/><separator/><menuitem name='miPreferences' action='miPreferences'/></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);
@@ -197,6 +201,7 @@
 			this.bttnUndo.Activated += new global::System.EventHandler(this.undoTBButtonActivated);
 			this.bttnRedo.Activated += new global::System.EventHandler(this.redoTBButtonActivated);
 			this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated);
+			this.miPreferences.Activated += new global::System.EventHandler(this.miPreferencesClicked);
 			this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler(this.ArmyRowActivated);
 			this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler(this.OnTreeUnitsPopupMenu);
 			this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(this.UnitTreeButtonPressed);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmPreferences.cs	Sat Jan 01 20:55:07 2011 +0000
@@ -0,0 +1,132 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace IBBoard.WarFoundry.GUI.GTK
+{
+	public partial class FrmPreferences
+	{
+		private global::Gtk.HPaned hpaned1;
+		private global::Gtk.ScrolledWindow GtkScrolledWindow;
+		private global::Gtk.TreeView preferencesTree;
+		private global::Gtk.Frame prefsFrame;
+		private global::Gtk.Alignment GtkAlignment2;
+		private global::Gtk.Table table1;
+		private global::Gtk.ComboBox languageList;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblLanguage;
+		private global::Gtk.Label frameLabel;
+		private global::Gtk.Button bttnCancel;
+		private global::Gtk.Button bttnOkay;
+
+		protected virtual void Build()
+		{
+			global::Stetic.Gui.Initialize(this);
+			// Widget IBBoard.WarFoundry.GUI.GTK.FrmPreferences
+			this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmPreferences";
+			this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+			// Internal child IBBoard.WarFoundry.GUI.GTK.FrmPreferences.VBox
+			global::Gtk.VBox w1 = this.VBox;
+			w1.Name = "dialog1_VBox";
+			w1.BorderWidth = ((uint)(2));
+			// Container child dialog1_VBox.Gtk.Box+BoxChild
+			this.hpaned1 = new global::Gtk.HPaned();
+			this.hpaned1.CanFocus = true;
+			this.hpaned1.Name = "hpaned1";
+			this.hpaned1.Position = 164;
+			// Container child hpaned1.Gtk.Paned+PanedChild
+			this.GtkScrolledWindow = new global::Gtk.ScrolledWindow();
+			this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+			this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
+			// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
+			this.preferencesTree = new global::Gtk.TreeView();
+			this.preferencesTree.CanFocus = true;
+			this.preferencesTree.Name = "preferencesTree";
+			this.preferencesTree.HeadersVisible = false;
+			this.GtkScrolledWindow.Add(this.preferencesTree);
+			this.hpaned1.Add(this.GtkScrolledWindow);
+			global::Gtk.Paned.PanedChild w3 = ((global::Gtk.Paned.PanedChild)(this.hpaned1[this.GtkScrolledWindow]));
+			w3.Resize = false;
+			// Container child hpaned1.Gtk.Paned+PanedChild
+			this.prefsFrame = new global::Gtk.Frame();
+			this.prefsFrame.Name = "prefsFrame";
+			this.prefsFrame.ShadowType = ((global::Gtk.ShadowType)(1));
+			this.prefsFrame.BorderWidth = ((uint)(2));
+			// Container child prefsFrame.Gtk.Container+ContainerChild
+			this.GtkAlignment2 = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
+			this.GtkAlignment2.Name = "GtkAlignment2";
+			this.GtkAlignment2.LeftPadding = ((uint)(12));
+			// Container child GtkAlignment2.Gtk.Container+ContainerChild
+			this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(2)), false);
+			this.table1.Name = "table1";
+			this.table1.RowSpacing = ((uint)(6));
+			this.table1.ColumnSpacing = ((uint)(6));
+			// Container child table1.Gtk.Table+TableChild
+			this.languageList = global::Gtk.ComboBox.NewText();
+			this.languageList.Name = "languageList";
+			this.table1.Add(this.languageList);
+			global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1[this.languageList]));
+			w4.LeftAttach = ((uint)(1));
+			w4.RightAttach = ((uint)(2));
+			w4.XOptions = ((global::Gtk.AttachOptions)(4));
+			w4.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table1.Gtk.Table+TableChild
+			this.lblLanguage = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
+			this.lblLanguage.Name = "lblLanguage";
+			this.lblLanguage.LabelProp = global::Mono.Unix.Catalog.GetString("language:");
+			this.table1.Add(this.lblLanguage);
+			global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.lblLanguage]));
+			w5.XOptions = ((global::Gtk.AttachOptions)(4));
+			w5.YOptions = ((global::Gtk.AttachOptions)(4));
+			this.GtkAlignment2.Add(this.table1);
+			this.prefsFrame.Add(this.GtkAlignment2);
+			this.frameLabel = new global::Gtk.Label();
+			this.frameLabel.Name = "frameLabel";
+			this.frameLabel.LabelProp = global::Mono.Unix.Catalog.GetString("<b>language</b>");
+			this.frameLabel.UseMarkup = true;
+			this.prefsFrame.LabelWidget = this.frameLabel;
+			this.hpaned1.Add(this.prefsFrame);
+			w1.Add(this.hpaned1);
+			global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(w1[this.hpaned1]));
+			w9.Position = 0;
+			// Internal child IBBoard.WarFoundry.GUI.GTK.FrmPreferences.ActionArea
+			global::Gtk.HButtonBox w10 = this.ActionArea;
+			w10.Name = "dialog1_ActionArea";
+			w10.Spacing = 10;
+			w10.BorderWidth = ((uint)(5));
+			w10.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+			this.bttnCancel = new global::Gtk.Button();
+			this.bttnCancel.CanDefault = true;
+			this.bttnCancel.CanFocus = true;
+			this.bttnCancel.Name = "bttnCancel";
+			this.bttnCancel.UseStock = true;
+			this.bttnCancel.UseUnderline = true;
+			this.bttnCancel.Label = "gtk-cancel";
+			this.AddActionWidget(this.bttnCancel, -6);
+			global::Gtk.ButtonBox.ButtonBoxChild w11 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10[this.bttnCancel]));
+			w11.Expand = false;
+			w11.Fill = false;
+			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+			this.bttnOkay = new global::Gtk.Button();
+			this.bttnOkay.CanDefault = true;
+			this.bttnOkay.CanFocus = true;
+			this.bttnOkay.Name = "bttnOkay";
+			this.bttnOkay.UseStock = true;
+			this.bttnOkay.UseUnderline = true;
+			this.bttnOkay.Label = "gtk-ok";
+			this.AddActionWidget(this.bttnOkay, -5);
+			global::Gtk.ButtonBox.ButtonBoxChild w12 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10[this.bttnOkay]));
+			w12.Position = 1;
+			w12.Expand = false;
+			w12.Fill = false;
+			if ((this.Child != null))
+			{
+				this.Child.ShowAll();
+			}
+			this.DefaultWidth = 400;
+			this.DefaultHeight = 300;
+			this.Show();
+			this.languageList.Changed += new global::System.EventHandler(this.languageListChanged);
+			this.bttnCancel.Clicked += new global::System.EventHandler(this.bttnCancelClicked);
+			this.bttnOkay.Clicked += new global::System.EventHandler(this.bttnOkayClicked);
+		}
+	}
+}
--- a/gtk-gui/gui.stetic	Fri Dec 31 15:43:05 2010 +0000
+++ b/gtk-gui/gui.stetic	Sat Jan 01 20:55:07 2011 +0000
@@ -149,7 +149,7 @@
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">Export army as...</property>
         <property name="Sensitive">False</property>
-        <property name="ShortLabel" translatable="yes">Export army</property>
+        <property name="ShortLabel" translatable="yes">Export army as...</property>
         <property name="StockId">gtk-convert</property>
       </action>
       <action id="miExportAsBasicHtml">
@@ -158,6 +158,13 @@
         <property name="ShortLabel" translatable="yes">Basic HTML</property>
         <signal name="Activated" handler="OnMiExportAsBasicHtmlActivated" />
       </action>
+      <action id="miPreferences">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">preferences</property>
+        <property name="ShortLabel" translatable="yes">preferences</property>
+        <property name="StockId">gtk-preferences</property>
+        <signal name="Activated" handler="miPreferencesClicked" />
+      </action>
     </action-group>
     <property name="MemberName" />
     <property name="Title" translatable="yes">MainWindow</property>
@@ -186,6 +193,8 @@
               <node type="Menu" action="menuEdit">
                 <node type="Menuitem" action="miUndo" />
                 <node type="Menuitem" action="miRedo" />
+                <node type="Separator" />
+                <node type="Menuitem" action="miPreferences" />
               </node>
               <node type="Menu" action="menuHelp">
                 <node type="Menuitem" action="miAbout" />
@@ -2337,4 +2346,172 @@
       </widget>
     </child>
   </widget>
+  <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmPreferences" design-size="400 300">
+    <property name="MemberName" />
+    <property name="WindowPosition">CenterOnParent</property>
+    <property name="Buttons">2</property>
+    <property name="HelpButton">False</property>
+    <child internal-child="VBox">
+      <widget class="Gtk.VBox" id="dialog1_VBox">
+        <property name="MemberName" />
+        <property name="BorderWidth">2</property>
+        <child>
+          <widget class="Gtk.HPaned" id="hpaned1">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Position">164</property>
+            <child>
+              <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+                <property name="MemberName" />
+                <property name="ShadowType">In</property>
+                <child>
+                  <widget class="Gtk.TreeView" id="preferencesTree">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="ShowScrollbars">True</property>
+                    <property name="HeadersVisible">False</property>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="Resize">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.Frame" id="prefsFrame">
+                <property name="MemberName" />
+                <property name="ShadowType">In</property>
+                <property name="BorderWidth">2</property>
+                <child>
+                  <widget class="Gtk.Alignment" id="GtkAlignment2">
+                    <property name="MemberName" />
+                    <property name="Xalign">0</property>
+                    <property name="Yalign">0</property>
+                    <property name="LeftPadding">12</property>
+                    <child>
+                      <widget class="Gtk.Table" id="table1">
+                        <property name="MemberName" />
+                        <property name="NRows">3</property>
+                        <property name="NColumns">2</property>
+                        <property name="RowSpacing">6</property>
+                        <property name="ColumnSpacing">6</property>
+                        <child>
+                          <placeholder />
+                        </child>
+                        <child>
+                          <placeholder />
+                        </child>
+                        <child>
+                          <placeholder />
+                        </child>
+                        <child>
+                          <placeholder />
+                        </child>
+                        <child>
+                          <widget class="Gtk.ComboBox" id="languageList">
+                            <property name="MemberName" />
+                            <property name="IsTextCombo">True</property>
+                            <property name="Items" translatable="yes" />
+                            <signal name="Changed" handler="languageListChanged" />
+                          </widget>
+                          <packing>
+                            <property name="LeftAttach">1</property>
+                            <property name="RightAttach">2</property>
+                            <property name="AutoSize">True</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="IBBoard.GtkSharp.Translatable.TranslatableLabel" id="lblLanguage">
+                            <property name="MemberName" />
+                            <property name="LabelProp" translatable="yes">language:</property>
+                          </widget>
+                          <packing>
+                            <property name="AutoSize">True</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="Gtk.Label" id="frameLabel">
+                    <property name="MemberName" />
+                    <property name="LabelProp" translatable="yes">&lt;b&gt;language&lt;/b&gt;</property>
+                    <property name="UseMarkup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">True</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+    <child internal-child="ActionArea">
+      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+        <property name="MemberName" />
+        <property name="Spacing">10</property>
+        <property name="BorderWidth">5</property>
+        <property name="Size">2</property>
+        <property name="LayoutStyle">End</property>
+        <child>
+          <widget class="Gtk.Button" id="bttnCancel">
+            <property name="MemberName" />
+            <property name="CanDefault">True</property>
+            <property name="CanFocus">True</property>
+            <property name="UseStock">True</property>
+            <property name="Type">StockItem</property>
+            <property name="StockId">gtk-cancel</property>
+            <property name="ResponseId">-6</property>
+            <signal name="Clicked" handler="bttnCancelClicked" />
+            <property name="label">gtk-cancel</property>
+          </widget>
+          <packing>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.Button" id="bttnOkay">
+            <property name="MemberName" />
+            <property name="CanDefault">True</property>
+            <property name="CanFocus">True</property>
+            <property name="UseStock">True</property>
+            <property name="Type">StockItem</property>
+            <property name="StockId">gtk-ok</property>
+            <property name="ResponseId">-5</property>
+            <signal name="Clicked" handler="bttnOkayClicked" />
+            <property name="label">gtk-ok</property>
+          </widget>
+          <packing>
+            <property name="Position">1</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </stetic-interface>
\ No newline at end of file
--- a/translations/en.translation	Fri Dec 31 15:43:05 2010 +0000
+++ b/translations/en.translation	Sat Jan 01 20:55:07 2011 +0000
@@ -14,6 +14,7 @@
 <translation id="miExit">_Quit</translation>
 <translation id="miUndo">_Undo</translation>
 <translation id="miRedo">_Redo</translation>
+<translation id="miPreferences">_Preferences</translation>
 <translation id="miAbout">_About</translation>
 <translation id="bttnNewArmy">Create new army</translation>
 <translation id="bttnOpenArmy">Open army</translation>
@@ -45,6 +46,14 @@
 <translation id="lblArmySize">Army size:</translation>
 <translation id="bttnCreate">Create</translation>
 <translation id="frmNewArmyRaceColumn">Race</translation>
+<translation id="equipPercentageTooLarge">The current percentage ({0}%) was larger than the maximum for the equipment item ({1}%). The maximum value will be used instead.</translation>
+<translation id="equipPercentageTooLargeTitle">Equipment percentage too large</translation>
+<translation id="equipPercentageTooSmall">The current percentage ({0}%) was smaller than the minimum for the equipment item ({1}%). The minimum value will be used instead.</translation>
+<translation id="equipPercentageTooSmallTitle">Equipment percentage too small</translation>
+<translation id="equipNumberTooLarge">The current amount ({0}) was larger than the maximum for the equipment item ({1}). The maximum value will be used instead.</translation>
+<translation id="equipNumberTooLargeTitle">Equipment amount too large</translation>
+<translation id="equipNumberTooSmall">The current amount ({0}) was smaller than the minimum for the equipment item ({1}). The minimum value will be used instead.</translation>
+<translation id="equipNumberTooSmallTitle">Equipment amount too small</translation>
 <translation id="IBBoard.WarFoundry.GUI.GTK.FrmNewUnit">Add New {0} Choice</translation>
 <translation id="frmNewUnitNewUnitColumn">Unit Type</translation>
 <translation id="lblUnitType">Unit Type:</translation>
@@ -69,4 +78,31 @@
 <translation id="lblDevelopers">Developers:</translation>	
 <translation id="lblTestersCommon">Testers (General WarFoundry):</translation>
 <translation id="lblTestersGtk">Testers (GTK UI):</translation>
+<translation id="IBBoard.WarFoundry.GUI.GTK.FrmPreferences">Preferences</translation>
+<translation id="languagePrefSection">Language</translation>
+<translation id="lblLanguage">Language:</translation>
+<translation id="languagesGroup">Language</translation>
+<translation id="armyHtmlOutputBodyHeader">{0} - {1}pts</translation>
+<translation id="armyHtmlOutputTableHeaderUnitName">Name</translation>
+<translation id="armyHtmlOutputTableHeaderUnitNotes">Notes</translation>
+<translation id="armyHtmlOutputTableHeaderUnitPoints">Points</translation>
+<translation id="armyHtmlExportEquipAmountAll">all ({1})</translation>
+<translation id="armyHtmlExportEquipAmountPercentage">{0}% ({1})</translation>
+<translation id="armyHtmlExportEquipAmountNumber">{0}</translation>
+<translation id="armyHtmlExportEquipAmountRatio">{0} for {1}</translation>
+<translation id="equipmentAmountAll">all ({1})</translation>
+<translation id="equipmentAmountPercentage">{0}% ({1})</translation>
+<translation id="equipmentAmountNumber">{0}</translation>
+<translation id="setEquipmentAmountCommandDescription">Set {0} amount for {1} to {2}</translation>
+<translation id="setEquipmentAmountCommandUndoDescription">Set {0} amount for {1} to {2}</translation>
+<translation id="replaceUnitEquipmentCommandDescription">Replace {0} with {1} for {2}</translation>
+<translation id="replaceUnitEquipmentCommandUndoDescription">Replace {0} with {1} for {2}</translation>
+<translation id="createAndAddUnitCommandDescription">Add unit of {0}</translation>
+<translation id="createAndAddUnitCommandUndoDescription">Remove unit of {0}</translation>
+<translation id="removeUnitCommandDescription">Remove {0}</translation>
+<translation id="removeUnitCommandUndoDescription">Re-add {0}</translation>
+<translation id="setUnitNameCommandDescription">Rename "{0}" to "{1}"</translation>
+<translation id="setUnitNameCommandUndoDescription">Rename "{0}" to "{1}"</translation>
+<translation id="setUnitSizeCommandDescription">Set size of {0} to {1}</translation>
+<translation id="setUnitSizeCommandUndoDescription">Set size of {0} to {1}</translation>
 </translations>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/translations/fr.translation	Sat Jan 01 20:55:07 2011 +0000
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<translations xmlns="http://ibboard.co.uk/translation" lang="fr">
+	<translation id="menuFile">_Fichier</translation>
+	<translation id="menuEdit">_Édition</translation>
+	<translation id="menuHelp">_Aide</translation>
+	<translation id="miNewArmy">_Créer une armée</translation>
+	<translation id="miOpenArmy">_Ouvrir une armée</translation>
+	<translation id="miSaveArmy">_Enregistrer une armée</translation>
+	<translation id="miSaveArmyAs">Enregistrer une armée sous…</translation>
+	<translation id="miExportArmyAs">_Exporter une armée</translation>
+	<translation id="miExportArmyAsBasicHTML">HTML Basic</translation>
+	<translation id="miCloseArmy">_Fermer une armée</translation>
+	<translation id="miReloadFiles">_Recharger les fichiers</translation>
+	<translation id="miExit">_Sortir</translation>
+	<translation id="miUndo">_Annuler</translation>
+	<translation id="miRedo">_Rétablir</translation>
+	<translation id="miAbout">_À propos</translation>
+	<translation id="bttnOkay">OK</translation>
+	<translation id="bttnCancel">Annuler</translation>
+	<translation id="bttnNewArmy">Créer une armée</translation>
+	<translation id="bttnOpenArmy">Ouvrir une armée</translation>
+	<translation id="bttnSaveArmy">Sauvegarder une armée</translation>
+	<translation id="bttnUndo">Annuler</translation>
+	<translation id="bttnRedo">Rétablir</translation>
+	<translation id="ArmyTree">Arborescence de l'armée</translation>
+	<translation id="miDeleteUnit">_Supprimer une unité</translation>
+	<translation id="miEditUnit">_Éditer une unité</translation>
+	<translation id="openArmyDialog">Ouvrir une armée</translation>
+	<translation id="saveArmyDialog">Sauvegarder une armée</translation>
+	<translation id="armyFileFilter">WarFoundry Army Files (*.army)</translation>
+	<translation id="statusPanelPoints">{0} pts / {1} pts</translation>
+	<translation id="statusPanelPointsToolTip">Nombre de point d'armée actuel</translation>
+	<translation id="defaultUnitName">Unité de {0} {1}</translation>
+	<translation id="IBBoard.WarFoundry.GUI.GTK.FrmNewArmy">Créer une nouvelle armée</translation>
+	<translation id="lblGameSystem">Système de jeux :</translation>
+	<translation id="lblRaceList">Races :</translation>
+	<translation id="lblArmyName">Nom de l'armée :</translation>
+	<translation id="lblArmySize">Taille de l'armée :</translation>
+	<translation id="bttnSelectRace">Créer une armée</translation>
+	<translation id="IBBoard.WarFoundry.GUI.GTK.FrmNewUnit">Ajouter un nouveau choix {0}</translation>
+	<translation id="lblUnitList">Types d'unité :</translation>
+	<translation id="bttnSelectUnit">Créer une unité</translation>
+	<translation id="IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment">Nouvelle équipement pour unité</translation>
+	<translation id="lblAmount">Quantité :</translation>
+	<translation id="lblItem">Équipement :</translation>
+	<translation id="rbEquipAll">Tout équiper</translation>
+	<translation id="equipPercentageTooLarge">Le pourcentage actuel ({0}%) est trop important par rapport au maximum d'équipement accordé ({1}%). La valeur maximum sera utilisée à la place.</translation>
+	<translation id="equipPercentageTooLargeTitle">Le pourcentage d'équipement est trop important</translation>
+	<translation id="equipPercentageTooSmall">Le pourcentage actuel ({0}%) est trop faible par rapport au minimum d'équipement demandé ({1}%). La valeur minimum sera utilisée à la place.</translation>
+	<translation id="equipPercentageTooSmallTitle">Pourcentage d'équipement trop petit</translation>
+	<translation id="equipNumberTooLarge">La valeur en point ({0}) est trop importante par rapport au maximum d'équipement accordé ({1}). La valeur maximum sera utilisée à la place.</translation>
+	<translation id="equipNumberTooLargeTitle">Pourcentage d'équipement trop petit</translation>
+	<translation id="equipNumberTooSmall">La valeur en point ({0}) est trop faible par rapport au minimum d'équipement demandé ({1}). La valeur minimum sera utilisée à la place.</translation>
+	<translation id="equipNumberTooSmallTitle">Nombre de point d'équipement trop faible</translation>
+	<translation id="IBBoard.WarFoundry.GUI.GTK.FrmEditEquipment">Édition équipement pour unité</translation>
+	<translation id="IBBoard.WarFoundry.GUI.GTK.FrmAbout">À propos de WarFoundry</translation>
+	<translation id="lblVersion">Version : {0}</translation>
+	<translation id="lblDevelopers">Développeurs :</translation>
+	<translation id="lblThanks">Remerciement :</translation>
+	<translation id="FrmUnit">{0}</translation>
+	<translation id="lblUnitSize">Taille d'unité :</translation>
+	<translation id="lblEquip">Équipement :</translation>
+	<translation id="bttnAddWeapon">Ajouter</translation>
+	<translation id="lblAbilities">Capacités :</translation>
+	<translation id="lblNotes">Notes :</translation>
+	<translation id="bttnRemoveWeapon">Supprimer</translation>
+	<translation id="bttnReplaceWeapon">Remplacer</translation>
+	<translation id="bttnEditWeapon">Éditer</translation>
+	<translation id="equipmentAmountWithCost">{0} ({1} à {2} pts chacun)</translation>
+	<translation id="equipmentAmountWithZeroCost">{0} ({1} gratuit)</translation>
+	<translation id="equipmentChoiceAmountAll">pour ({1})</translation>
+	<translation id="equipmentChoiceAmountPercentage">pour {0}% ({1})</translation>
+	<translation id="equipmentChoiceAmountNumber">{0}</translation>
+	<translation id="InvalidRaceFileBoxTitle">Fichier de race invalide</translation>
+	<translation id="InvalidArmyFileBoxTitle">Fichier d'armée invalide</translation>
+	<translation id="SaveChangesQuestion">L'armée "{0}" a été modifiée. Sauvegarder les changements avant de fermer ?</translation>
+	<translation id="SaveChangesTitle">Changements non-sauvegardés</translation>
+	<translation id="SaveFailed">WarFoundry ne peut pas sauvegarder le fichier. Veillez vérifier le log pour plus d'informations</translation>
+	<translation id="SaveFailedTitle">Échec de la sauvegarde du fichier</translation>
+	<translation id="armyHtmlOutputBodyHeader">{0} - {1} pts</translation>
+	<translation id="armyHtmlOutputTableHeaderUnitName">Nom</translation>
+	<translation id="armyHtmlOutputTableHeaderUnitNotes">Notes</translation>
+	<translation id="armyHtmlOutputTableHeaderUnitPoints">Points</translation>
+	<translation id="armyHtmlExportEquipAmountAll">tout ({1})</translation>
+	<translation id="armyHtmlExportEquipAmountPercentage">{0}% ({1})</translation>
+	<translation id="armyHtmlExportEquipAmountNumber">{0}</translation>
+	<translation id="armyHtmlExportEquipAmountRatio">{0} pour {1}</translation>
+	<translation id="equipmentAmountAll">tout ({1})</translation>
+	<translation id="equipmentAmountPercentage">{0}% ({1})</translation>
+	<translation id="equipmentAmountNumber">{0}</translation>
+	<translation id="setEquipmentAmountCommandDescription">Fixer {0} la quantité {1} par {2}</translation>
+	<translation id="setEquipmentAmountCommandUndoDescription">Fixer {0} la quantité {1} par {2}</translation>
+	<translation id="replaceUnitEquipmentCommandDescription">Remplacer {0} de {1} par {2}</translation>
+	<translation id="replaceUnitEquipmentCommandUndoDescription">Remplacer {0} de {1} par {2}</translation>
+	<translation id="createAndAddUnitCommandDescription">Ajouter une unité de {0}</translation>
+	<translation id="createAndAddUnitCommandUndoDescription">Supprimer une unité de {0}</translation>
+	<translation id="removeUnitCommandDescription">Supprimer {0}</translation>
+	<translation id="removeUnitCommandUndoDescription">Rajouter {0}</translation>
+	<translation id="setUnitNameCommandDescription">Renommer "{0}" par "{1}"</translation>
+	<translation id="setUnitNameCommandUndoDescription">Renommer "{0}" par "{1}"</translation>
+	<translation id="setUnitSizeCommandDescription">Changer la taille de {0} par {1}</translation>
+	<translation id="setUnitSizeCommandUndoDescription">Changer la taille {0} par {1}</translation>
+	<translation id="requirementAND">{0}; et {1}</translation>
+	<translation id="requirementOR">{0}; ou {1}</translation>
+	<translation id="requirementUnitExcludes">{0} peut être sélectionné si aucun des objets suivants ne sont selectionnés : {1}</translation>
+	<translation id="requirementUnitMaxNumber">{1} peut être sélectionné {0} fois</translation>
+	<translation id="requirementUnitMinNumber">{1} doit être sélectionné au moins {0} fois</translation>
+	<translation id="requirementUnitTypeAtLeastSingle">{1} {0}</translation>
+	<translation id="requirementUnitTypeAtLeastJoiner">{0}, {1}</translation>
+	<translation id="requirementUnitTypeAtLeast">{0} peut être sélectionné seulement si l'objet suivant est sélectionné : {1}</translation>
+<!-- TODO -->
+<translation id="IBBoard.WarFoundry.GUI.GTK.FrmPreferences">Preferences</translation>
+<translation id="languagePrefSection">Language</translation>
+<translation id="lblLanguage">Language:</translation>
+<translation id="languagesGroup">Language</translation>
+<translation id="miPreferences">_Preferences</translation>
+</translations>