dot/scripts/gen.cs.tt
2023-12-13 18:43:53 +08:00

77 lines
2.6 KiB
Plaintext

<#@ template language="C#" #>
<#@ assembly name="System.Xml" #>
<#@ output encoding="utf-8" extension="Designer.cs" #>
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System.CodeDom.Compiler;
using System.Diagnostics.CodeAnalysis;
using System.Resources;
using System.Runtime.CompilerServices;
namespace Dot.Languages;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCode]
[System.Runtime.CompilerServices.CompilerGenerated]
public sealed class Ln
{
private static ResourceManager _resourceMan;
/// <summary>
/// Initializes a new instance of the <see cref="Ln" /> class.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public Ln() { }
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static ResourceManager ResourceManager {
get {
if (ReferenceEquals(_resourceMan, null)) {
var temp = new ResourceManager("Dot.Languages.Ln", typeof(Ln).Assembly);
_resourceMan = temp;
}
return _resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static CultureInfo Culture { get; set; }
<#
var xml = new System.Xml.XmlDocument();
xml.Load("../assets/res/Ln.resx");
foreach (System.Xml.XmlNode data in xml.SelectNodes("//root/data")!)
{
#>
/// <summary>
/// <#= data.SelectSingleNode("value")?.InnerText #>
/// </summary>
public static string <#=
data.Attributes!["name"].Value.Replace(" ", "_") #> => ResourceManager.GetString("<#= data.Attributes!["name"].Value #>", Culture);
<#
}
#>
}