changeset 156:d3f498514122

Fixes #283: "Confirm Remove" for equipment dialog isn't translatable * Make dialogs translatable when removing equipment through edit dialog * Add English translations
author IBBoard <dev@ibboard.co.uk>
date Mon, 31 May 2010 19:05:01 +0000
parents 67b4b84f5674
children 08271d6569fa
files FrmEditUnitEquipment.cs translations/en.translation
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/FrmEditUnitEquipment.cs	Fri May 28 19:49:34 2010 +0000
+++ b/FrmEditUnitEquipment.cs	Mon May 31 19:05:01 2010 +0000
@@ -151,12 +151,20 @@
 			{
 				if (equipItem.IsRequired)
 				{
-					MessageBox.Show(this, "This item is required and cannot be removed. It must have a quantity of at least one or be replaced by an alternative.", "Required item", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+					string requiredText = "this item is required and cannot be removed - it must exist or be replaced";
+					string requiredTitle = "required item";
+					requiredText = Translation.GetTranslation("removeRequiredEquipmentText", requiredText);
+					requiredTitle = Translation.GetTranslation("removeRequiredEquipmentTitle", requiredTitle);
+					MessageBox.Show(this, requiredText, requiredTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
 					setValue = false;
 				}
 				else
 				{
-					DialogResult dr = MessageBox.Show(this, "This will remove the item from the unit. Continue?", "Confirm remove", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
+					string removeEquipText = "remove equipment item from unit?";
+					string removeEquipTitle = "confirm removing equipment";
+					removeEquipText = Translation.GetTranslation("removeEquipmentText", removeEquipText);
+					removeEquipTitle = Translation.GetTranslation("removeEquipmentTitle", removeEquipTitle);
+					DialogResult dr = MessageBox.Show(this, removeEquipText, removeEquipTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
 
 					if (dr != DialogResult.Yes)
 					{
--- a/translations/en.translation	Fri May 28 19:49:34 2010 +0000
+++ b/translations/en.translation	Mon May 31 19:05:01 2010 +0000
@@ -54,6 +54,10 @@
 	<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="FrmEditUnitEquipment">Edit {0} for {1}</translation>
+	<translation id="removeRequiredEquipmentText">This item is required and cannot be removed. It must have a quantity of at least one or be replaced by an alternative.</translation>
+	<translation id="removeRequiredEquipmentTitle">Cannot remove required item</translation>
+	<translation id="removeEquipmentText">This will remove the item from the unit. Continue?</translation>
+	<translation id="removeEquipmentTitle">Confirm equipment removal</translation>
 	<translation id="FrmAbout">About WarFoundry</translation>
 	<translation id="lblVersion">Version: {0}</translation>
 	<translation id="lblDevelopers">Developers:</translation>