From c88136fb388ad0885117adf3a78ff4e096781bd8 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 30 Oct 2026 11:50:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?doc(changelog):=20=E7=99=BB=E8=AE=B0=20C425?= =?UTF-8?q?=20=E6=9C=AC=E5=9C=B0=E5=8C=96=E5=AD=98=E9=87=8F=E5=9E=83?= =?UTF-8?q?=E5=9C=BE=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linear: GFX-1159 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9439bc1af..3805c7228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,6 +112,7 @@ * MessageOperationType 完全退役(C205):删除枚举与特性第二参数、MessageProtoHelper.OperationType 注册表与 GetMessageOperationType、INetworkMessageHeader/MessageObjectHeader/MessageObject 的 OperationType 属性链与日志 OpType 字段;心跳判定统一改型为 MessageProtoHelper.IsHeartbeat(MessageType)(IHeartBeatMessage 标记派生)。包头 14 字节长度不变,第 5 字节退役为保留字节(恒 0),线上字节级兼容;对外为源码级破坏性(公共属性/方法/枚举删除) ### Removal +* 清理本地化键生命周期存量垃圾(C425,GFX-1159 / GitHub #905):删除 100 个全仓零引用 public 常量与 5 个随之清空的键类型——`Keys.Logs` 整文件(33 个 snake_case 时代 `Logs.*` 常量,含 3 个资源值为 `[TODO]`/`[待翻译]` 占位的 `Logs.UnifiedMessaging.*`)、`Keys.CodeGenerator` 整文件(5 个)、`Keys.StartUp.ApplicationSettings` / `Keys.Utility.ActorIdGenerator` / `Keys.Utility.AppSettings` 空壳(成员清零后连失真 doc 注释整类删除);其余 62 个(含 `Keys.Exceptions.cs` 同值双定义的 `Biginteger_Constructor_Overflow` 系列)散布 12 个 Keys 文件,均经名+值双扫描确认零引用,同名异值常量对保守保留。两 resx 共删 243 个键条目(`Extensions.*` 孤儿 18 键双文件 + zh 侧 `CoreExceptions.HotfixModule.*` 笔误键 9 个 + 随常量删除的 99 键 × 2 文件),清理后常量值集合与两个 resx 键集合精确一致(633==633==633);`auto_translate.py` 翻译字典同步删除 53 条因本次删键而失效的条目;`GameFrameX.Localization.csproj` 删除指向不存在文件的 `Resources\Resources.Designer.cs` Compile Update 与无效 `Localization\` Folder 项(构建产物嵌入资源名与 zh-CN 卫星程序集不变);`check_keys.py` 的多余键分支由仅打印改为非零退出并新增 `--fix` 显式放行(缺键自动补齐同样收进 `--fix`,放行时输出区分性文案),键集合漂移自此有门禁。对外破坏性:被删 public 常量/类型若被外部 NuGet 消费方直接引用将编译失败(仓内引用为零,同 C194 退役 31 键先例)。 * 删除同步 `GameDb.Close()`(C267 / GFX-907):sync-over-async(`GetAwaiter().GetResult()`)阻塞缺陷本体,全仓与消费仓零调用;异步 `GameDb.CloseAsync()` 为唯一关停入口(现含注册表卸载语义) * 删除 GameFrameX.Apps.ActorType 死枚举(C219):运行时零引用(账号 id 实际由 ActorIdGenerator.GetUniqueId() 生成),作用域机制维持 GlobalConst.ActorType* 常量现状,并在 GlobalConst 与 ComponentTypeAttribute 的 XML doc 补区间规则(<128 每实体多实例 / >128 每服单例);非破坏性——两仓成员引用已验证为零,Apps 工程不进 NuGet 发布面 From d1b0891c9b39126517c8b6f01f2c798a0d5462a7 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 30 Oct 2026 11:50:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?build(localization):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=20csproj=20=E6=8C=87=E5=90=91=E4=B8=8D=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E6=AD=BB=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除引用不存在的 Resources\Resources.Designer.cs 的 Compile Update 与目录已有实体内容时无效的 Localization\ Folder 项(resx 模板时代残留);强类型资源访问走 Keys.* 常量,构建产物嵌入资源名与 zh-CN 卫星程序集不变。 Linear: GFX-1159 --- .../GameFrameX.Localization.csproj | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/GameFrameX.Localization/GameFrameX.Localization.csproj b/GameFrameX.Localization/GameFrameX.Localization.csproj index c02fead30..1c6ef43ed 100644 --- a/GameFrameX.Localization/GameFrameX.Localization.csproj +++ b/GameFrameX.Localization/GameFrameX.Localization.csproj @@ -6,17 +6,6 @@ GameFrameX,Localization,I18N,Resources,Messages,Server,GameServer - - - True - True - Resources.resx - - - - - - From 73157d0d9fcd8817446a49060cd9f7109f49c2ad Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 30 Oct 2026 11:50:01 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix(localization):=20check=5Fkeys.py=20?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E9=94=AE=E6=94=B9=E4=B8=BA=E9=9D=9E=E9=9B=B6?= =?UTF-8?q?=E9=80=80=E5=87=BA=E9=97=A8=E7=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extra_keys 分支由仅打印改为默认非零退出,防止常量与 resx 键集合再漂移;新增 --fix 显式放行并自动补齐缺失键(默认 模式只读不写盘),放行时输出区分性文案避免误报集合一致。 Linear: GFX-1159 --- GameFrameX.Localization/check_keys.py | 60 ++++++++++++++++++++------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/GameFrameX.Localization/check_keys.py b/GameFrameX.Localization/check_keys.py index 05feace59..711d08804 100644 --- a/GameFrameX.Localization/check_keys.py +++ b/GameFrameX.Localization/check_keys.py @@ -1,11 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ -检查 Keys 类中定义的所有 key 是否在 resx 资源文件中存在 -如果不存在则自动补充 +检查 Keys 类中定义的所有 key 与 resx 资源文件的键一致性。 + +默认为校验模式:缺失或多余的 key 均视为失败并以非零退出码结束(防止键集合漂移)。 +使用 --fix 进入修复模式:自动补齐缺失的 key 到 resx(占位值),并对多余的 key 仅打印放行。 """ -import os +import argparse +import re +import sys + import re import xml.etree.ElementTree as ET from xml.dom import minidom @@ -161,8 +166,15 @@ def print_key_list(keys, limit=10): def main(): + parser = argparse.ArgumentParser( + description="检查 Keys 常量与 resx 资源文件的键一致性;默认校验模式,缺失/多余均非零退出") + parser.add_argument( + "--fix", action="store_true", + help="修复模式:自动补齐缺失的 key 到 resx(占位值),并对多余的 key 仅打印放行") + args = parser.parse_args() + print("=" * 60) - print("Keys 检查脚本 - 检查 resx 资源文件中缺失的 key") + print("Keys 检查脚本 - 检查 resx 资源文件与 Keys 常量的键一致性") print("=" * 60) print() @@ -171,6 +183,9 @@ def main(): cs_keys = extract_keys_from_cs_files() print(f" 找到 {len(cs_keys)} 个 key 定义") + exit_code = 0 + waived_extra_count = 0 + # 2. 检查每个 resx 文件 for lang, resx_path in RESX_FILES.items(): print() @@ -185,24 +200,41 @@ def main(): extra_keys = resx_keys - cs_keys if missing_keys: - print(f" 缺失 {len(missing_keys)} 个 key:") - print_key_list(missing_keys) - - # 添加缺失的 key - is_chinese = lang == "zh-CN" - added = add_keys_to_resx(resx_path, missing_keys, is_chinese) - print(f" 已添加 {added} 个缺失的 key 到 {resx_path.name}") + if args.fix: + print(f" 缺失 {len(missing_keys)} 个 key:") + print_key_list(missing_keys) + + # 添加缺失的 key + is_chinese = lang == "zh-CN" + added = add_keys_to_resx(resx_path, missing_keys, is_chinese) + print(f" 已添加 {added} 个缺失的 key 到 {resx_path.name}") + else: + print(f" [FAIL] 缺失 {len(missing_keys)} 个 key(常量已定义但 resx 未落键;用 --fix 自动补齐):") + print_key_list(missing_keys) + exit_code = 1 else: print(f" 所有 key 都存在,无需补充") if extra_keys: - print(f" 资源文件中有 {len(extra_keys)} 个多余的 key (在 C# 中未定义)") - print_key_list(extra_keys) + if args.fix: + print(f" [WARN] 资源文件中有 {len(extra_keys)} 个多余的 key (在 C# 中未定义,--fix 模式放行):") + print_key_list(extra_keys) + waived_extra_count += len(extra_keys) + else: + print(f" [FAIL] 资源文件中有 {len(extra_keys)} 个多余的 key (在 C# 中未定义,键集合漂移):") + print_key_list(extra_keys) + exit_code = 1 print() print("=" * 60) - print("检查完成!") + if exit_code == 0 and waived_extra_count == 0: + print("检查完成! 常量与两个 resx 键集合一致。") + elif exit_code == 0: + print(f"修复完成! 缺失的 key 已补齐;仍有 {waived_extra_count} 个多余的 key 待人工清理(--fix 模式放行,键集合不一致)。") + else: + print("检查失败! 存在缺失或多余的 key,退出码 1。") print("=" * 60) + sys.exit(exit_code) if __name__ == "__main__": From 91df5190c770aa4e2bf874c633f591846e4f58b6 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 30 Oct 2026 11:50:02 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix(localization):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=A0=E5=BC=95=E7=94=A8=E5=B8=B8=E9=87=8F=E4=B8=8E=E5=AD=A4?= =?UTF-8?q?=E5=84=BF=E8=B5=84=E6=BA=90=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理键生命周期无闭环管理的存量垃圾(GFX-1159 / C425): 删除 100 个全仓零引用 public 常量(名+值双扫描确认)与 5 个随之清空的键类型(Keys.Logs、Keys.CodeGenerator 整文件 及 StartUp.ApplicationSettings 等三处空壳),同步删除两 resx 共 243 个孤儿/失效键条目(Extensions.* 18 键、 CoreExceptions.HotfixModule.* 9 键及随常量删除的 99 键×2), auto_translate.py 翻译字典同步移除 53 条失效条目;清理后 常量值集合与两个 resx 键集合精确一致(633==633==633)。 BREAKING CHANGE: 被删 public 常量/键类型若被外部 NuGet 消费方直接引用将编译失败(仓内引用为零,同 C194 先例)。 Linear: GFX-1159 --- GameFrameX.Localization/Keys.Capability.cs | 27 - GameFrameX.Localization/Keys.CodeGenerator.cs | 99 ---- GameFrameX.Localization/Keys.Core.cs | 29 -- GameFrameX.Localization/Keys.Database.cs | 9 - GameFrameX.Localization/Keys.Exceptions.cs | 86 --- GameFrameX.Localization/Keys.Hotfix.cs | 30 -- GameFrameX.Localization/Keys.Launcher.cs | 119 ----- GameFrameX.Localization/Keys.Logs.cs | 361 ------------- GameFrameX.Localization/Keys.Network.cs | 20 - GameFrameX.Localization/Keys.NetworkHttp.cs | 54 -- .../Keys.NetworkMessage.cs | 19 - .../Keys.RemoteMessaging.cs | 17 - GameFrameX.Localization/Keys.StartUp.cs | 109 ---- GameFrameX.Localization/Keys.Utility.cs | 85 --- .../Localization/Messages/Resources.resx | 457 ---------------- .../Messages/Resources.zh-CN.resx | 490 ------------------ GameFrameX.Localization/auto_translate.py | 226 -------- 17 files changed, 2237 deletions(-) delete mode 100644 GameFrameX.Localization/Keys.CodeGenerator.cs delete mode 100644 GameFrameX.Localization/Keys.Logs.cs diff --git a/GameFrameX.Localization/Keys.Capability.cs b/GameFrameX.Localization/Keys.Capability.cs index 231971a58..9eddc4e38 100644 --- a/GameFrameX.Localization/Keys.Capability.cs +++ b/GameFrameX.Localization/Keys.Capability.cs @@ -93,25 +93,6 @@ public static class Hosting /// public const string FilterTargetMissing = "Capability.Hosting.FilterTargetMissing"; - /// - /// 能力 {0} 依赖的能力未装配:{1} - /// - /// - /// 键名: Capability.Hosting.RequirementMissing - /// 用途: 闭包校验发现 Requires 指向未装配能力 - /// 参数: {0} - 依赖方能力 Id;{1} - 被依赖能力 Id - /// - public const string RequirementMissing = "Capability.Hosting.RequirementMissing"; - - /// - /// 能力依赖成环,无法完成拓扑定序。 - /// - /// - /// 键名: Capability.Hosting.RequirementCycle - /// 用途: Requires 拓扑定序存在环 - /// - public const string RequirementCycle = "Capability.Hosting.RequirementCycle"; - /// /// 管理面 HTTP 管道相关消息 /// @@ -671,14 +652,6 @@ public static class Assembly /// public const string HookDuplicateDeclaration = "Capability.Hosting.HookDuplicateDeclaration"; - /// - /// 启用管理面需引用 GameFrameX.Capability.Hosting.AdminApi 并调用 UseAdminApi。 - /// - /// - /// 键名: Capability.Hosting.AdminApiPlaneFactoryMissing - /// 用途: EnableAdminApi 开启但管理面工厂程序集未被引用/注册(fail-fast) - /// - public const string AdminApiPlaneFactoryMissing = "Capability.Hosting.AdminApiPlaneFactoryMissing"; } /// diff --git a/GameFrameX.Localization/Keys.CodeGenerator.cs b/GameFrameX.Localization/Keys.CodeGenerator.cs deleted file mode 100644 index 78fec5b3a..000000000 --- a/GameFrameX.Localization/Keys.CodeGenerator.cs +++ /dev/null @@ -1,99 +0,0 @@ -// ========================================================================================== -// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利 -// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights -// 均受中华人民共和国及相关国际法律法规保护。 -// are protected by the laws of the People's Republic of China and relevant international regulations. -// 使用本项目须严格遵守相应法律法规及开源许可证之规定。 -// Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses. -// 本项目采用 Apache License 2.0 单协议分发, -// This project is licensed solely under the Apache License 2.0, -// 完整许可证文本请参见源代码根目录下的 LICENSE 文件。 -// please refer to the LICENSE file in the root directory of the source code for the full license text. -// 禁止利用本项目实施任何危害国家安全、破坏社会秩序、 -// It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order, -// 侵犯他人合法权益等法律法规所禁止的行为! -// or infringe upon the legitimate rights and interests of others, as prohibited by laws and regulations! -// 因基于本项目二次开发所产生的一切法律纠纷与责任, -// Any legal disputes and liabilities arising from secondary development based on this project -// 本项目组织与贡献者概不承担。 -// shall be borne solely by the developer; the project organization and contributors assume no responsibility. -// GitHub 仓库:https://github.com/GameFrameX -// GitHub Repository: https://github.com/GameFrameX -// Gitee 仓库:https://gitee.com/GameFrameX -// Gitee Repository: https://gitee.com/GameFrameX -// CNB 仓库:https://cnb.cool/GameFrameX -// CNB Repository: https://cnb.cool/GameFrameX -// 官方文档:https://gameframex.doc.alianblank.com/ -// Official Documentation: https://gameframex.doc.alianblank.com/ -// ========================================================================================== - - -namespace GameFrameX.Localization; - -/// -/// 本地化键常量定义 - CodeGenerator 分部类 -/// -public static partial class Keys -{ - /// - /// 代码生成器相关错误消息资源键 - /// - public static class CodeGenerator - { - /// - /// Agent生成器相关错误消息 - /// - public static class AgentGenerator - { - /// - /// 无法为标记【{0}】的函数指定超时时间 - /// - /// - /// 键名: CodeGenerator.AgentGenerator.CannotSetTimeoutForThreadSafeAttribute - /// 用途: 当尝试为线程安全函数指定超时时间时记录错误 - /// 参数: {0} - 线程安全属性名称 - /// - public const string CannotSetTimeoutForThreadSafeAttribute = "CodeGenerator.AgentGenerator.CannotSetTimeoutForThreadSafeAttribute"; - - /// - /// 【{0}】注解只能配合【{1}】或【{2}】使用 - /// - /// - /// 键名: CodeGenerator.AgentGenerator.TimeoutAttributeMustBeUsedWithApiOrDiscard - /// 用途: 当超时注解没有配合正确的注解使用时记录错误 - /// 参数: {0} - 超时属性名称, {1} - API属性名称, {2} - 丢弃属性名称 - /// - public const string TimeoutAttributeMustBeUsedWithApiOrDiscard = "CodeGenerator.AgentGenerator.TimeoutAttributeMustBeUsedWithApiOrDiscard"; - - /// - /// 非【{0}】的【{1}】接口只能是异步函数 - /// - /// - /// 键名: CodeGenerator.AgentGenerator.NonThreadSafeApiMustBeAsync - /// 用途: 当非线程安全的API接口不是异步函数时记录错误 - /// 参数: {0} - 线程安全属性名称, {1} - API属性名称 - /// - public const string NonThreadSafeApiMustBeAsync = "CodeGenerator.AgentGenerator.NonThreadSafeApiMustBeAsync"; - - /// - /// 标记了【{0}】【{1}】【{2}】注解的函数必须申明为virtual - /// - /// - /// 键名: CodeGenerator.AgentGenerator.MarkedFunctionMustBeVirtual - /// 用途: 当标记了特定注解的函数不是virtual时记录错误 - /// 参数: {0} - 异步API属性名称, {1} - 线程安全属性名称, {2} - 丢弃属性名称 - /// - public const string MarkedFunctionMustBeVirtual = "CodeGenerator.AgentGenerator.MarkedFunctionMustBeVirtual"; - - /// - /// 只有返回值为Task类型或ValueTask类型才能添加【{0}】注解 - /// - /// - /// 键名: CodeGenerator.AgentGenerator.DiscardAttributeRequiresTaskOrValueTask - /// 用途: 当非Task/ValueTask返回类型的方法使用Discard注解时记录错误 - /// 参数: {0} - 丢弃属性名称 - /// - public const string DiscardAttributeRequiresTaskOrValueTask = "CodeGenerator.AgentGenerator.DiscardAttributeRequiresTaskOrValueTask"; - } - } -} \ No newline at end of file diff --git a/GameFrameX.Localization/Keys.Core.cs b/GameFrameX.Localization/Keys.Core.cs index 0dc3b9349..e68853ec9 100644 --- a/GameFrameX.Localization/Keys.Core.cs +++ b/GameFrameX.Localization/Keys.Core.cs @@ -411,16 +411,6 @@ public static class ComponentRegister /// public const string InitializationComplete = "Core.ComponentRegister.InitializationComplete"; - /// - /// 激活全局组件:{0} {1} - /// - /// - /// 键名: Core.ComponentRegister.ActivateGlobalComponent - /// 用途: 激活全局组件时记录 - /// 参数: {0} - Actor类型, {1} - 组件类型 - /// - public const string ActivateGlobalComponent = "Core.ComponentRegister.ActivateGlobalComponent"; - /// /// ComponentRegister.ActiveGlobalComponents Actor类型:{0} , 消息: {1}未实现Agent,请检查业务代码是否正确 /// @@ -517,16 +507,6 @@ public static class StateComponent /// public const string StateSaveBack = "Core.StateComponent.StateSaveBack"; - /// - /// 保存数据异常,类型:{0},{1} - /// - /// - /// 键名: Core.StateComponent.SaveDataException - /// 用途: 保存数据异常时记录 - /// 参数: {0} - 数据类型, {1} - 异常信息 - /// - public const string SaveDataException = "Core.StateComponent.SaveDataException"; - /// /// StateComponent.SaveAllAsync 保存所有状态,耗时: {0}毫秒 /// @@ -624,15 +604,6 @@ public static class MessageHandler /// public const string ActorIdIsZero = "Core.MessageHandler.ActorIdIsZero"; - /// - /// CacheComponent is null, can not get component, close channel - /// - /// - /// 键名: Core.MessageHandler.CacheComponentIsNull - /// 用途: 当缓存组件为空时记录 - /// - public const string CacheComponentIsNull = "Core.MessageHandler.CacheComponentIsNull"; - /// /// InnerAction error: {0} {1} /// diff --git a/GameFrameX.Localization/Keys.Database.cs b/GameFrameX.Localization/Keys.Database.cs index ee439d497..97cb2e78a 100644 --- a/GameFrameX.Localization/Keys.Database.cs +++ b/GameFrameX.Localization/Keys.Database.cs @@ -116,15 +116,6 @@ public static class Database /// public const string PostgreSqlExecuteInTransactionFailed = "Database.PostgreSql.ExecuteInTransactionFailed"; - /// - /// PostgreSqlDbService 事务提交所有重试均失败,异常未知。 - /// - /// - /// 键名: Database.PostgreSql.CommitTransactionFailed - /// 用途: 事务提交重试全部失败后抛出 - /// - public const string PostgreSqlCommitTransactionFailed = "Database.PostgreSql.CommitTransactionFailed"; - /// /// PostgreSqlDbService.{0} 所有重试均失败,异常未知。 /// diff --git a/GameFrameX.Localization/Keys.Exceptions.cs b/GameFrameX.Localization/Keys.Exceptions.cs index 7750d7403..5407225a0 100644 --- a/GameFrameX.Localization/Keys.Exceptions.cs +++ b/GameFrameX.Localization/Keys.Exceptions.cs @@ -40,25 +40,6 @@ public static partial class Keys /// public static class Exceptions { - /// - /// 数据库启动失败的错误消息 - /// - /// - /// 键名: Exceptions.Database.StartFailed - /// 用途: 数据库服务启动失败时抛出此异常 - /// 参数: {0} - 数据库类型, {1} - 详细错误信息 - /// - public const string Database_Start_Failed = "Exceptions.Database.StartFailed"; - - /// - /// 处理器未初始化的错误消息 - /// - /// - /// 键名: Exceptions.Handler.NotInitialized - /// 用途: 当尝试使用未初始化的处理器时抛出此异常 - /// 参数: {0} - 处理器类型名称 - /// - public const string Handler_Not_Initialized = "Exceptions.Handler.NotInitialized"; /// /// 计时器参数无效的错误消息 @@ -70,24 +51,6 @@ public static class Exceptions /// public const string Timer_Invalid_Parameters = "Exceptions.Timer.InvalidParameters"; - /// - /// 每周计时器日期为空的错误消息 - /// - /// - /// 键名: Exceptions.Timer.Weekly.EmptyDays - /// 用途: 当创建每周计时器时未指定任何执行日期时抛出此异常 - /// - public const string Timer_Weekly_Empty_Days = "Exceptions.Timer.Weekly.EmptyDays"; - - /// - /// 计时器代码在热更新中的错误消息 - /// - /// - /// 键名: Exceptions.Timer.CodeInHotfix - /// 用途: 当尝试在热更新中使用不支持的计时器功能时抛出此异常 - /// - public const string Timer_Code_In_Hotfix = "Exceptions.Timer.CodeInHotfix"; - /// /// 组件代理映射中未找到对应条目的错误消息 /// @@ -98,55 +61,6 @@ public static class Exceptions /// public const string Component_Agent_Map_Not_Found = "Exceptions.Hotfix.ComponentAgentMapNotFound"; - /// - /// IP地址格式无效的错误消息 - /// - /// - /// 键名: Exceptions.Network.InvalidIpFormat - /// 用途: 当传入的IP地址格式不正确时抛出此异常 - /// 参数: {0} - 无效的IP地址字符串 - /// - public const string Invalid_Ip_Format = "Exceptions.Network.InvalidIpFormat"; - - /// - /// BigInteger构造函数溢出的错误消息 - /// - /// - /// 键名: Exceptions.BigInteger.ConstructorOverflow - /// 用途: 当创建BigInteger时数值溢出时抛出此异常 - /// 参数: {0} - 溢出的数值 - /// - public const string Biginteger_Constructor_Overflow = "Exceptions.BigInteger.ConstructorOverflow"; - - /// - /// BigInteger构造函数下溢的错误消息 - /// - /// - /// 键名: Exceptions.BigInteger.ConstructorUnderflow - /// 用途: 当创建BigInteger时数值下溢时抛出此异常 - /// 参数: {0} - 下溢的数值 - /// - public const string Biginteger_Constructor_Underflow = "Exceptions.BigInteger.ConstructorUnderflow"; - - /// - /// BigInteger无效字符串的错误消息 - /// - /// - /// 键名: Exceptions.BigInteger.InvalidString - /// 用途: 当使用无效字符串创建BigInteger时抛出此异常 - /// 参数: {0} - 无效的字符串 - /// - public const string Biginteger_Invalid_String = "Exceptions.BigInteger.InvalidString"; - - /// - /// BigInteger构造函数字节溢出的错误消息 - /// - /// - /// 键名: Exceptions.BigInteger.ConstructorByteOverflow - /// 用途: 当使用字节数组构造BigInteger时发生溢出时使用 - /// - public const string Biginteger_Constructor_Byte_Overflow = "Exceptions.BigInteger.ConstructorByteOverflow"; - /// /// BigInteger异常消息资源键 /// diff --git a/GameFrameX.Localization/Keys.Hotfix.cs b/GameFrameX.Localization/Keys.Hotfix.cs index c2b5b8594..8c9cdcd88 100644 --- a/GameFrameX.Localization/Keys.Hotfix.cs +++ b/GameFrameX.Localization/Keys.Hotfix.cs @@ -85,26 +85,6 @@ public static class StartUpModule /// public const string ClientDisconnected = "Hotfix.StartUp.ClientDisconnected"; - /// - /// 数据包接收心跳: {0} - /// - /// - /// 键名: Hotfix.StartUp.DataPackageReceiveHeartBeat - /// 用途: 调试开关开启时记录收到的心跳消息内容。 - /// 参数: {0} - 心跳消息格式化内容 - /// - public const string DataPackageReceiveHeartBeat = "Hotfix.StartUp.DataPackageReceiveHeartBeat"; - - /// - /// 数据包接收: {0} - /// - /// - /// 键名: Hotfix.StartUp.DataPackageReceive - /// 用途: 调试开关开启时记录收到的网络消息内容。 - /// 参数: {0} - 消息格式化内容 - /// - public const string DataPackageReceive = "Hotfix.StartUp.DataPackageReceive"; - /// /// 数据包接收: 找不到消息处理器, 消息ID: {0}, 消息类型: {1} /// @@ -115,15 +95,6 @@ public static class StartUpModule /// public const string MessageHandlerNotFound = "Hotfix.StartUp.MessageHandlerNotFound"; - /// - /// 数据包接收: 调用消息处理器出错, 消息ID: {0}, 消息类型: {1}, 异常: {2} - /// - /// - /// 键名: Hotfix.StartUp.MessageHandlerInvokeError - /// 用途: 消息处理器调用抛出异常时记录。 - /// 参数: {0} - 消息ID, {1} - 消息类型, {2} - 异常信息 - /// - public const string MessageHandlerInvokeError = "Hotfix.StartUp.MessageHandlerInvokeError"; } /// @@ -344,7 +315,6 @@ public static class Game public const string MatchBridgeException = "Hotfix.Game.MatchBridgeException"; } - /// /// Player 玩家模块消息键。 /// diff --git a/GameFrameX.Localization/Keys.Launcher.cs b/GameFrameX.Localization/Keys.Launcher.cs index 87e6a5d94..e9c82f6af 100644 --- a/GameFrameX.Localization/Keys.Launcher.cs +++ b/GameFrameX.Localization/Keys.Launcher.cs @@ -113,25 +113,6 @@ public static class Launcher /// public const string ComponentRegisterEnd = "Launcher.ComponentRegisterEnd"; - /// - /// 开始加载热更新模块... - /// - /// - /// 键名: Launcher.HotfixModuleLoadBegin - /// 用途: 记录开始加载热更新模块的日志 - /// - public const string HotfixModuleLoadBegin = "Launcher.HotfixModuleLoadBegin"; - - /// - /// 加载热更新模块结束... - /// - /// - /// 键名: Launcher.HotfixModuleLoadEnd - /// 用途: 记录热更新模块加载结束的日志 - /// - public const string HotfixModuleLoadEnd = "Launcher.HotfixModuleLoadEnd"; - - /// /// 进入游戏主循环... /// @@ -199,105 +180,5 @@ public static class Launcher /// public const string ReceiveMessage = "Launcher.ReceiveMessage"; - /// - /// 注册玩家成功:{0} {1} - /// - /// - /// 键名: Launcher.PlayerRegisterSuccess - /// 用途: 记录玩家注册成功的日志 - /// 参数: {0} - 玩家ID, {1} - 玩家信息 - /// - public const string PlayerRegisterSuccess = "Launcher.PlayerRegisterSuccess"; - - /// - /// 注销玩家成功:{0} {1} - /// - /// - /// 键名: Launcher.PlayerUnregisterSuccess - /// 用途: 记录玩家注销成功的日志 - /// 参数: {0} - 玩家ID, {1} - 玩家信息 - /// - public const string PlayerUnregisterSuccess = "Launcher.PlayerUnregisterSuccess"; - - /// - /// 注册服务成功:{0} {1} {2} - /// - /// - /// 键名: Launcher.ServiceRegisterSuccess - /// 用途: 记录服务注册成功的日志 - /// 参数: {0} - 服务器类型, {1} - 服务器名称, {2} - 注册信息 - /// - public const string ServiceRegisterSuccess = "Launcher.ServiceRegisterSuccess"; - - /// - /// 注销服务成功:{0} {1} - /// - /// - /// 键名: Launcher.ServiceUnregisterSuccess - /// 用途: 记录服务注销成功的日志 - /// 参数: {0} - 服务器ID, {1} - 服务器实例ID - /// - public const string ServiceUnregisterSuccess = "Launcher.ServiceUnregisterSuccess"; - - /// - /// 有外部服务连接到中心服务器成功。链接信息:SessionID:{0} RemoteEndPoint:{1} - /// - /// - /// 键名: Launcher.ExternalServiceConnected - /// 用途: 记录外部服务连接到中心服务器成功的日志 - /// 参数: {0} - SessionID, {1} - RemoteEndPoint - /// - public const string ExternalServiceConnected = "Launcher.ExternalServiceConnected"; - - /// - /// 有外部服务从中心服务器断开。链接信息:断开原因:{0} - /// - /// - /// 键名: Launcher.ExternalServiceDisconnected - /// 用途: 记录外部服务从中心服务器断开的日志 - /// 参数: {0} - 断开原因 - /// - public const string ExternalServiceDisconnected = "Launcher.ExternalServiceDisconnected"; - - /// - /// 玩家下线回调,通知其他服务器: {0} / Player offline callback, notify other servers: {0} - /// - /// - /// 键名: Launcher.PlayerOfflineCallback - /// 用途: 记录玩家下线时的调试信息 - /// 参数: {0} - 玩家信息的JSON序列化结果 - /// - public const string PlayerOfflineCallback = "Launcher.PlayerOfflineCallback"; - - /// - /// 玩家上线回调,通知其他服务器: {0} / Player online callback, notify other servers: {0} - /// - /// - /// 键名: Launcher.PlayerOnlineCallback - /// 用途: 记录玩家上线时的调试信息 - /// 参数: {0} - 玩家信息的JSON序列化结果 - /// - public const string PlayerOnlineCallback = "Launcher.PlayerOnlineCallback"; - - /// - /// 服务下线回调,通知其他服务器: {0} / Service offline callback, notify other servers: {0} - /// - /// - /// 键名: Launcher.ServiceOfflineCallback - /// 用途: 记录服务下线时的调试信息 - /// 参数: {0} - 服务信息 - /// - public const string ServiceOfflineCallback = "Launcher.ServiceOfflineCallback"; - - /// - /// 服务上线回调,通知其他服务器: {0} / Service online callback, notify other servers: {0} - /// - /// - /// 键名: Launcher.ServiceOnlineCallback - /// 用途: 记录服务上线时的调试信息 - /// 参数: {0} - 服务信息 - /// - public const string ServiceOnlineCallback = "Launcher.ServiceOnlineCallback"; - } } diff --git a/GameFrameX.Localization/Keys.Logs.cs b/GameFrameX.Localization/Keys.Logs.cs deleted file mode 100644 index cfb6ec1bc..000000000 --- a/GameFrameX.Localization/Keys.Logs.cs +++ /dev/null @@ -1,361 +0,0 @@ -// ========================================================================================== -// GameFrameX 组织及其衍生项目的版权、商标、专利及其他相关权利 -// GameFrameX organization and its derivative projects' copyrights, trademarks, patents, and related rights -// 均受中华人民共和国及相关国际法律法规保护。 -// are protected by the laws of the People's Republic of China and relevant international regulations. -// 使用本项目须严格遵守相应法律法规及开源许可证之规定。 -// Usage of this project must strictly comply with applicable laws, regulations, and open-source licenses. -// 本项目采用 Apache License 2.0 单协议分发, -// This project is licensed solely under the Apache License 2.0, -// 完整许可证文本请参见源代码根目录下的 LICENSE 文件。 -// please refer to the LICENSE file in the root directory of the source code for the full license text. -// 禁止利用本项目实施任何危害国家安全、破坏社会秩序、 -// It is prohibited to use this project to engage in any activities that endanger national security, disrupt social order, -// 侵犯他人合法权益等法律法规所禁止的行为! -// or infringe upon the legitimate rights and interests of others, as prohibited by laws and regulations! -// 因基于本项目二次开发所产生的一切法律纠纷与责任, -// Any legal disputes and liabilities arising from secondary development based on this project -// 本项目组织与贡献者概不承担。 -// shall be borne solely by the developer; the project organization and contributors assume no responsibility. -// GitHub 仓库:https://github.com/GameFrameX -// GitHub Repository: https://github.com/GameFrameX -// Gitee 仓库:https://gitee.com/GameFrameX -// Gitee Repository: https://gitee.com/GameFrameX -// CNB 仓库:https://cnb.cool/GameFrameX -// CNB Repository: https://cnb.cool/GameFrameX -// 官方文档:https://gameframex.doc.alianblank.com/ -// Official Documentation: https://gameframex.doc.alianblank.com/ -// ========================================================================================== - - -namespace GameFrameX.Localization; - -/// -/// 本地化键常量定义 - Logs 分部类 -/// -public static partial class Keys -{ - /// - /// 日志消息资源键 - /// - public static class Logs - { - /// - /// 服务器启动时找到配置文件的消息 - /// - /// - /// 键名: Logs.Server.Start.FindConfig - /// 用途: 服务器启动过程中成功找到配置文件时记录 - /// 参数: {0} - 配置文件路径 - /// - public const string Server_Start_Find_Config = "Logs.Server.Start.FindConfig"; - - /// - /// 服务器启动使用默认配置的消息 - /// - /// - /// 键名: Logs.Server.Start.DefaultConfig - /// 用途: 服务器启动时未找到配置文件,使用默认配置时记录 - /// - public const string Server_Start_Default_Config = "Logs.Server.Start.DefaultConfig"; - - /// - /// 服务器正在启动的消息 - /// - /// - /// 键名: Logs.Server.Starting - /// 用途: 服务器启动开始时记录 - /// 参数: {0} - 服务器名称, {1} - 版本号 - /// - public const string Server_Starting = "Logs.Server.Starting"; - - /// - /// 服务器停止时无正在运行任务的消息 - /// - /// - /// 键名: Logs.Server.Stopped.NoTasks - /// 用途: 服务器停止时确认没有正在运行的任务时记录 - /// - public const string Server_Stopped_No_Tasks = "Logs.Server.Stopped.NoTasks"; - - /// - /// 游戏服务器启动的消息 - /// - /// - /// 键名: Logs.Game.Server.Start - /// 用途: 游戏服务器启动开始时记录 - /// - public const string Game_Server_Start = "Logs.Game.Server.Start"; - - /// - /// 游戏服务器配置Actor完成的消息 - /// - /// - /// 键名: Logs.Game.Server.ConfigActor.End - /// 用途: 游戏服务器Actor系统配置完成时记录 - /// - public const string Game_Server_Config_Actor_End = "Logs.Game.Server.ConfigActor.End"; - - /// - /// 游戏服务器数据库配置完成的消息 - /// - /// - /// 键名: Logs.Game.Server.Database.End - /// 用途: 游戏服务器数据库配置完成时记录 - /// - public const string Game_Server_Database_End = "Logs.Game.Server.Database.End"; - - /// - /// 游戏服务器注册组件开始的消息 - /// - /// - /// 键名: Logs.Game.Server.RegisterComponents.Start - /// 用途: 游戏服务器开始注册组件时记录 - /// - public const string Game_Server_Register_Components_Start = "Logs.Game.Server.RegisterComponents.Start"; - - /// - /// 游戏服务器热更新完成的消息 - /// - /// - /// 键名: Logs.Game.Server.Hotfix.End - /// 用途: 游戏服务器热更新加载完成时记录 - /// - public const string Game_Server_Hotfix_End = "Logs.Game.Server.Hotfix.End"; - - /// - /// 游戏服务器主循环启动的消息 - /// - /// - /// 键名: Logs.Game.Server.MainLoop - /// 用途: 游戏服务器主循环开始运行时记录 - /// - public const string Game_Server_Main_Loop = "Logs.Game.Server.MainLoop"; - - /// - /// 游戏服务器启动完成的消息 - /// - /// - /// 键名: Logs.Game.Server.Start.Complete - /// 用途: 游戏服务器完全启动并准备好接收连接时记录 - /// - public const string Game_Server_Start_Complete = "Logs.Game.Server.Start.Complete"; - - /// - /// 游戏服务器开始退出的消息 - /// - /// - /// 键名: Logs.Game.Server.Exit.Start - /// 用途: 游戏服务器开始关闭流程时记录 - /// - public const string Game_Server_Exit_Start = "Logs.Game.Server.Exit.Start"; - - /// - /// 游戏服务器成功退出的消息 - /// - /// - /// 键名: Logs.Game.Server.Exit.Success - /// 用途: 游戏服务器完全关闭时记录 - /// - public const string Game_Server_Exit_Success = "Logs.Game.Server.Exit.Success"; - - /// - /// 数据库初始化成功的消息 - /// - /// - /// 键名: Logs.Database.Init.Success - /// 用途: 数据库连接和初始化成功时记录 - /// 参数: {0} - 数据库连接字符串, {1} - 数据库名称 - /// - public const string Database_Init_Success = "Logs.Database.Init.Success"; - - /// - /// 客户端正在连接的消息 - /// - /// - /// 键名: Logs.Client.Connecting - /// 用途: 客户端开始连接到服务器时记录 - /// 参数: {0} - 客户端ID, {1} - 服务器地址 - /// - public const string Client_Connecting = "Logs.Client.Connecting"; - - /// - /// 客户端重试连接的消息 - /// - /// - /// 键名: Logs.Client.RetryConnect - /// 用途: 客户端连接失败后准备重试时记录 - /// 参数: {0} - 客户端ID, {1} - 重试次数, {2} - 最大重试次数 - /// - public const string Client_Retry_Connect = "Logs.Client.RetryConnect"; - - /// - /// 客户端达到最大重试次数的消息 - /// - /// - /// 键名: Logs.Client.MaxRetryReached - /// 用途: 客户端连接重试次数达到上限时记录 - /// 参数: {0} - 客户端ID, {1} - 最大重试次数 - /// - public const string Client_Max_Retry_Reached = "Logs.Client.MaxRetryReached"; - - /// - /// 客户端发生错误的消息 - /// - /// - /// 键名: Logs.Client.ErrorOccurred - /// 用途: 客户端操作过程中发生错误时记录 - /// 参数: {0} - 客户端ID, {1} - 错误信息 - /// - public const string Client_Error_Occurred = "Logs.Client.ErrorOccurred"; - - /// - /// 客户端断开连接的消息 - /// - /// - /// 键名: Logs.Client.Disconnected - /// 用途: 客户端与服务器断开连接时记录 - /// 参数: {0} - 客户端ID, {1} - 断开原因 - /// - public const string Client_Disconnected = "Logs.Client.Disconnected"; - - /// - /// 客户端连接成功的消息 - /// - /// - /// 键名: Logs.Client.Connected.Success - /// 用途: 客户端成功连接到服务器时记录 - /// 参数: {0} - 客户端ID, {1} - 服务器地址 - /// - public const string Client_Connected_Success = "Logs.Client.Connected.Success"; - - /// - /// 网络客户端断开连接的消息 - /// - /// - /// 键名: Logs.Network.Client.Disconnect - /// 用途: 网络层客户端断开连接时记录 - /// 参数: {0} - 连接ID - /// - public const string Network_Client_Disconnect = "Logs.Network.Client.Disconnect"; - - /// - /// 网络客户端连接的消息 - /// - /// - /// 键名: Logs.Network.Client.Connect - /// 用途: 网络层客户端建立连接时记录 - /// 参数: {0} - 连接ID, {1} - 远程地址 - /// - public const string Network_Client_Connect = "Logs.Network.Client.Connect"; - - /// - /// 发现中心服务器异常的消息 - /// - /// - /// 键名: Logs.Discovery.Server.Exception - /// 用途: 发现中心服务器发生异常时记录 - /// 参数: {0} - 异常信息 - /// - public const string Discovery_Server_Exception = "Logs.Discovery.Server.Exception"; - - /// - /// 玩家在发现中心注册成功的消息 - /// - /// - /// 键名: Logs.Discovery.Player.Register.Success - /// 用途: 玩家成功注册到发现中心时记录 - /// 参数: {0} - 玩家ID, {1} - 服务类型 - /// - public const string Discovery_Player_Register_Success = "Logs.Discovery.Player.Register.Success"; - - /// - /// 玩家在发现中心注销成功的消息 - /// - /// - /// 键名: Logs.Discovery.Player.Unregister.Success - /// 用途: 玩家成功从发现中心注销时记录 - /// 参数: {0} - 玩家ID - /// - public const string Discovery_Player_Unregister_Success = "Logs.Discovery.Player.Unregister.Success"; - - /// - /// 服务在发现中心注册成功的消息 - /// - /// - /// 键名: Logs.Discovery.Service.Register.Success - /// 用途: 服务成功注册到发现中心时记录 - /// 参数: {0} - 服务ID, {1} - 服务类型 - /// - public const string Discovery_Service_Register_Success = "Logs.Discovery.Service.Register.Success"; - - /// - /// 服务在发现中心注销成功的消息 - /// - /// - /// 键名: Logs.Discovery.Service.Unregister.Success - /// 用途: 服务成功从发现中心注销时记录 - /// 参数: {0} - 服务ID - /// - public const string Discovery_Service_Unregister_Success = "Logs.Discovery.Service.Unregister.Success"; - - /// - /// 连接外部服务的消息 - /// - /// - /// 键名: Logs.Discovery.ExternalService.Connect - /// 用途: 成功连接到外部服务时记录 - /// 参数: {0} - 服务地址, {1} - 服务类型 - /// - public const string Discovery_External_Service_Connect = "Logs.Discovery.ExternalService.Connect"; - - /// - /// 断开外部服务连接的消息 - /// - /// - /// 键名: Logs.Discovery.ExternalService.Disconnect - /// 用途: 与外部服务断开连接时记录 - /// 参数: {0} - 服务地址, {1} - 断开原因 - /// - public const string Discovery_External_Service_Disconnect = "Logs.Discovery.ExternalService.Disconnect"; - - /// - /// 控制台警告消息 - /// - /// - /// 键名: Logs.Warning.ConsoleMessage - /// 用途: 向控制台输出警告信息时使用 - /// 参数: {0} - 警告消息内容 - /// - public const string Warning_Console_Message = "Logs.Warning.ConsoleMessage"; - - /// - /// 统一消息发送器初始化完成 - /// - /// - /// 键名: Logs.UnifiedMessaging.Initialized - /// 用途: 统一消息发送器初始化完成时记录 - /// - public const string UnifiedMessaging_Initialized = "Logs.UnifiedMessaging.Initialized"; - - /// - /// 统一消息发送器玩家消息投递结果: targetType:{0} playerId:{1} status:{2} elapsedMs:{3} traceId:{4} - /// - /// - /// 键名: Logs.UnifiedMessaging.PlayerSendResult - /// 用途: 玩家消息投递完成后记录 - /// 参数: {0} - 目标类型, {1} - 玩家ID, {2} - 状态, {3} - 耗时, {4} - 追踪ID - /// - public const string UnifiedMessaging_PlayerSendResult = "Logs.UnifiedMessaging.PlayerSendResult"; - - /// - /// 统一消息发送器系统消息发送结果: serviceName:{0} statusCode:{1} elapsedMs:{2} traceId:{3} instance:{4} - /// - /// - /// 键名: Logs.UnifiedMessaging.ServerSendResult - /// 用途: 系统消息发送完成后记录 - /// 参数: {0} - 服务名, {1} - 状态码, {2} - 耗时, {3} - 追踪ID, {4} - 实例 - /// - public const string UnifiedMessaging_ServerSendResult = "Logs.UnifiedMessaging.ServerSendResult"; - } -} \ No newline at end of file diff --git a/GameFrameX.Localization/Keys.Network.cs b/GameFrameX.Localization/Keys.Network.cs index 68634c697..572b0581d 100644 --- a/GameFrameX.Localization/Keys.Network.cs +++ b/GameFrameX.Localization/Keys.Network.cs @@ -109,26 +109,6 @@ public static class Network /// public const string FailedToCreateObjectPool = "Network.FailedToCreateObjectPool"; - /// - /// RPC call timeout! Message is: {0} / RPC调用超时!消息为:{0} - /// - /// - /// 键名: Network.RpcCallTimeout - /// 用途: 当RPC调用超时时记录错误 - /// 参数: {0} - 消息内容 - /// - public const string RpcCallTimeout = "Network.RpcCallTimeout"; - - /// - /// If the message object is encoded abnormally, check the error log, exception: {0} / 如果消息对象编码异常,请检查错误日志,异常:{0} - /// - /// - /// 键名: Network.MessageEncodingError - /// 用途: 当消息对象编码异常时记录错误 - /// 参数: {0} - 异常消息 - /// - public const string MessageEncodingError = "Network.MessageEncodingError"; - /// /// Session type '{0}' can not be cast to '{1}' / 会话类型 '{0}' 无法转换为 '{1}' /// diff --git a/GameFrameX.Localization/Keys.NetworkHttp.cs b/GameFrameX.Localization/Keys.NetworkHttp.cs index aa721d548..003521c15 100644 --- a/GameFrameX.Localization/Keys.NetworkHttp.cs +++ b/GameFrameX.Localization/Keys.NetworkHttp.cs @@ -196,60 +196,6 @@ public static class NetworkHttp /// public const string DataVerificationFailed = "Network.Http.DataVerificationFailed"; - /// - /// 请求参数 - /// - /// - /// 键名: Network.Http.SwaggerRequestParameters - /// 用途: Swagger文档中的请求参数描述 - /// - public const string SwaggerRequestParameters = "Network.Http.SwaggerRequestParameters"; - - /// - /// 响应状态码 - /// - /// - /// 键名: Network.Http.SwaggerResponseStatusCode - /// 用途: Swagger文档中的响应状态码描述 - /// - public const string SwaggerResponseStatusCode = "Network.Http.SwaggerResponseStatusCode"; - - /// - /// 响应消息 - /// - /// - /// 键名: Network.Http.SwaggerResponseMessage - /// 用途: Swagger文档中的响应消息描述 - /// - public const string SwaggerResponseMessage = "Network.Http.SwaggerResponseMessage"; - - /// - /// 成功响应 - /// - /// - /// 键名: Network.Http.SwaggerSuccessResponse - /// 用途: Swagger文档中的成功响应描述 - /// - public const string SwaggerSuccessResponse = "Network.Http.SwaggerSuccessResponse"; - - /// - /// application/json - /// - /// - /// 键名: Network.Http.ApplicationJsonContentType - /// 用途: application/json内容类型 - /// - public const string ApplicationJsonContentType = "Network.Http.ApplicationJsonContentType"; - - /// - /// application/x-protobuf - /// - /// - /// 键名: Network.Http.ApplicationProtoBufContentType - /// 用途: application/x-protobuf内容类型 - /// - public const string ApplicationProtoBufContentType = "Network.Http.ApplicationProtoBufContentType"; - /// /// http命令未包含验证参数{0} 和 {1} /// diff --git a/GameFrameX.Localization/Keys.NetworkMessage.cs b/GameFrameX.Localization/Keys.NetworkMessage.cs index c78d67af1..4f2603800 100644 --- a/GameFrameX.Localization/Keys.NetworkMessage.cs +++ b/GameFrameX.Localization/Keys.NetworkMessage.cs @@ -50,25 +50,6 @@ public static class NetworkMessage /// public const string MessageDecodeFatalError = "Network.Message.MessageDecodeFatalError"; - /// - /// 消息编码异常的错误消息 - /// - /// - /// 键名: Network.Message.MessageEncodeError - /// 用途: 当消息对象编码异常时记录错误信息 - /// - public const string MessageEncodeError = "Network.Message.MessageEncodeError"; - - /// - /// 消息编码异常详情的错误消息 - /// - /// - /// 键名: Network.Message.MessageEncodeException - /// 用途: 当消息编码过程中发生异常时记录详细信息 - /// 参数: {0} - 异常信息 - /// - public const string MessageEncodeException = "Network.Message.MessageEncodeException"; - /// /// 消息对象为空的错误消息 /// diff --git a/GameFrameX.Localization/Keys.RemoteMessaging.cs b/GameFrameX.Localization/Keys.RemoteMessaging.cs index 316b70a63..80b94e560 100644 --- a/GameFrameX.Localization/Keys.RemoteMessaging.cs +++ b/GameFrameX.Localization/Keys.RemoteMessaging.cs @@ -313,14 +313,6 @@ public static class ClientModule /// public const string ReceivePumpFaulted = "RemoteMessaging.Client.ReceivePumpFaulted"; - /// - /// 连接接收泵遭遇未分类异常(不吞掉,记录后向上抛出) - /// - /// - /// 键名: RemoteMessaging.Client.ReceivePumpFatalError - /// 用途: 连接接收泵遭遇连接级/解码级之外的异常(如 OOM)时记录后重抛的错误日志 - /// - public const string ReceivePumpFatalError = "RemoteMessaging.Client.ReceivePumpFatalError"; } /// @@ -482,15 +474,6 @@ public static class Routing /// public const string RoleNoActiveInstance = "RemoteMessaging.Routing.RoleNoActiveInstance"; - /// - /// 时间窗必须为正数 - /// - /// - /// 键名: RemoteMessaging.Routing.WindowMustBePositive - /// 用途: 当单飞去重时间窗不为正数时抛出 - /// - public const string WindowMustBePositive = "RemoteMessaging.Routing.WindowMustBePositive"; - /// /// RoleRouterHolder 尚未初始化;请在路由前于启动阶段调用 RoleRouterHolder.Initialize /// diff --git a/GameFrameX.Localization/Keys.StartUp.cs b/GameFrameX.Localization/Keys.StartUp.cs index 3a4699eba..599982278 100644 --- a/GameFrameX.Localization/Keys.StartUp.cs +++ b/GameFrameX.Localization/Keys.StartUp.cs @@ -80,16 +80,6 @@ public static class StartUp /// public const string InvalidLauncherArguments = "StartUp.InvalidLauncherArguments"; - /// - /// Finding the boot configuration for the corresponding server type in the configuration file will be configured to boot=>{0} - /// - /// - /// 键名: StartUp.FindingConfigurationForServerType - /// 用途: 当在配置文件中找到对应服务器类型的启动配置时记录 - /// 参数: {0} - 服务器类型 - /// - public const string FindingConfigurationForServerType = "StartUp.FindingConfigurationForServerType"; - /// /// If no startup configuration is found for the server type, it will start with the default configuration=>{0} /// @@ -328,15 +318,6 @@ public static class HttpServer /// public const string ApiContactName = "StartUp.HttpServer.ApiContactName"; - /// - /// HTTP - /// - /// - /// 键名: StartUp.HttpServer.OpenTelemetryServiceType - /// 用途: OpenTelemetry服务类型 - /// - public const string OpenTelemetryServiceType = "StartUp.HttpServer.OpenTelemetryServiceType"; - /// /// HTTP服务器启动完成 - 端口: {0} /// @@ -388,39 +369,6 @@ public static class HttpServer public const string HttpRequestError = "StartUp.HttpServer.HttpRequestError"; } - /// - /// 应用程序配置相关消息 - /// - public static class ApplicationSettings - { - /// - /// Configs/app_config.json - /// - /// - /// 键名: StartUp.ApplicationSettings.ConfigFilePath - /// 用途: 应用程序配置文件路径 - /// - public const string ConfigFilePath = "StartUp.ApplicationSettings.ConfigFilePath"; - - /// - /// _ - /// - /// - /// 键名: StartUp.ApplicationSettings.LogTypeSeparator - /// 用途: 日志类型分隔符 - /// - public const string LogTypeSeparator = "StartUp.ApplicationSettings.LogTypeSeparator"; - - /// - /// [Warning] {0} - /// - /// - /// 键名: StartUp.ApplicationSettings.WarningMessage - /// 用途: 警告消息格式 - /// 参数: {0} - 警告消息内容 - /// - public const string WarningMessage = "StartUp.ApplicationSettings.WarningMessage"; - } /// /// TCP服务器相关消息 @@ -677,63 +625,6 @@ public static class HealthCheck /// public const string EndpointEnabled = "StartUp.HealthCheck.EndpointEnabled"; - /// - /// - detailed health checks: http://{0}:{1}{2} - /// - /// - /// 键名: StartUp.HealthCheck.DetailedEndpointUrl - /// 用途: 显示详细健康检查端点URL时记录 - /// 参数: {0} - IP地址, {1} - 端口号, {2} - 路径 - /// - public const string DetailedEndpointUrl = "StartUp.HealthCheck.DetailedEndpointUrl"; - - /// - /// - simple health check: http://{0}:{1}{2} - /// - /// - /// 键名: StartUp.HealthCheck.SimpleEndpointUrl - /// 用途: 显示简单健康检查端点URL时记录 - /// 参数: {0} - IP地址, {1} - 端口号, {2} - 路径 - /// - public const string SimpleEndpointUrl = "StartUp.HealthCheck.SimpleEndpointUrl"; - - /// - /// - OpenTelemetry check: http://{0}:{1}{2} - /// - /// - /// 键名: StartUp.HealthCheck.OpenTelemetryEndpointUrl - /// 用途: 显示OpenTelemetry检查端点URL时记录 - /// 参数: {0} - IP地址, {1} - 端口号, {2} - 路径 - /// - public const string OpenTelemetryEndpointUrl = "StartUp.HealthCheck.OpenTelemetryEndpointUrl"; - - /// - /// 应用程序运行正常 - /// - /// - /// 键名: StartUp.HealthCheck.ApplicationWorkingFine - /// 用途: 健康检查返回成功状态时的消息 - /// - public const string ApplicationWorkingFine = "StartUp.HealthCheck.ApplicationWorkingFine"; - - /// - /// OpenTelemetry the configuration is normal - /// - /// - /// 键名: StartUp.HealthCheck.OpenTelemetryConfigurationNormal - /// 用途: OpenTelemetry健康检查返回成功状态时的消息 - /// - public const string OpenTelemetryConfigurationNormal = "StartUp.HealthCheck.OpenTelemetryConfigurationNormal"; - - /// - /// OpenTelemetry is configured normally - /// - /// - /// 键名: StartUp.HealthCheck.OpenTelemetryConfiguredNormally - /// 用途: OpenTelemetry健康检查端点返回的配置正常消息 - /// - public const string OpenTelemetryConfiguredNormally = "StartUp.HealthCheck.OpenTelemetryConfiguredNormally"; - /// /// OK /// diff --git a/GameFrameX.Localization/Keys.Utility.cs b/GameFrameX.Localization/Keys.Utility.cs index b69c44ded..0680e3775 100644 --- a/GameFrameX.Localization/Keys.Utility.cs +++ b/GameFrameX.Localization/Keys.Utility.cs @@ -66,16 +66,6 @@ public static class ExceptionMessages /// public const string ActorIdLessThanMinServerIdDetail = "Utility.Exceptions.ActorIdLessThanMinServerIdDetail"; - /// - /// 输入为全局ID的错误消息 - /// - /// - /// 键名: Utility.Exceptions.InputIsGlobalId - /// 用途: 当尝试对全局ID执行不允许的操作时使用 - /// 参数: {0} - 全局ID值 - /// - public const string InputIsGlobalId = "Utility.Exceptions.InputIsGlobalId"; - /// /// Actor类型错误的错误消息 /// @@ -259,15 +249,6 @@ public static class ExceptionMessages /// public const string ConstructorInvalidString = "Utility.Exceptions.ConstructorInvalidString"; - /// - /// 时间戳超出范围的错误消息 - /// - /// - /// 键名: Utility.Exceptions.TimestampOutOfRange - /// 用途: 当传入的时间戳无法转换为有效的DateTime时使用 - /// - public const string TimestampOutOfRange = "Utility.Exceptions.TimestampOutOfRange"; - /// /// 系统时钟回退的错误消息 /// @@ -278,26 +259,6 @@ public static class ExceptionMessages /// public const string ClockMovedBackwards = "Utility.Exceptions.ClockMovedBackwards"; - /// - /// Worker ID 超出范围的错误消息 - /// - /// - /// 键名: Utility.Exceptions.WorkerIdOutOfRange - /// 用途: 当创建IdWorker时传入的WorkerId超出有效范围时使用 - /// 参数: {0} - 最大允许的WorkerId值 - /// - public const string WorkerIdOutOfRange = "Utility.Exceptions.WorkerIdOutOfRange"; - - /// - /// Datacenter ID 超出范围的错误消息 - /// - /// - /// 键名: Utility.Exceptions.DatacenterIdOutOfRange - /// 用途: 当创建IdWorker时传入的DatacenterId超出有效范围时使用 - /// 参数: {0} - 最大允许的DatacenterId值 - /// - public const string DatacenterIdOutOfRange = "Utility.Exceptions.DatacenterIdOutOfRange"; - /// /// 传递给 Ln 的值为非正数的错误消息 /// @@ -398,21 +359,6 @@ public static class RandomHelper public const string CantRepeatRandomArgError = "Utility.RandomHelper.CantRepeatRandomArgError"; } - /// - /// ActorId生成器相关错误消息资源键 - /// - public static class ActorIdGenerator - { - /// - /// 输入为全局ID的错误消息 - /// - /// - /// 键名: Utility.ActorIdGenerator.InputIsGlobalId - /// 用途: 当尝试对全局ID执行不允许的操作时使用 - /// 参数: {0} - 全局ID值 - /// - public const string InputIsGlobalId = "Utility.ActorIdGenerator.InputIsGlobalId"; - } /// /// BigInteger调试相关日志消息资源键 @@ -540,20 +486,6 @@ public static class BigIntegerDebug public const string DataLength = "Utility.BigIntegerDebug.DataLength"; } - /// - /// 应用设置相关消息资源键 - /// - public static class AppSettings - { - /// - /// 设置应用程序运行状态为false的消息 - /// - /// - /// 键名: Utility.AppSettings.SetAppRunningFalse - /// 用途: 当应用程序运行状态设置为false时记录日志 - /// - public const string SetAppRunningFalse = "Utility.AppSettings.SetAppRunningFalse"; - } /// /// 全局设置相关消息资源键 @@ -578,15 +510,6 @@ public static class GlobalSettings /// public const string LoadGlobalSettingsFailed = "Utility.GlobalSettings.LoadGlobalSettingsFailed"; - /// - /// 设置已存在无法重复设置的警告消息 - /// - /// - /// 键名: Utility.GlobalSettings.SettingAlreadyExists - /// 用途: 当尝试重复设置已存在的配置时记录警告 - /// - public const string SettingAlreadyExists = "Utility.GlobalSettings.SettingAlreadyExists"; - /// /// 设置SaveDataInterval过小的完整警告日志 /// @@ -705,14 +628,6 @@ public static class CompressionHelper /// public static class Settings { - /// - /// 应用程序已退出,不能再次开启的错误消息 - /// - /// - /// 键名: Utility.Settings.AppAlreadyExited - /// 用途: 当尝试开启已经退出的应用程序时记录 - /// - public const string AppAlreadyExited = "Utility.Settings.AppAlreadyExited"; /// /// 加载配置文件失败的错误消息 diff --git a/GameFrameX.Localization/Localization/Messages/Resources.resx b/GameFrameX.Localization/Localization/Messages/Resources.resx index 9eb57f403..d0f46bc6a 100644 --- a/GameFrameX.Localization/Localization/Messages/Resources.resx +++ b/GameFrameX.Localization/Localization/Messages/Resources.resx @@ -1,82 +1,5 @@ - - - Offset and count exceed buffer length. Buffer length: {0}, offset: {1}, count: {2}. - - - - Index and count exceed buffer length. Buffer length: {0}, index: {1}, count: {2}. - - - - Buffer write position out of range. Buffer length: {0}, write position: {1}. - - - - String length exceeds maximum value. Actual length: {0}, maximum length: {1}. - - - - Byte array lengths must be equal. First array length: {0}, second array length: {1}. - - - - List cannot be empty. - - - - Target type must be an interface type. Target type: {0}. - - - - Object type mismatch. Object type: {0}, target type: {1}. - - - - - Collection processing completed. Collection type: {0}, element count: {1}. - - - - Byte conversion completed. Source format: {0}, target format: {1}, byte count: {2}. - - - - Type conversion completed. Source type: {0}, target type: {1}. - - - - - {0} extensions module initialized successfully. - - - - Buffer operation completed successfully. Operation type: {0}, byte count: {1}. - - - - - Parameter cannot be null. Parameter name: {0}. - - - - Value exceeds allowed range. Value: {0}, minimum value: {1}, maximum value: {2}. - - - - Type validation failed. Actual type: {0}, expected type: {1}. - - - - - Operation execution time. Operation name: {0}, execution time: {1} ms. - - - - Memory usage. Operation name: {0}, memory usage: {1} bytes. - - actorId is less than min server id @@ -208,19 +131,9 @@ Sensitive word initialization completed in {0}ms, active count: {1} - - - AppRunning has already been set to exit, cannot be enabled again... - Fatal exception occurred during message decoding: {0} - - - Message object encoding exception, please check error logs - - - Message encoding exception: {0} Message object is null, encoding exception @@ -280,24 +193,6 @@ data verification failed - - - Request Parameters - - - Response Status Code - - - Response Message - - - Success Response - - - application/json - - - application/x-protobuf http command missing validation parameters {0} and {1} @@ -352,14 +247,6 @@ Failed to create object pool for type {0} - - RPC call timeout! Message is: {0} - - - - If the message object is encoded abnormally, check the error log, exception: {0} - - Starting server {0} @@ -384,12 +271,6 @@ Component registration completed... - - - Starting hotfix module loading... - - - Hotfix module loading completed... Entering game main loop... @@ -412,41 +293,6 @@ ---Received[{0} To {1}] {2} - - Player registration successful: {0} {1} - - - Player unregistration successful: {0} {1} - - - Service registration successful: {0} {1} {2} - - - Service unregistration successful: {0} {1} - - - External service connected to discovery center successfully. Connection info: SessionID:{0} RemoteEndPoint:{1} - - - External service disconnected from discovery center. Connection info: Disconnect reason:{0} - - - - Player offline callback, notify other servers: {0} - - - - Player online callback, notify other servers: {0} - - - - Service offline callback, notify other servers: {0} - - - - Service online callback, notify other servers: {0} - - Server type: {0} stopped! Termination reason: {1} Configuration: {2} @@ -636,19 +482,11 @@ initialize component registration complete - - Activate global component: {0} {1} - - [StateComp] state save back {0} count:{1} - - Save data exception, type:{0}, {1} - - Message handler:{0},UniqueId:{1} execution duration: {2} ms @@ -662,10 +500,6 @@ ActorId is 0, can not get component,{0}, close channel - - CacheComponent is null, can not get component, close channel - - InnerAction error: {0} {1} @@ -781,37 +615,11 @@ - - - {0}.{1} cannot specify timeout for function marked with [{2}] - - - - {0}.{1} [{2}] attribute can only be used with [{3}] or [{4}] - - - - {0}.{1}, non-[{2}] [{3}] interface can only be async function - - - - {0}.{1} function marked with [{2}][{3}][{4}] attribute must be declared as virtual - - - - {0}.{1} only functions with Task or ValueTask return type can add [{2}] attribute - - Cannot repeat random argument error, requested count: {0} is greater than ID count: {1} - - - Input is a global ID: {0} - - a = {0} @@ -862,193 +670,15 @@ Data length: {0} - - - Set AppRunning false... - - - - - The current setting already exists, cannot be set again, and this setting has been ignored. - - BigInteger constructor byte overflow. - - BigInteger constructor overflow. Value: {0}. - - - - BigInteger constructor underflow. Value: {0}. - - - - BigInteger invalid string. String: {0}. - - - - Database start failed. Database type: {0}, error: {1}. - - - - Handler not initialized. Handler type: {0}. - - - - Invalid IP address format. IP: {0}. - - - - Timer code cannot be used in hotfix assembly. - - Timer invalid parameters. Parameter: {0}, value: {1}. - - Weekly timer execution days cannot be empty. - - - - Client connected successfully. Server: {0}. - - - - Connecting to server. Server: {0}. - - - - Client disconnected. Server: {0}. - - - - Client error occurred. Error: {0}. - - - - Maximum retry count reached. Max retries: {0}. - - - - Retrying connection. Attempt: {0}, max: {1}. - - - - Database initialized successfully. Connection string: {0}, database name: {1}. - - - - External service connected. Service: {0}. - - - - External service disconnected. Service: {0}. - - - - Player registered successfully. Player ID: {0}. - - - - Player unregistered successfully. Player ID: {0}. - - - - Discovery server exception. Error: {0}. - - - - Service registered successfully. Service: {0}. - - - - Service unregistered successfully. Service: {0}. - - - - Game server config actor initialization completed. - - - - Game server database initialization completed. - - - - Game server starting shutdown process. - - - - Game server shutdown completed. - - - - Game server hotfix initialization completed. - - - - Game server main loop started. - - - - Game server starting component registration. - - - - Game server starting. Server ID: {0}. - - - - Game server startup completed. Server ID: {0}. - - - - Network client connected. Remote endpoint: {0}. - - - - Network client disconnected. Remote endpoint: {0}. - - - - Using default configuration for server startup. - - - - Finding configuration for server type: {0}. - - - - Server starting. Server type: {0}. - - - - Server stopped. No running tasks. - - - - Warning: {0}. - - - - Configuration file path: {0}. - - - - Log type separator: {0}. - - - - Warning: {0}. - - - - - Finding configuration for server type: {0}. - Grafana Loki label already exists. Label: {0}. @@ -1057,14 +687,6 @@ Startup argument parsing failed; refusing to start with default configuration (exit code {1}). Error: {0} - - Application is working fine. - - - - Detailed health check endpoint: {0}. - - Health check endpoint enabled at: {0}. @@ -1073,22 +695,6 @@ OK - - OpenTelemetry configuration is normal. - - - - OpenTelemetry configured normally. Endpoint: {0}. - - - - OpenTelemetry endpoint URL: {0}. - - - - Simple health check endpoint: {0}. - - Address must end with slash. Address: {0}. @@ -1126,10 +732,6 @@ API title: {0}. - - OpenTelemetry service type: {0}. - - HTTP server port is occupied. Port: {0}. @@ -1174,14 +776,6 @@ BigInteger constructor byte overflow. - - Datacenter ID out of range. Must be between 0 and {0}. - - - - Input is a global ID, cannot extract server ID. - - Cannot calculate natural logarithm of non-positive value. @@ -1190,18 +784,10 @@ Cannot calculate square root of negative value. - - Timestamp out of range. Cannot generate ID. - - Value out of range. Value: {0}, min: {1}, max: {2}. - - Worker ID out of range. Must be between 0 and {0}. - - Loading global settings from configuration. @@ -1214,18 +800,6 @@ Failed to load configuration. Configuration file: {0}. - - [TODO] Logs.UnifiedMessaging.Initialized - - - - [TODO] Logs.UnifiedMessaging.PlayerSendResult - - - - [TODO] Logs.UnifiedMessaging.ServerSendResult - - KCP server is disabled for {0} on {1}:{2}. Skipping listener setup (opt-in via IsEnableKcp). @@ -1274,9 +848,6 @@ PostgreSqlDbService.ExecuteInTransactionAsync failed with unknown retry exception. - - - PostgreSqlDbService transaction commit failed after all retries with unknown exception. PostgreSqlDbService.{0} failed after all retries with unknown exception. @@ -1425,12 +996,6 @@ Assembly filter references an unknown capability id: {0} - - Capability {0} requires capability {1} which is not assembled. - - - Capability requirements form a cycle; topological ordering failed. - Action name must not be null or empty. @@ -1608,9 +1173,6 @@ Duplicate capability hook declaration: {0} ({1} → {2}) - - Enabling the admin plane requires referencing GameFrameX.Capability.Hosting.AdminApi and calling UseAdminApi. - Duplicate admin action registration: {0} (capability or source: {1}) @@ -1787,9 +1349,6 @@ Role '{0}' has no Active instance in the dual-view route table; the role is scaled to zero or fully draining. - - Window must be positive. - RoleRouterHolder has not been initialized; call RoleRouterHolder.Initialize during launch before routing. @@ -2383,18 +1942,6 @@ Client disconnected. SessionID: {0}, Reason: {1} - - Data Package Receive: {0} - - - - Data Package Receive HeartBeat: {0} - - - - Data Package Receive: Error when invoke message handler for message id: {0}, message type: {1}, exception: {2} - - Data Package Receive: Can not find handler for message id: {0}, message type: {1} @@ -2489,10 +2036,6 @@ Connection receive pump task faulted with an unclassified exception; observed and logged by the faulted continuation. - - Connection receive pump hit an unclassified exception (not swallowed; logged and rethrown). - - SendOneWayAsync: circuit breaker is open, Service: {0} diff --git a/GameFrameX.Localization/Localization/Messages/Resources.zh-CN.resx b/GameFrameX.Localization/Localization/Messages/Resources.zh-CN.resx index 5f031d185..5af6ad593 100644 --- a/GameFrameX.Localization/Localization/Messages/Resources.zh-CN.resx +++ b/GameFrameX.Localization/Localization/Messages/Resources.zh-CN.resx @@ -1,91 +1,11 @@ - - - 偏移量和计数超出缓冲区长度。缓冲区长度:{0},偏移量:{1},计数:{2}。 - - - - 索引和计数超出缓冲区长度。缓冲区长度:{0},索引:{1},计数:{2}。 - - - - 缓冲区写入位置超出范围。缓冲区长度:{0},写入位置:{1}。 - - - - 字符串长度超出最大值。实际长度:{0},最大长度:{1}。 - - - - 字节数组长度必须相等。第一个数组长度:{0},第二个数组长度:{1}。 - - - - 列表不能为空。 - - - - 目标类型必须是接口类型。目标类型:{0}。 - - - - 对象类型不匹配。对象类型:{0},目标类型:{1}。 - - - - - 集合处理完成。集合类型:{0},元素数量:{1}。 - - - - 字节转换完成。源格式:{0},目标格式:{1},字节数:{2}。 - - - - 类型转换完成。源类型:{0},目标类型:{1}。 - - - - - {0}扩展方法模块初始化成功。 - - - - 缓冲区操作成功完成。操作类型:{0},字节数:{1}。 - - - - - 参数不能为null。参数名称:{0}。 - - - - 数值超出允许范围。值:{0},最小值:{1},最大值:{2}。 - - - - 类型验证失败。实际类型:{0},期望类型:{1}。 - - - - - 操作执行时间。操作名称:{0},执行时间:{1}毫秒。 - - - - 内存使用情况。操作名称:{0},内存使用量:{1}字节。 - - actorId小于最小服务器ID,最小服务器ID为{0} actorId:{0}小于最小服务器ID:{1} - - - 输入为全局ID:{0} 输入Actor类型错误:{0} @@ -146,20 +66,10 @@ 构造函数中无效字符串。 - - - 时间戳超出范围。 系统时钟回退。拒绝生成ID {0} 毫秒。 - - Worker ID不能大于{0}或小于0。 - - - Datacenter ID不能大于{0}或小于0。 - - 传递给 Ln 的值为非正数 @@ -235,9 +145,6 @@ - - AppRunning已经被设置为退出,不能再次开启... - 加载配置文件失败 @@ -245,12 +152,6 @@ 消息解码过程中发生致命异常: {0} - - - 消息对象编码异常,请检查错误日志 - - - 消息编码异常: {0} 消息对象为空,编码异常 @@ -310,24 +211,6 @@ 数据验证失败 - - - 请求参数 - - - 响应状态码 - - - 响应消息 - - - 成功响应 - - - application/json - - - application/x-protobuf http命令未包含验证参数{0} 和 {1} @@ -382,14 +265,6 @@ 无法为类型 {0} 创建对象池 - - RPC调用超时!消息为:{0} - - - - 如果消息对象编码异常,请检查错误日志,异常:{0} - - 开始启动服务器{0} @@ -414,12 +289,6 @@ 注册组件结束... - - - 开始加载热更新模块... - - - 加载热更新模块结束... 进入游戏主循环... @@ -442,41 +311,6 @@ ---收到[{0} To {1}] {2} - - 注册玩家成功:{0} {1} - - - 注销玩家成功:{0} {1} - - - 注册服务成功:{0} {1} {2} - - - 注销服务成功:{0} {1} - - - 有外部服务连接到中心服务器成功。链接信息:SessionID:{0} RemoteEndPoint:{1} - - - 有外部服务从中心服务器断开。链接信息:断开原因:{0} - - - - 玩家下线回调,通知其他服务器: {0} - - - - 玩家上线回调,通知其他服务器: {0} - - - - 服务下线回调,通知其他服务器: {0} - - - - 服务上线回调,通知其他服务器: {0} - - 服务器类型:{0} 停止! 终止原因:{1} 配置信息: {2} @@ -666,19 +500,11 @@ 组件注册初始化完成 - - 激活全局组件:{0} {1} - - [StateComp] 状态回存 {0} count:{1} - - 保存数据异常,类型:{0},{1} - - 消息处理器:{0},UniqueId:{1} 执行耗时:{2} ms @@ -692,10 +518,6 @@ ActorId为0,无法获取组件,{0},关闭通道 - - 缓存组件为空,无法获取组件,关闭通道 - - 内部操作错误: {0} {1} @@ -814,37 +636,11 @@ - - - {0}.{1}无法为标记【{2}】的函数指定超时时间 - - - - {0}.{1}【{2}】注解只能配合【{3}】或【{4}】使用 - - - - {0}.{1}, 非【{2}】的【{3}】接口只能是异步函数 - - - - {0}.{1}标记了【{2}】【{3}】【{4}】注解的函数必须申明为virtual - - - - {0}.{1}只有返回值为Task类型或ValueTask类型才能添加【{2}】注解 - - 不能重复随机参数错误,需求数量:{0} 大于ID数量:{1} - - - 输入为全局ID:{0} - - a = {0} @@ -895,46 +691,12 @@ 数据长度:{0} - - - 设置 AppRunning false... - - - - - 当前设置已存在,无法再次设置,此设置已被忽略。 - - 健康检查端点已启用: - - - 详细健康检查: http://{0}:{1}{2} - - - - - 简单健康检查: http://{0}:{1}{2} - - - - - OpenTelemetry检查: http://{0}:{1}{2} - - - - 应用程序运行正常 - - - - OpenTelemetry配置正常 - - - - OpenTelemetry已正常配置 - - 正常 @@ -964,23 +726,6 @@ Blank - - HTTP - - - - - Configs/app_config.json - - - - _ - - - - [Warning] {0} - - HTTP服务器启动完成 - 端口: {0} @@ -991,166 +736,10 @@ BigInteger构造函数字节溢出。 - - BigInteger构造函数溢出。值:{0}。 - - - - BigInteger构造函数下溢。值:{0}。 - - - - BigInteger无效字符串。字符串:{0}。 - - - - 数据库启动失败。数据库类型:{0},错误:{1}。 - - - - 处理器未初始化。处理器类型:{0}。 - - - - 无效的IP地址格式。IP:{0}。 - - - - 计时器代码不能在热更新程序集中使用。 - - 计时器参数无效。参数:{0},值:{1}。 - - 每周计时器执行日期不能为空。 - - - - 客户端连接成功。服务器:{0}。 - - - - 正在连接服务器。服务器:{0}。 - - - - 客户端已断开连接。服务器:{0}。 - - - - 客户端发生错误。错误:{0}。 - - - - 已达到最大重试次数。最大重试次数:{0}。 - - - - 正在重试连接。尝试次数:{0},最大:{1}。 - - - - 数据库初始化成功。连接字符串:{0},数据库名称:{1}。 - - - - 外部服务已连接。服务:{0}。 - - - - 外部服务已断开连接。服务:{0}。 - - - - 玩家注册成功。玩家ID:{0}。 - - - - 玩家注销成功。玩家ID:{0}。 - - - - 发现服务器异常。错误:{0}。 - - - - 服务注册成功。服务:{0}。 - - - - 服务注销成功。服务:{0}。 - - - - 游戏服务器配置Actor初始化完成。 - - - - 游戏服务器数据库初始化完成。 - - - - 游戏服务器开始关闭流程。 - - - - 游戏服务器关闭完成。 - - - - 游戏服务器热更新初始化完成。 - - - - 游戏服务器主循环已启动。 - - - - 游戏服务器开始注册组件。 - - - - 游戏服务器启动中。服务器ID:{0}。 - - - - 游戏服务器启动完成。服务器ID:{0}。 - - - - 网络客户端已连接。远程端点:{0}。 - - - - 网络客户端已断开连接。远程端点:{0}。 - - - - 使用默认配置启动服务器。 - - - - 正在查找服务器类型配置:{0}。 - - - - 服务器启动中。服务器类型:{0}。 - - - - 服务器已停止。没有运行中的任务。 - - - - 警告:{0}。 - - - - - 正在查找服务器类型配置:{0}。 - Grafana Loki标签已存在。标签:{0}。 @@ -1212,18 +801,6 @@ 加载全局设置失败。错误:{0}。 - - [待翻译] Logs.UnifiedMessaging.Initialized - - - - [待翻译] Logs.UnifiedMessaging.PlayerSendResult - - - - [待翻译] Logs.UnifiedMessaging.ServerSendResult - - {0} KCP 服务未启用({1}:{2}),跳过监听器装配(需 IsEnableKcp 显式开启)。 @@ -1272,9 +849,6 @@ PostgreSqlDbService.ExecuteInTransactionAsync重试失败,未知异常。 - - - PostgreSqlDbService事务提交重试失败,未知异常。 PostgreSqlDbService.{0}重试失败,未知异常。 @@ -1423,12 +997,6 @@ 装配过滤器引用了未发现的能力:{0} - - 能力 {0} 依赖的能力未装配:{1} - - - 能力依赖成环,无法完成拓扑定序。 - Action 名称不能为 null 或为空。 @@ -1606,9 +1174,6 @@ 能力钩子重复声明:{0}({1} → {2}) - - 启用管理面需引用 GameFrameX.Capability.Hosting.AdminApi 并调用 UseAdminApi。 - Admin action 重复注册:{0}(能力或来源:{1}) @@ -1778,9 +1343,6 @@ 角色 '{0}' 在双视图路由表中没有 Active 实例;该角色已缩容至零或正在完全排水。 - - 时间窗必须为正数。 - RoleRouterHolder 尚未初始化;请在路由前于启动阶段调用 RoleRouterHolder.Initialize。 @@ -2374,18 +1936,6 @@ 客户端断开连接 - 会话ID: {0}, 断开原因: {1} - - 数据包接收: {0} - - - - 数据包接收心跳: {0} - - - - 数据包接收: 调用消息处理器出错, 消息ID: {0}, 消息类型: {1}, 异常: {2} - - 数据包接收: 找不到消息处理器, 消息ID: {0}, 消息类型: {1} @@ -2488,10 +2038,6 @@ 连接接收泵任务因未分类异常而故障;异常已由故障续体观察并记录。 - - 连接接收泵遭遇未分类异常(不吞掉,记录后向上抛出)。 - - SendOneWayAsync: 熔断器已打开, Service: {0} @@ -2648,42 +2194,6 @@ LNumber.MultiplicationOverflow LNumber乘法已越界 > {0} - - [待翻译] CoreExceptions.HotfixModule.ClassMustBeSealed - - - - [待翻译] CoreExceptions.HotfixModule.ComponentAgentWrongSuffix - - - - [待翻译] CoreExceptions.HotfixModule.EventArgsTypeInvalid - - - - [待翻译] CoreExceptions.HotfixModule.EventHandlerWrongSuffix - - - - [待翻译] CoreExceptions.HotfixModule.HttpProcessorRepeatedlyRegistered - - - - [待翻译] CoreExceptions.HotfixModule.MessageProcessorWrongSuffix - - - - [待翻译] CoreExceptions.HotfixModule.MultipleAgents - - - - [待翻译] CoreExceptions.HotfixModule.NoEventsToListen - - - - [待翻译] CoreExceptions.HotfixModule.WrongMessageHandlerType - - 好友域桥不可用(未发布或已撤销), PlayerId: {0}, Code: {1} diff --git a/GameFrameX.Localization/auto_translate.py b/GameFrameX.Localization/auto_translate.py index ffb4b5d6e..4a6b85122 100644 --- a/GameFrameX.Localization/auto_translate.py +++ b/GameFrameX.Localization/auto_translate.py @@ -105,197 +105,21 @@ def generate_translation(key, context, info): 'BigInteger constructor byte overflow.', 'BigInteger构造函数字节溢出。' ), - 'Exceptions.BigInteger.ConstructorOverflow': ( - 'BigInteger constructor overflow. Value: {0}.', - 'BigInteger构造函数溢出。值:{0}。' - ), - 'Exceptions.BigInteger.ConstructorUnderflow': ( - 'BigInteger constructor underflow. Value: {0}.', - 'BigInteger构造函数下溢。值:{0}。' - ), - 'Exceptions.BigInteger.InvalidString': ( - 'BigInteger invalid string. String: {0}.', - 'BigInteger无效字符串。字符串:{0}。' - ), - # ===== Exceptions.Database ===== - 'Exceptions.Database.StartFailed': ( - 'Database start failed. Database type: {0}, error: {1}.', - '数据库启动失败。数据库类型:{0},错误:{1}。' - ), - # ===== Exceptions.Handler ===== - 'Exceptions.Handler.NotInitialized': ( - 'Handler not initialized. Handler type: {0}.', - '处理器未初始化。处理器类型:{0}。' - ), - # ===== Exceptions.Network ===== - 'Exceptions.Network.InvalidIpFormat': ( - 'Invalid IP address format. IP: {0}.', - '无效的IP地址格式。IP:{0}。' - ), - # ===== Exceptions.Timer ===== - 'Exceptions.Timer.CodeInHotfix': ( - 'Timer code cannot be used in hotfix assembly.', - '计时器代码不能在热更新程序集中使用。' - ), 'Exceptions.Timer.InvalidParameters': ( 'Timer invalid parameters. Parameter: {0}, value: {1}.', '计时器参数无效。参数:{0},值:{1}。' ), - 'Exceptions.Timer.Weekly.EmptyDays': ( - 'Weekly timer execution days cannot be empty.', - '每周计时器执行日期不能为空。' - ), - # ===== Logs.Client ===== - 'Logs.Client.Connected.Success': ( - 'Client connected successfully. Server: {0}.', - '客户端连接成功。服务器:{0}。' - ), - 'Logs.Client.Connecting': ( - 'Connecting to server. Server: {0}.', - '正在连接服务器。服务器:{0}。' - ), - 'Logs.Client.Disconnected': ( - 'Client disconnected. Server: {0}.', - '客户端已断开连接。服务器:{0}。' - ), - 'Logs.Client.ErrorOccurred': ( - 'Client error occurred. Error: {0}.', - '客户端发生错误。错误:{0}。' - ), - 'Logs.Client.MaxRetryReached': ( - 'Maximum retry count reached. Max retries: {0}.', - '已达到最大重试次数。最大重试次数:{0}。' - ), - 'Logs.Client.RetryConnect': ( - 'Retrying connection. Attempt: {0}, max: {1}.', - '正在重试连接。尝试次数:{0},最大:{1}。' - ), - # ===== Logs.Database ===== - 'Logs.Database.Init.Success': ( - 'Database initialized successfully. Connection string: {0}, database name: {1}.', - '数据库初始化成功。连接字符串:{0},数据库名称:{1}。' - ), - # ===== Logs.Discovery ===== - 'Logs.Discovery.ExternalService.Connect': ( - 'External service connected. Service: {0}.', - '外部服务已连接。服务:{0}。' - ), - 'Logs.Discovery.ExternalService.Disconnect': ( - 'External service disconnected. Service: {0}.', - '外部服务已断开连接。服务:{0}。' - ), - 'Logs.Discovery.Player.Register.Success': ( - 'Player registered successfully. Player ID: {0}.', - '玩家注册成功。玩家ID:{0}。' - ), - 'Logs.Discovery.Player.Unregister.Success': ( - 'Player unregistered successfully. Player ID: {0}.', - '玩家注销成功。玩家ID:{0}。' - ), - 'Logs.Discovery.Server.Exception': ( - 'Discovery server exception. Error: {0}.', - '发现服务器异常。错误:{0}。' - ), - 'Logs.Discovery.Service.Register.Success': ( - 'Service registered successfully. Service: {0}.', - '服务注册成功。服务:{0}。' - ), - 'Logs.Discovery.Service.Unregister.Success': ( - 'Service unregistered successfully. Service: {0}.', - '服务注销成功。服务:{0}。' - ), - # ===== Logs.Game.Server ===== - 'Logs.Game.Server.ConfigActor.End': ( - 'Game server config actor initialization completed.', - '游戏服务器配置Actor初始化完成。' - ), - 'Logs.Game.Server.Database.End': ( - 'Game server database initialization completed.', - '游戏服务器数据库初始化完成。' - ), - 'Logs.Game.Server.Exit.Start': ( - 'Game server starting shutdown process.', - '游戏服务器开始关闭流程。' - ), - 'Logs.Game.Server.Exit.Success': ( - 'Game server shutdown completed.', - '游戏服务器关闭完成。' - ), - 'Logs.Game.Server.Hotfix.End': ( - 'Game server hotfix initialization completed.', - '游戏服务器热更新初始化完成。' - ), - 'Logs.Game.Server.MainLoop': ( - 'Game server main loop started.', - '游戏服务器主循环已启动。' - ), - 'Logs.Game.Server.RegisterComponents.Start': ( - 'Game server starting component registration.', - '游戏服务器开始注册组件。' - ), - 'Logs.Game.Server.Start': ( - 'Game server starting. Server ID: {0}.', - '游戏服务器启动中。服务器ID:{0}。' - ), - 'Logs.Game.Server.Start.Complete': ( - 'Game server startup completed. Server ID: {0}.', - '游戏服务器启动完成。服务器ID:{0}。' - ), - # ===== Logs.Network ===== - 'Logs.Network.Client.Connect': ( - 'Network client connected. Remote endpoint: {0}.', - '网络客户端已连接。远程端点:{0}。' - ), - 'Logs.Network.Client.Disconnect': ( - 'Network client disconnected. Remote endpoint: {0}.', - '网络客户端已断开连接。远程端点:{0}。' - ), - # ===== Logs.Server ===== - 'Logs.Server.Start.DefaultConfig': ( - 'Using default configuration for server startup.', - '使用默认配置启动服务器。' - ), - 'Logs.Server.Start.FindConfig': ( - 'Finding configuration for server type: {0}.', - '正在查找服务器类型配置:{0}。' - ), - 'Logs.Server.Starting': ( - 'Server starting. Server type: {0}.', - '服务器启动中。服务器类型:{0}。' - ), - 'Logs.Server.Stopped.NoTasks': ( - 'Server stopped. No running tasks.', - '服务器已停止。没有运行中的任务。' - ), - 'Logs.Warning.ConsoleMessage': ( - 'Warning: {0}.', - '警告:{0}。' - ), - # ===== StartUp.ApplicationSettings ===== - 'StartUp.ApplicationSettings.ConfigFilePath': ( - 'Configuration file path: {0}.', - '配置文件路径:{0}。' - ), - 'StartUp.ApplicationSettings.LogTypeSeparator': ( - 'Log type separator: {0}.', - '日志类型分隔符:{0}。' - ), - 'StartUp.ApplicationSettings.WarningMessage': ( - 'Warning: {0}.', - '警告:{0}。' - ), - # ===== StartUp.DiscoveryCenter ===== 'StartUp.DiscoveryCenter.HostNotConfigured': ( 'Discovery center host not configured.', @@ -311,22 +135,10 @@ def generate_translation(key, context, info): ), # ===== StartUp ===== - 'StartUp.FindingConfigurationForServerType': ( - 'Finding configuration for server type: {0}.', - '正在查找服务器类型配置:{0}。' - ), 'StartUp.GrafanaLokiLabelExists': ( 'Grafana Loki label already exists. Label: {0}.', 'Grafana Loki标签已存在。标签:{0}。' ), - 'StartUp.HealthCheck.ApplicationWorkingFine': ( - 'Application is working fine.', - '应用程序运行正常。' - ), - 'StartUp.HealthCheck.DetailedEndpointUrl': ( - 'Detailed health check endpoint: {0}.', - '详细健康检查端点:{0}。' - ), 'StartUp.HealthCheck.EndpointEnabled': ( 'Health check endpoint enabled at: {0}.', '健康检查端点已启用:{0}。' @@ -335,23 +147,6 @@ def generate_translation(key, context, info): 'OK', '正常' ), - 'StartUp.HealthCheck.OpenTelemetryConfigurationNormal': ( - 'OpenTelemetry configuration is normal.', - 'OpenTelemetry配置正常。' - ), - 'StartUp.HealthCheck.OpenTelemetryConfiguredNormally': ( - 'OpenTelemetry configured normally. Endpoint: {0}.', - 'OpenTelemetry配置正常。端点:{0}。' - ), - 'StartUp.HealthCheck.OpenTelemetryEndpointUrl': ( - 'OpenTelemetry endpoint URL: {0}.', - 'OpenTelemetry端点URL:{0}。' - ), - 'StartUp.HealthCheck.SimpleEndpointUrl': ( - 'Simple health check endpoint: {0}.', - '简单健康检查端点:{0}。' - ), - # ===== StartUp.HttpExceptions ===== 'StartUp.HttpExceptions.AddressMustEndWithSlash': ( 'Address must end with slash. Address: {0}.', @@ -383,10 +178,6 @@ def generate_translation(key, context, info): 'API title: {0}.', 'API标题:{0}。' ), - 'StartUp.HttpServer.OpenTelemetryServiceType': ( - 'OpenTelemetry service type: {0}.', - 'OpenTelemetry服务类型:{0}。' - ), 'StartUp.HttpServer.PortOccupied': ( 'HTTP server port is occupied. Port: {0}.', 'HTTP服务器端口被占用。端口:{0}。' @@ -441,14 +232,6 @@ def generate_translation(key, context, info): 'BigInteger constructor byte overflow.', 'BigInteger构造函数字节溢出。' ), - 'Utility.Exceptions.DatacenterIdOutOfRange': ( - 'Datacenter ID out of range. Must be between 0 and {0}.', - '数据中心ID超出范围。必须在0到{0}之间。' - ), - 'Utility.Exceptions.InputIsGlobalId': ( - 'Input is a global ID, cannot extract server ID.', - '输入的是全局ID,无法提取服务器ID。' - ), 'Utility.Exceptions.LnValueNonPositive': ( 'Cannot calculate natural logarithm of non-positive value.', '无法计算非正值的自然对数。' @@ -457,19 +240,10 @@ def generate_translation(key, context, info): 'Cannot calculate square root of negative value.', '无法计算负值的平方根。' ), - 'Utility.Exceptions.TimestampOutOfRange': ( - 'Timestamp out of range. Cannot generate ID.', - '时间戳超出范围。无法生成ID。' - ), 'Utility.Exceptions.ValueOutOfRange': ( 'Value out of range. Value: {0}, min: {1}, max: {2}.', '值超出范围。值:{0},最小:{1},最大:{2}。' ), - 'Utility.Exceptions.WorkerIdOutOfRange': ( - 'Worker ID out of range. Must be between 0 and {0}.', - '工作器ID超出范围。必须在0到{0}之间。' - ), - # ===== Utility.GlobalSettings ===== 'Utility.GlobalSettings.LoadGlobalSettings': ( 'Loading global settings from configuration.',