Browse Source

localized error message

Krzysztof Krysiński 3 months ago
parent
commit
7de0a53efc

+ 2 - 1
src/PixiEditor/Data/Localization/Languages/en.json

@@ -1035,5 +1035,6 @@
   "RESET": "Reset",
   "RESET": "Reset",
   "AUTOSAVE_OPEN_FOLDER": "Open autosave folder",
   "AUTOSAVE_OPEN_FOLDER": "Open autosave folder",
    "AUTOSAVE_OPEN_FOLDER_DESCRIPTIVE": "Open the folder where autosaves are stored",
    "AUTOSAVE_OPEN_FOLDER_DESCRIPTIVE": "Open the folder where autosaves are stored",
-  "AUTOSAVE_TOGGLE_DESCRIPTIVE": "Enable/disable autosave"
+  "AUTOSAVE_TOGGLE_DESCRIPTIVE": "Enable/disable autosave",
+  "ERROR_GRAPH": "Graph Setup produced an error. Fix it the node graph"
 }
 }

+ 2 - 1
src/PixiEditor/Views/Rendering/Scene.cs

@@ -28,6 +28,7 @@ using PixiEditor.Models.DocumentModels;
 using PixiEditor.Models.Rendering;
 using PixiEditor.Models.Rendering;
 using Drawie.Numerics;
 using Drawie.Numerics;
 using Drawie.Skia;
 using Drawie.Skia;
+using PixiEditor.Extensions.Common.Localization;
 using PixiEditor.ViewModels.Document;
 using PixiEditor.ViewModels.Document;
 using PixiEditor.Views.Overlays;
 using PixiEditor.Views.Overlays;
 using PixiEditor.Views.Overlays.Pointers;
 using PixiEditor.Views.Overlays.Pointers;
@@ -316,7 +317,7 @@ internal class Scene : Zoombox.Zoombox, ICustomHitTest
             using Font defaultSizedFont = Font.CreateDefault();
             using Font defaultSizedFont = Font.CreateDefault();
             defaultSizedFont.Size = 24;
             defaultSizedFont.Size = 24;
 
 
-            renderTexture.DrawingSurface.Canvas.DrawText("Graph Setup produced an error. Fix it the node graph", renderTexture.Size / 2f, TextAlign.Center, defaultSizedFont, paint);
+            renderTexture.DrawingSurface.Canvas.DrawText(new LocalizedString("ERROR_GRAPH"), renderTexture.Size / 2f, TextAlign.Center, defaultSizedFont, paint);
         }
         }
 
 
         DrawOverlays(renderTexture.DrawingSurface, bounds, OverlayRenderSorting.Foreground);
         DrawOverlays(renderTexture.DrawingSurface, bounds, OverlayRenderSorting.Foreground);