Add missing localizations

This commit is contained in:
John Lewin 2016-01-20 10:12:01 -08:00
parent a087e1ac2d
commit 8d6eb804c0
6 changed files with 46 additions and 13 deletions

View file

@ -28,6 +28,7 @@ either expressed or implied, of the FreeBSD Project.
*/
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.CreatorPlugins;
using MatterHackers.MatterControl.PluginSystem;
using System;
@ -44,7 +45,7 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder
public override void Initialize(GuiWidget application)
{
CreatorInformation information = new CreatorInformation(LaunchNewBrailleBuilder, "BB_32x32.png", "Braille Builder");
CreatorInformation information = new CreatorInformation(LaunchNewBrailleBuilder, "BB_32x32.png", "Braille Builder".Localize());
RegisteredCreators.Instance.RegisterLaunchFunction(information);
mainApplication = application;
@ -62,7 +63,7 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder
return "{" +
"\"Name\": \"Braille Builder\"," +
"\"UUID\": \"9F1152BA-2D9E-44FC-93FD-B55FC6FD8D9E\"," +
"\"About\": \"A Creator that allows you to type in text and have it turned into aprintable Braille extrusions.\"," +
"\"About\": \"A Creator that allows you to type in text and have it turned into a printable Braille extrusions.\"," +
"\"Developer\": \"MatterHackers, Inc.\"," +
"\"URL\": \"https://www.matterhackers.com\"" +
"}";

View file

@ -39,6 +39,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
public partial class View3DWidget
{
private static string PartsNotPrintableMessage = "Parts are not on the bed or outside the print area.\n\nWould you like to center them on the bed?".Localize();
private static string PartsNotPrintableTitle = "Parts not in print area".Localize();
private void CreateSelectionData()
{
string makingCopyLabel = LocalizedString.Get("Preparing Meshes");
@ -130,14 +133,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
AutoArrangePartsInBackground();
}
}, PartsNotPrintableMessage, PartsNotPrintableTitle, StyledMessageBox.MessageType.YES_NO, "Center on Bed", "Cancel");
}, PartsNotPrintableMessage, PartsNotPrintableTitle, StyledMessageBox.MessageType.YES_NO, "Center on Bed".Localize(), "Cancel".Localize());
});
}
}
}
}
static string PartsNotPrintableMessage = "Parts are not on the bed or outside the print area.\n\nWould you like to center them on the bed?";
static string PartsNotPrintableTitle = "Parts not in print area";
}
}

View file

@ -315,7 +315,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
if (saveButtons.Visible)
{
StyledMessageBox.ShowMessageBox(ExitEditingAndSaveIfRequired, "Would you like to save your changes before exiting the editor?", "Save Changes", StyledMessageBox.MessageType.YES_NO);
StyledMessageBox.ShowMessageBox(ExitEditingAndSaveIfRequired, "Would you like to save your changes before exiting the editor?".Localize(), "Save Changes".Localize(), StyledMessageBox.MessageType.YES_NO);
}
else
{
@ -1056,13 +1056,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
private void AddSaveAndSaveAs(FlowLayoutWidget flowToAddTo)
{
TupleList<string, Func<bool>> buttonList = new TupleList<string, Func<bool>>();
buttonList.Add("Save", () =>
buttonList.Add("Save".Localize(), () =>
{
MergeAndSavePartsToCurrentMeshFile();
return true;
});
buttonList.Add("Save As", () =>
buttonList.Add("Save As".Localize(), () =>
{
UiThread.RunOnIdle(OpenSaveAsWindow);
return true;

View file

@ -203,10 +203,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
centerPartPreviewAndControls.AnchorAll();
gcodeDisplayWidget = new GuiWidget(HAnchor.ParentLeftRight, Agg.UI.VAnchor.ParentBottomTop);
String firstProcessingMessage = "Press 'Add' to select an item.".Localize();
string firstProcessingMessage = "Press 'Add' to select an item.".Localize();
if (printItem != null)
{
firstProcessingMessage = LocalizedString.Get("Loading GCode...");
firstProcessingMessage = "Loading G-Code...".Localize();
if (Path.GetExtension(printItem.FileLocation).ToUpper() == ".GCODE")
{
gcodeDisplayWidget.AddChild(CreateGCodeViewWidget(printItem.FileLocation));
@ -894,7 +895,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
private void LoadingProgressChanged(object sender, ProgressChangedEventArgs e)
{
SetProcessingMessage(string.Format("Loading GCode {0}%...", e.ProgressPercentage));
SetProcessingMessage(string.Format("{0} {1}%...", "Loading G-Code".Localize(), e.ProgressPercentage));
}
private void CloseIfNotNull(GuiWidget widget)

View file

@ -4438,3 +4438,33 @@ Translated:Notifications
English:Application
Translated:Application
English:Firmware Updates
Translated:Firmware Updates
English:Parts are not on the bed or outside the print area.\n\nWould you like to center them on the bed?
Translated:Parts are not on the bed or outside the print area.\n\nWould you like to center them on the bed?
English:Parts not in print area
Translated:Parts not in print area
English:Center on Bed
Translated:Center on Bed
English:sign out
Translated:sign out
English:Loading G-Code...
Translated:Loading G-Code...
English:Braille Builder
Translated:Braille Builder
English:Image Converter
Translated:Image Converter
English:Text Creator
Translated:Text Creator
English:demo
Translated:demo

View file

@ -28,6 +28,7 @@ either expressed or implied, of the FreeBSD Project.
*/
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.CreatorPlugins;
using MatterHackers.MatterControl.PluginSystem;
using System;
@ -44,7 +45,7 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator
public override void Initialize(GuiWidget application)
{
CreatorInformation information = new CreatorInformation(LaunchNewTextCreator, "TC_32x32.png", "Text Creator");
CreatorInformation information = new CreatorInformation(LaunchNewTextCreator, "TC_32x32.png", "Text Creator".Localize());
RegisteredCreators.Instance.RegisterLaunchFunction(information);
mainApplication = application;
}