提交修改
This commit is contained in:
@@ -492,6 +492,48 @@ public static class ConfigLinkDatabase
|
||||
_tableInfoCache = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有缺少中文配置的表(displayName == name 或 description 为空)
|
||||
/// </summary>
|
||||
public static List<ConfigTableInfo> GetTablesMissingChineseConfig()
|
||||
{
|
||||
return GetAllTableInfo().Where(table =>
|
||||
string.IsNullOrEmpty(table.displayName) ||
|
||||
table.displayName.Equals(table.tableName, StringComparison.OrdinalIgnoreCase) ||
|
||||
string.IsNullOrEmpty(table.description)
|
||||
).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否存在缺少中文配置的表
|
||||
/// </summary>
|
||||
public static bool HasTablesMissingChineseConfig()
|
||||
{
|
||||
return GetTablesMissingChineseConfig().Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输出缺少中文配置的表信息到控制台
|
||||
/// </summary>
|
||||
public static void LogMissingChineseConfig()
|
||||
{
|
||||
var missingTables = GetTablesMissingChineseConfig();
|
||||
if (missingTables.Count == 0)
|
||||
{
|
||||
Debug.Log("[ConfigLinkViewer] 所有表均已配置中文名称和描述");
|
||||
return;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine($"[ConfigLinkViewer] 发现 {missingTables.Count} 个表缺少中文配置:");
|
||||
foreach (var table in missingTables)
|
||||
{
|
||||
sb.AppendLine($" - {table.tableName}: displayName='{table.displayName}', description='{table.description}'");
|
||||
}
|
||||
sb.AppendLine("建议使用智能体辅助补充中文配置。");
|
||||
Debug.Log(sb.ToString());
|
||||
}
|
||||
|
||||
private static void LoadSettings()
|
||||
{
|
||||
if (_settings != null) return;
|
||||
|
||||
Reference in New Issue
Block a user