mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-20 18:58:16 +08:00
refactor: ♻️ 框架&业务代码分离 (#185)
Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
@ -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>
|
Reference in New Issue
Block a user