Use .Localize extension function

This commit is contained in:
John Lewin 2017-01-04 07:23:30 -08:00
parent 06af3e220e
commit ace89e1e5a
48 changed files with 193 additions and 193 deletions

View file

@ -41,8 +41,8 @@ namespace MatterHackers.MatterControl
partIsGCode = true;
}
string McExportFileTitleBeg = LocalizedString.Get("MatterControl");
string McExportFileTitleEnd = LocalizedString.Get("Export File");
string McExportFileTitleBeg = "MatterControl".Localize();
string McExportFileTitleEnd = "Export File".Localize();
string McExportFileTitleFull = string.Format("{0}: {1}", McExportFileTitleBeg, McExportFileTitleEnd);
this.Title = McExportFileTitleFull;
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl
if (!partIsGCode)
{
string exportStlText = LocalizedString.Get("Export as");
string exportStlText = "Export as".Localize();
string exportStlTextFull = string.Format("{0} STL", exportStlText);
Button exportAsStlButton = textImageButtonFactory.Generate(exportStlTextFull);
@ -104,7 +104,7 @@ namespace MatterHackers.MatterControl
if (!partIsGCode)
{
string exportAmfText = LocalizedString.Get("Export as");
string exportAmfText = "Export as".Localize();
string exportAmfTextFull = string.Format("{0} AMF", exportAmfText);
Button exportAsAmfButton = textImageButtonFactory.Generate(exportAmfTextFull);
@ -223,7 +223,7 @@ namespace MatterHackers.MatterControl
if (OsInformation.OperatingSystem == OSType.Windows
|| OsInformation.OperatingSystem == OSType.X11)
{
showInFolderAfterSave = new CheckBox(LocalizedString.Get("Show file in folder after save"), ActiveTheme.Instance.PrimaryTextColor, 10);
showInFolderAfterSave = new CheckBox("Show file in folder after save".Localize(), ActiveTheme.Instance.PrimaryTextColor, 10);
showInFolderAfterSave.HAnchor = HAnchor.ParentLeft;
showInFolderAfterSave.Cursor = Cursors.Hand;
//showInFolderAfterSave.Margin = new BorderDouble(top: 10);
@ -232,8 +232,8 @@ namespace MatterHackers.MatterControl
if (!showExportGCodeButton)
{
string noGCodeMessageTextBeg = LocalizedString.Get("Note");
string noGCodeMessageTextEnd = LocalizedString.Get("To enable GCode export, select a printer profile.");
string noGCodeMessageTextBeg = "Note".Localize();
string noGCodeMessageTextEnd = "To enable GCode export, select a printer profile.".Localize();
string noGCodeMessageTextFull = string.Format("{0}: {1}", noGCodeMessageTextBeg, noGCodeMessageTextEnd);
TextWidget noGCodeMessage = new TextWidget(noGCodeMessageTextFull, textColor: ActiveTheme.Instance.PrimaryTextColor, pointSize: 10);
noGCodeMessage.HAnchor = HAnchor.ParentLeft;

View file

@ -90,7 +90,7 @@ namespace MatterHackers.MatterControl.CreatorPlugins
public void AddElements()
{
Title = LocalizedString.Get("Design Add-ons");
Title = "Design Add-ons".Localize();
FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
topToBottom.AnchorAll();
@ -101,7 +101,7 @@ namespace MatterHackers.MatterControl.CreatorPlugins
headerRow.Margin = new BorderDouble(0, 3, 0, 0);
headerRow.Padding = new BorderDouble(0, 3, 0, 3);
{
string elementHeaderLabelBeg = LocalizedString.Get("Select a Design Tool");
string elementHeaderLabelBeg = "Select a Design Tool".Localize();
string elementHeaderLabelFull = string.Format("{0}:", elementHeaderLabelBeg);
string elementHeaderLabel = elementHeaderLabelFull;
TextWidget elementHeader = new TextWidget(string.Format(elementHeaderLabel), pointSize: 14);

View file

@ -15,8 +15,8 @@ namespace MatterHackers.MatterControl
: base(300, 500)
{
BackgroundColor = backgroundColor;
string savePartSheetTitle = LocalizedString.Get("MatterControl");
string savePartSheetTitleFull = LocalizedString.Get("Saving to Parts Sheet");
string savePartSheetTitle = "MatterControl".Localize();
string savePartSheetTitleFull = "Saving to Parts Sheet".Localize();
Title = string.Format("{0} - {1}", savePartSheetTitle, savePartSheetTitleFull);
this.totalParts = totalParts;

View file

@ -106,14 +106,14 @@ namespace MatterHackers.MatterControl
buttonBar.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
buttonBar.Padding = new BorderDouble(0, 3);
backButton = textImageButtonFactory.Generate(LocalizedString.Get("Back"), centerText: true);
backButton = textImageButtonFactory.Generate("Back".Localize(), centerText: true);
backButton.Click += new EventHandler(back_Click);
nextButton = textImageButtonFactory.Generate(LocalizedString.Get("Next"), centerText: true);
nextButton = textImageButtonFactory.Generate("Next".Localize(), centerText: true);
nextButton.Name = "Next Button";
nextButton.Click += new EventHandler(next_Click);
doneButton = textImageButtonFactory.Generate(LocalizedString.Get("Done"), centerText: true);
doneButton = textImageButtonFactory.Generate("Done".Localize(), centerText: true);
doneButton.Name = "Done Button";
doneButton.Click += done_Click;