Text owners should localize their text values
- Derived types should localize their own text rather than the base
This commit is contained in:
parent
96ef163ef3
commit
ffc9ade8cb
10 changed files with 22 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue