refactor: ♻️ 框架&业务代码分离 (#185)

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-11-04 12:06:50 +08:00
committed by GitHub
parent 072cc1e491
commit 13ba536df2
404 changed files with 4579 additions and 1283 deletions

View File

@ -1,6 +1,7 @@
<#@ template language="C#" #>
<#@ output encoding="utf-8" extension="resx" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<?xml version="1.0" encoding="utf-8"?>
<root>
@ -28,14 +29,11 @@
</resheader>
<#
var regex = new Regex(@"^\d", RegexOptions.Compiled);
foreach (var file in Directory.GetFiles("../assets/res/", "*.ln"))
foreach (var line in Directory.GetFiles("../assets/res/", "*.ln").SelectMany(x => File.ReadLines(x)).Distinct())
{
foreach (var line in File.ReadLines(file))
{
#>
<data name="<#= regex.IsMatch(line) ? "_" : "" #><#= line #>" xml:space="preserve"><value><#= line #></value></data>
<#
}
}
#>
</root>