显卡鉴定手册:8 页阅读窗口、8 种语言;外观折价进 Tuning

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Sonnet 5.5 committed 2026-11-04 18:13:08 +08:00
1 parent 6f121a6899
commit 9f93c3f3cf
15 files changed
+54 -21

No files matched your search

+6 -3
View File
@@ -1520,12 +1520,15 @@ internal static class Program
var dir = System.IO.Path.GetFullPath(System.IO.Path.Combine(AppContext.BaseDirectory, "../../../../../src/Decentralized/ModFiles/Localization"));
foreach (var lang in new[] { "zh", "en", "de", "fr", "es", "pl", "ru", "ja" })
{
var line = System.IO.File.ReadAllLines(System.IO.Path.Combine(dir, lang + ".csv")).First(l => l.StartsWith("guide.web3.text,"));
var text = line.Substring("guide.web3.text,".Length).Trim('"').Replace("\"\"", "\"");
Check(text.Contains("{"), lang + " 手册用了占位符");
foreach (var gk in new[] { "guide.web3.text", "guide.gpu.text" })
{
var line = System.IO.File.ReadAllLines(System.IO.Path.Combine(dir, lang + ".csv")).First(l => l.StartsWith(gk + ","));
var text = line.Substring(gk.Length + 1).Trim('"').Replace("\"\"", "\"");
Check(text.Contains("{"), lang + " " + gk + " 用了占位符");
var bad = TuningText.Unresolved(text);
Check(bad.Count == 0, lang + " 手册有取不到值的占位符:" + string.Join(" ", bad));
Check(!TuningText.Render(text).Contains("{"), lang + " 渲染后没有残留花括号");
}
}
Check(TuningText.Render("{BmListFee:%}") == "5%" && TuningText.Render("{PonziRates[4]:%}") == "10%" && TuningText.Render("{WalletMax}") == "5", "格式:百分比、数组下标、整数");
});