# HG changeset patch # User IBBoard # Date 1293639021 0 # Node ID 678e9a0392fcdf3fd2f7dc0bec55e34bf103bcac # Parent fb16ca1cb52bdd973f997a88af71e3c1d043d802 Re #308: Make GTK# UI translatable * Translate category buttons * Translate HTML export * Translate removing units diff -r fb16ca1cb52b -r 678e9a0392fc FrmMainWindow.cs --- a/FrmMainWindow.cs Tue Dec 28 20:20:16 2010 +0000 +++ b/FrmMainWindow.cs Wed Dec 29 16:10:21 2010 +0000 @@ -636,7 +636,7 @@ { ToolButton button = new ToolButton("gtk-add"); button.Label = cat.Name; - button.TooltipText = "Add unit from " + cat.Name; + button.TooltipText = Translation.GetTranslation("bttnCreateFromCat", "{0}", cat.Name); //TODO: See if we can associate data in some way, the same as we can with SWF. For now we just use the map. categoryMap.Add(button, cat); button.Clicked += new System.EventHandler(OnAddUnitActivated); @@ -1033,10 +1033,13 @@ protected virtual void OnMiExportAsBasicHtmlActivated(object sender, System.EventArgs e) { - FileChooserDialog fileDialog = new FileChooserDialog("Export army", this, FileChooserAction.Save, "Cancel", ResponseType.Cancel, "Export", ResponseType.Accept); + string exportArmyTitle = Translation.GetTranslation("exportBasicHtmlDialogTitle", "export army"); + string cancelText = Translation.GetTranslation("exportBasicHtmlCancel", "cancel"); + string exportText = Translation.GetTranslation("exportBasicHtmlExport", "export"); + FileChooserDialog fileDialog = new FileChooserDialog(exportArmyTitle, this, FileChooserAction.Save, cancelText, ResponseType.Cancel, exportText, ResponseType.Accept); FileFilter filter = new FileFilter(); filter.AddPattern("*.html"); - filter.Name = "HTML pages (*.html)"; + filter.Name = Translation.GetTranslation("exportBasicHtmlHtmlFilter", "HTML pages (*.html)"); fileDialog.AddFilter(filter); int response = fileDialog.Run(); string filePath = null; @@ -1064,7 +1067,7 @@ if (selectedItem is WFObjects.Unit) { Menu menu = new Menu(); - ImageMenuItem delete = new ImageMenuItem("Remove unit"); + ImageMenuItem delete = new ImageMenuItem(Translation.GetTranslation("menuRemoveUnit", "remove unit")); delete.Image = new Gtk.Image(Stock.Delete, IconSize.Menu); delete.Activated += new EventHandler(OnUnitDelete); delete.Data["unit"] = selectedItem; diff -r fb16ca1cb52b -r 678e9a0392fc translations/en.translation --- a/translations/en.translation Tue Dec 28 20:20:16 2010 +0000 +++ b/translations/en.translation Wed Dec 29 16:10:21 2010 +0000 @@ -22,7 +22,9 @@ Save army Undo Redo +Add unit from {0} Army Categories +Remove Unit WarFoundry Army Files (*.army) Create army Cancel @@ -40,5 +42,9 @@ Unit of {0} {1} {0} pts / {1} pts Add New {0} Choice -About WarFoundry +About WarFoundry +Export army +Cancel +Export +HTML pages (*.html) \ No newline at end of file