Text owners should localize their text values

- Derived types should localize their own text rather than the base
This commit is contained in:
John Lewin 2017-12-04 10:39:08 -08:00
parent 96ef163ef3
commit ffc9ade8cb
10 changed files with 22 additions and 17 deletions

View file

@ -56,8 +56,13 @@ namespace MatterHackers.MatterControl
private GuiWidget mainContainer;
public DialogPage(string unlocalizedTextForCancelButton = "Cancel")
public DialogPage(string cancelButtonText = null)
{
if (cancelButtonText == null)
{
cancelButtonText = "Cancel".Localize();
}
if (!UserSettings.Instance.IsTouchScreen)
{
this.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
@ -66,7 +71,7 @@ namespace MatterHackers.MatterControl
this.AnchorAll();
cancelButton = textImageButtonFactory.Generate(unlocalizedTextForCancelButton.Localize());
cancelButton = textImageButtonFactory.Generate(cancelButtonText);
cancelButton.Name = "Cancel Wizard Button";
// Create the main container