diff FrmMain.cs @ 87:4c5c8f91937a

Re #179: Make sure that translations are used throughout UI * Translate context menu on army tree * Translate warning messages in main form * Add translation strings
author IBBoard <dev@ibboard.co.uk>
date Sat, 31 Oct 2009 21:09:10 +0000
parents 0bb9f40d44eb
children 3fae39208d06
line wrap: on
line diff
--- a/FrmMain.cs	Sat Oct 31 20:57:20 2009 +0000
+++ b/FrmMain.cs	Sat Oct 31 21:09:10 2009 +0000
@@ -580,11 +580,11 @@
 					}
 					catch (RequiredDataMissingException ex)
 					{
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "Invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
 					}
 					catch (InvalidFileException ex)
 					{
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "Invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidRaceFileBoxTitle", "invalid race file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
 					}
 				}
 			}
@@ -623,13 +623,13 @@
 					catch (RequiredDataMissingException ex)
 					{
 						log.Error(ex);
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidFileBoxTitle", "Invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
 						return false;
 					}
 					catch (InvalidFileException ex)
 					{
 						log.Error(ex);
-						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidFileBoxTitle", "Invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+						MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidArmyFileBoxTitle", "invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error);
 						return false;
 					}
 				}
@@ -652,7 +652,9 @@
 
 				if (CommandStack.IsDirty())
 				{
-					DialogResult dr = MessageBox.Show(this, "The army \""+CurrentArmy.Name+"\" has been modified.\r\nSave changes before closing army?", "Unsaved changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button3);
+					string saveChanges = Translation.GetTranslation("SaveChangesQuestion", "the army \"{0}\" has been modified\r\nsave changes before closing army?", CurrentArmy.Name);
+					string saveChangesTitle = Translation.GetTranslation("SaveChangesTitle", "unsaved changes");
+					DialogResult dr = MessageBox.Show(this, saveChanges, saveChangesTitle, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button3);
 
 					if (dr == DialogResult.Yes)
 					{
@@ -749,7 +751,7 @@
 			}
 			else
 			{
-				MessageBox.Show(this, Translation.GetTranslation("SaveFailed"), Translation.GetTranslation("SaveFailedTitle"), MessageBoxButtons.OK, MessageBoxIcon.Error);
+				MessageBox.Show(this, Translation.GetTranslation("SaveFailed", "file save failed - check log for details"), Translation.GetTranslation("SaveFailedTitle", "file save failed"), MessageBoxButtons.OK, MessageBoxIcon.Error);
 				return false;
 			}
 		}