diff --git a/docfx/articles/ltr/LTR.md b/docfx/articles/ltr/LTR.md new file mode 100644 index 00000000..fcb8b98e --- /dev/null +++ b/docfx/articles/ltr/LTR.md @@ -0,0 +1,45 @@ +# LTR - LocalizablesToResx + +LocalizablesToResx is a simple tool, which is used to acquire localized strings within `.razor` files and automatically generate `.resx` file based on these strings. This tool intends to simplify creation of .resx files from .razor files. + + +## Example + +Let's have following .razor file with localized strings +```html + +

@Localizer["Home"]

+

@Localizer["Welcome"]

+

@Localizer["This is example app"] + +``` + +We can call this script: + +`ltr -f test.razor -o test.resx` + +Following resx file will be generated: + +![example](../../images/example-resx.png) + +## Installation + +dotnet tool install AXSharp.ltr --prerelease --local + + +## Parameters + +This cli tool can be used with following parameters: + +- -i (--identifier) + - identifier which represent localizer, which is used to locate localized strings (default is `Localizer`) + - not required +- -o (--output) + - output resx file + - mandatory +- -f (--file) + - source file, where localized string are located + - not required if -d is present +- -d (--directory) + - source directory, which files are enumerated and localized string are then located + - not required if -f is present diff --git a/docfx/images/example-resx.png b/docfx/images/example-resx.png new file mode 100644 index 00000000..624cda52 Binary files /dev/null and b/docfx/images/example-resx.png differ diff --git a/src/AXSharp-L1-tests.slnf b/src/AXSharp-L1-tests.slnf index 998134dd..d040ad19 100644 --- a/src/AXSharp-L1-tests.slnf +++ b/src/AXSharp-L1-tests.slnf @@ -2,15 +2,16 @@ "solution": { "path": "AXSharp.sln", "projects": [ - "AXSharp.blazor\\tests\\sandbox\\ComponentsExamples\\ComponentsExamples.csproj", "AXSharp.blazor\\tests\\sandbox\\AXSharp.RenderableContent.Tests\\AXSharp.RenderableContent.Tests.csproj", - "AXSharp.blazor\\tests\\sandbox\\ax-blazor-example\\ix\\ax-blazor-example.csproj", - "AXSharp.compiler\\tests\\AXSharp.CompilerTests\\AXSharp.CompilerTests.csproj", + "AXSharp.blazor\\tests\\sandbox\\ComponentsExamples\\ComponentsExamples.csproj", "AXSharp.compiler\\tests\\AXSharp.Compiler.CsTests\\AXSharp.Compiler.CsTests.csproj", + "AXSharp.compiler\\tests\\AXSharp.CompilerTests\\AXSharp.CompilerTests.csproj", "AXSharp.compiler\\tests\\AXSharp.ixc.Tests\\AXSharp.ixc.Tests.csproj", "AXSharp.compiler\\tests\\AXSharp.ixr.Tests\\AXSharp.ixr.Tests.csproj", "AXSharp.connectors\\tests\\AXSharp.ConnectorLegacyTests\\AXSharp.ConnectorLegacyTests.csproj", - "AXSharp.connectors\\tests\\AXSharp.ConnectorTests\\AXSharp.ConnectorTests\\AXSharp.ConnectorTests.csproj" + "AXSharp.connectors\\tests\\AXSharp.ConnectorTests\\AXSharp.ConnectorTests\\AXSharp.ConnectorTests.csproj", + "AXSharp.tools\\tests\\AXSharp.LocalizablesToResx.Tests\\AXSharp.LocalizablesToResx.Tests.csproj", + "AXSharp.tools\\tests\\AXSharp.nuget.update.Tests\\AXSharp.nuget.update.Tests.csproj" ] } } \ No newline at end of file diff --git a/src/AXSharp-L2-tests.slnf b/src/AXSharp-L2-tests.slnf index 0c7ab5f6..c4e0ec2b 100644 --- a/src/AXSharp-L2-tests.slnf +++ b/src/AXSharp-L2-tests.slnf @@ -15,7 +15,8 @@ "AXSharp.connectors\\tests\\ax-test-project\\ix\\ax_test_project.csproj", "AXSharp.connectors\\tests\\exploring\\Webserver.Api.Exploratory\\Webserver.Api.Exploratory.csproj", "AXSharp.connectors\\tests\\exploring\\exploratory.consoleapp\\exploratory.consoleapp.csproj", - "AXSharp.tools\\tests\\AXSharp.nuget.update.Tests\\AXSharp.nuget.update.Tests.csproj" + "AXSharp.tools\\tests\\AXSharp.nuget.update.Tests\\AXSharp.nuget.update.Tests.csproj", + "AXSharp.tools\\tests\\AXSharp.LocalizablesToResx.Tests\\AXSharp.LocalizablesToResx.Tests.csproj" ] } } \ No newline at end of file diff --git a/src/AXSharp-L3-tests.slnf b/src/AXSharp-L3-tests.slnf index 28ab275e..46034f57 100644 --- a/src/AXSharp-L3-tests.slnf +++ b/src/AXSharp-L3-tests.slnf @@ -35,6 +35,7 @@ "AXSharp.templates\\working\\templates\\ixconsole\\ixconsole.twin\\ixconsole.csproj", "AXSharp.templates\\working\\templates\\ixconsole\\ixconsole\\ixconsole.app.csproj", "AXSharp.templates\\working\\templates\\ixtwin\\ixtwin.csproj", + "AXSharp.tools\\tests\\AXSharp.LocalizablesToResx.Tests\\AXSharp.LocalizablesToResx.Tests.csproj" "AXSharp.tools\\src\\AXSharp.nuget.update\\AXSharp.nuget.update.csproj", "AXSharp.tools\\tests\\AXSharp.nuget.update.Tests\\AXSharp.nuget.update.Tests.csproj", "sanbox\\integration\\ix-integration-blazor\\ix-integration-blazor.csproj", diff --git a/src/AXSharp-packable-only.slnf b/src/AXSharp-packable-only.slnf index bd684dc3..0af3b7e4 100644 --- a/src/AXSharp-packable-only.slnf +++ b/src/AXSharp-packable-only.slnf @@ -12,7 +12,8 @@ "AXSharp.compiler\\src\\ixd\\AXSharp.ixd.csproj", "AXSharp.compiler\\src\\ixr\\AXSharp.ixr.csproj", "AXSharp.connectors\\src\\AXSharp.Connector.S71500.WebAPI\\AXSharp.Connector.S71500.WebAPI.csproj", - "AXSharp.connectors\\src\\AXSharp.Connector\\AXSharp.Connector.csproj" + "AXSharp.connectors\\src\\AXSharp.Connector\\AXSharp.Connector.csproj", + "AXSharp.tools\\tests\\AXSharp.LocalizablesToResx.Tests\\AXSharp.LocalizablesToResx.Tests.csproj" ] } } \ No newline at end of file diff --git a/src/AXSharp.sln b/src/AXSharp.sln index 808fa85b..aae09ba5 100644 --- a/src/AXSharp.sln +++ b/src/AXSharp.sln @@ -124,6 +124,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ix_integration_plc", "sanbo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ax_blazor_example", "AXSharp.blazor\tests\sandbox\ax-blazor-example\ix\ax_blazor_example.csproj", "{6605983C-F5BF-4DD5-8F06-640505C0D6B0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AXSharp.LocalizablesToResx", "AXSharp.tools\src\AXSharp.LocalizablesToResx\AXSharp.LocalizablesToResx.csproj", "{CC79093E-00B6-42A6-9548-E3A88494DC27}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AXSharp.LocalizablesToResx.Tests", "AXSharp.tools\tests\AXSharp.LocalizablesToResx.Tests\AXSharp.LocalizablesToResx.Tests.csproj", "{4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -530,6 +534,30 @@ Global {6605983C-F5BF-4DD5-8F06-640505C0D6B0}.Release|x64.Build.0 = Release|Any CPU {6605983C-F5BF-4DD5-8F06-640505C0D6B0}.Release|x86.ActiveCfg = Release|Any CPU {6605983C-F5BF-4DD5-8F06-640505C0D6B0}.Release|x86.Build.0 = Release|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Debug|x64.ActiveCfg = Debug|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Debug|x64.Build.0 = Debug|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Debug|x86.ActiveCfg = Debug|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Debug|x86.Build.0 = Debug|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Release|Any CPU.Build.0 = Release|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Release|x64.ActiveCfg = Release|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Release|x64.Build.0 = Release|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Release|x86.ActiveCfg = Release|Any CPU + {CC79093E-00B6-42A6-9548-E3A88494DC27}.Release|x86.Build.0 = Release|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Debug|x64.ActiveCfg = Debug|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Debug|x64.Build.0 = Debug|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Debug|x86.ActiveCfg = Debug|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Debug|x86.Build.0 = Debug|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Release|Any CPU.Build.0 = Release|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Release|x64.ActiveCfg = Release|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Release|x64.Build.0 = Release|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Release|x86.ActiveCfg = Release|Any CPU + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -586,6 +614,8 @@ Global {22F540F6-16FC-4C4A-9360-3FAB409807C2} = {02989C66-B1D1-4E5C-A350-6C3D18D0A6BD} {60AEE1CA-8623-4950-BE53-196E00920888} = {F30D5DD0-F259-49E0-AB1B-84DD8766A37A} {6605983C-F5BF-4DD5-8F06-640505C0D6B0} = {E7FC977B-1114-4D27-8FC8-DAB3F1323D24} + {CC79093E-00B6-42A6-9548-E3A88494DC27} = {FC332118-F8B8-48DC-A7EA-AC7559CD4A98} + {4C18C927-8CD6-4ED5-80F1-91DE60D2DD07} = {FE787422-9AB3-4065-A6D9-97511EC6141C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {99D50E81-8A37-4BB9-A435-C2C98430D600} diff --git a/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/AXSharp.LocalizablesToResx.csproj b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/AXSharp.LocalizablesToResx.csproj new file mode 100644 index 00000000..71cf455c --- /dev/null +++ b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/AXSharp.LocalizablesToResx.csproj @@ -0,0 +1,60 @@ + + + + Exe + net6.0;net7.0 + enable + enable + + + + Creates Resx files from localizables in a .NET project. + True + ltr + + + https://github.com/ix-ax/ + https://github.com/ix-ax/axsharp + true + ix-ax + (c) Peter Kurhajec and Contributors + simatix-ax, PLC, industrial automation, SCADA, HMI + true + AX# compiler CLI + icon_128_128.png + git + True + snupkg + MIT + + Release notes are published here: + https://github.com/ix-ax/axsharp/releases + + NUGET-README.md + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + \ + True + + + \ + True + + + + + PreserveNewest + + + + diff --git a/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Options.cs b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Options.cs new file mode 100644 index 00000000..26168cfd --- /dev/null +++ b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Options.cs @@ -0,0 +1,20 @@ +using CommandLine; + +namespace AXSharp.LocalizablesToResx +{ + public class Options + { + [Option('f', "file", Required = false, HelpText = "Source file, from which resx will be generated.")] + public string? SourceFile { get; set; } + + [Option('d', "directory", Required = false, HelpText = "Source director, which contains files for resx gen.")] + public string? SourceDirectory { get; set; } + + [Option('i', "identifier", Required = false, HelpText = "Localizable identifier, from which regex for searching is created. If empty, default value \"Localizer\" is used.")] + public string? Identifier { get; set; } + + [Option('o', "output", Required = true, HelpText = "Required output resx file.")] + public string? OutputResx { get; set; } + + } +} diff --git a/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Program.cs b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Program.cs new file mode 100644 index 00000000..de67a560 --- /dev/null +++ b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Program.cs @@ -0,0 +1,161 @@ +// See https://aka.ms/new-console-template for more information +using AXSharp.LocalizablesToResx; +using CommandLine; +using CommandLine.Text; +using System.Resources.NetStandard; +using System.Text.RegularExpressions; + + +Parser.Default.ParseArguments(args) +.WithParsed(o => +{ + + Main(o); + +}); + + + +void Main(Options o) +{ + Console.WriteLine("** ltr (LocalizablesToResx) **"); + Console.WriteLine("Generator of resx file from source code based on localizable identifier."); + Console.WriteLine("Generating..."); + // Create a Regex + ResXGen.CreateRegex(o.Identifier); + + // Create in memory dictionary with unique localizable values + ResXGen.CreateResxDictionary(o); + + // Write dictionary into resx file + ResXGen.WriteToResx(o.OutputResx); + + Console.WriteLine($"Returned {ResXGen.count} records."); + Console.WriteLine($"Location: {o.OutputResx}"); + Console.WriteLine("Done."); + + +} + +///

+/// Main static class containing logic of acquiring localized strings and generating resx file. +/// +public static class ResXGen +{ + public static uint count; + public static Regex LocalizableRegex; + public static Dictionary ResxDictionary = new Dictionary(); + + + /// + /// Create regex based on -i argument. If argument is empty, default regex "Localizer\[.*?\]" is used. + /// + /// Identifier used in regex + public static void CreateRegex(string identifier) + { + string pattern; + if (identifier == null) + { + //use default identifier for regex + pattern = @"Localizer\[.*?\]"; + } + else + { + pattern = $@"{identifier}\[.*?\]"; + } + + LocalizableRegex = new Regex(pattern); + } + + /// + /// Creates dictionary of values acquired from input files. + /// + /// + public static void CreateResxDictionary(Options o) + { + if (o.SourceFile != null) + { + if (!File.Exists(o.SourceFile)) + { + Console.WriteLine("Source file does not exist!"); + return; + } + else + { + AddLocalizablesToDictionary(o.SourceFile); + } + } + + if (o.SourceDirectory != null) + { + if (!Directory.Exists(o.SourceDirectory)) + { + Console.WriteLine("Director does not exist!"); + return; + } + else + { + CreateResxDictionaryRecursive(o.SourceDirectory); + } + } + + } + + /// + /// Writes created dictionary of localizable values into resx file. + /// + /// Output path of resx file + public static void WriteToResx(string outputPath) + { + using (ResXResourceWriter resx = new ResXResourceWriter(outputPath)) + { + foreach (var item in ResxDictionary) + { + resx.AddResource(item.Value, item.Value); + } + } + } + + private static void CreateResxDictionaryRecursive(string sourceDir) + { + foreach (string d in Directory.GetDirectories(sourceDir)) + { + foreach (string f in Directory.GetFiles(d, "*.razor")) + { + AddLocalizablesToDictionary(f); + } + + CreateResxDictionaryRecursive(d); + } + } + + private static void AddLocalizablesToDictionary(string filePath) + { + string ln; + using (StreamReader file = new StreamReader(filePath)) + { + while ((ln = file.ReadLine()) != null) + { + MatchCollection matches = LocalizableRegex.Matches(ln); + + foreach (Match match in matches) + { + var value = match.Value; + + string[] sp = value.Split('\"'); + // get text inside [""] + if (sp.Length > 1 && ResxDictionary.TryAdd(sp[1], sp[1])) + { + count++; + } + } + + } + file.Close(); + } + } + + +} + + diff --git a/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Properties/launchSettings.json b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Properties/launchSettings.json new file mode 100644 index 00000000..f6991ecc --- /dev/null +++ b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "profiles": { + "ltr": { + "commandName": "Project", + "commandLineArgs": "-d D:\\Inxton\\ax-framework\\AXOpen\\src\\data\\src\\AXOpen.Data.Blazor -o D:\\Inxton\\ax-framework\\axsharp\\src\\AXSharp.tools\\src\\AXSharp.LocalizablesToResx\\tests\\test.resx" + }, + "ltr2": { + "commandName": "Project", + "commandLineArgs": "-f D:\\Inxton\\ax-framework\\axsharp\\src\\AXSharp.tools\\src\\AXSharp.LocalizablesToResx\\tests\\SimpleTests.razor -o D:\\Inxton\\ax-framework\\axsharp\\src\\AXSharp.tools\\src\\AXSharp.LocalizablesToResx\\tests\\test.resx" + } + + } + } diff --git a/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/tests/SimpleTests.razor b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/tests/SimpleTests.razor new file mode 100644 index 00000000..b40c49c3 --- /dev/null +++ b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/tests/SimpleTests.razor @@ -0,0 +1,3 @@ +

@Localizer["Home"]

+

@Localizer["Welcome"]

+

@Localizer["This is example app"] \ No newline at end of file diff --git a/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/tests/test.resx b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/tests/test.resx new file mode 100644 index 00000000..00ba5e56 --- /dev/null +++ b/src/AXSharp.tools/src/AXSharp.LocalizablesToResx/tests/test.resx @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Home + + + Welcome + + + This is example app + + \ No newline at end of file diff --git a/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/AXSharp.LocalizablesToResx.Tests.csproj b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/AXSharp.LocalizablesToResx.Tests.csproj new file mode 100644 index 00000000..effb21a0 --- /dev/null +++ b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/AXSharp.LocalizablesToResx.Tests.csproj @@ -0,0 +1,38 @@ + + + + net6.0;net7.0 + enable + enable + + false + true + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + diff --git a/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/GlobalUsings.cs b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/GlobalUsings.cs new file mode 100644 index 00000000..8c927eb7 --- /dev/null +++ b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/GlobalUsings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file diff --git a/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/LocalizablesToResxTests.cs b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/LocalizablesToResxTests.cs new file mode 100644 index 00000000..53486f8f --- /dev/null +++ b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/LocalizablesToResxTests.cs @@ -0,0 +1,46 @@ +using System.Reflection; + +namespace AXSharp.LocalizablesToResx.Tests +{ + public class LocalizablesToResxTests + { + + public LocalizablesToResxTests() + { + + } + + [Fact] + public void resxgen_sample_test() + { + ResXGen.count = 0; + ResXGen.ResxDictionary = new Dictionary(); + Options args = new LocalizablesToResx.Options(); + args.SourceFile = @"./input/SimpleTests.razor"; + + ResXGen.CreateRegex(null); + ResXGen.CreateResxDictionary(args); + + Assert.Equal(3.ToString(), ResXGen.count.ToString()); + + + } + + [Fact] + public void resxgen_different_identifier() + { + ResXGen.count = 0; + ResXGen.ResxDictionary = new Dictionary(); + Options args = new LocalizablesToResx.Options(); + args.SourceFile = @"./input/DifferentIdentifier.razor"; + args.Identifier = "LocalizerDiff"; + + ResXGen.CreateRegex(args.Identifier); + ResXGen.CreateResxDictionary(args); + + Assert.Equal(2.ToString(), ResXGen.count.ToString()); + + + } + } +} \ No newline at end of file diff --git a/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/input/DifferentIdentifier.razor b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/input/DifferentIdentifier.razor new file mode 100644 index 00000000..f99c4f27 --- /dev/null +++ b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/input/DifferentIdentifier.razor @@ -0,0 +1,2 @@ +@LocalizerDiff["Separator"]@LocalizerDiff["Random"] +@Localizer["Hello wordld"] \ No newline at end of file diff --git a/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/input/SimpleTests.razor b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/input/SimpleTests.razor new file mode 100644 index 00000000..0e8f8ba4 --- /dev/null +++ b/src/AXSharp.tools/tests/AXSharp.LocalizablesToResx.Tests/input/SimpleTests.razor @@ -0,0 +1,2 @@ +@Localizer["Separator"]@Localizer["Random"] +@Localizer["Hello wordld"] \ No newline at end of file diff --git a/src/sanbox/integration/ix-integration-blazor/Pages/ShadowProperties.razor b/src/sanbox/integration/ix-integration-blazor/Pages/ShadowProperties.razor index 66f9f077..7850517b 100644 --- a/src/sanbox/integration/ix-integration-blazor/Pages/ShadowProperties.razor +++ b/src/sanbox/integration/ix-integration-blazor/Pages/ShadowProperties.razor @@ -1,10 +1,8 @@ @page "/ShadowProperties" - - + Context="@Entry.Plc.all_primitives" + /> diff --git a/src/sanbox/integration/ix-integration-plc/monitor.mon b/src/sanbox/integration/ix-integration-plc/monitor.mon index f6be1580..431c0a4a 100644 --- a/src/sanbox/integration/ix-integration-plc/monitor.mon +++ b/src/sanbox/integration/ix-integration-plc/monitor.mon @@ -1,2 +1,2 @@ -weather_wrapped -all_primitives.myINT \ No newline at end of file +//weather_wrapped +all_primitives \ No newline at end of file