From 5857696b56eefaf82e6af4ed1237027cd8908e01 Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 30 Aug 2023 11:07:12 +0800 Subject: [PATCH] =?UTF-8?q?[change]=20=E6=97=A5=E5=BF=97=E5=92=8C=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=96=87=E6=9C=AC=E6=8D=A2=E6=88=90=E8=8B=B1=E6=96=87?= =?UTF-8?q?=EF=BC=8C=E6=96=B9=E4=BE=BF=E6=B5=B7=E5=A4=96=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/ABI/TypeCreator.cs | 2 +- Editor/BuildProcessors/CheckSettings.cs | 10 +++++----- Editor/BuildProcessors/FilterHotFixAssemblies.cs | 8 ++++---- Editor/Commands/StripAOTDllCommand.cs | 2 +- Editor/Meta/AssemblyResolverBase.cs | 4 ++-- Editor/Meta/MetaUtil.cs | 4 ++-- Editor/MethodBridge/Generator.cs | 2 +- Editor/Settings/ScriptableSignleton.cs | 2 +- Editor/SettingsUtil.cs | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Editor/ABI/TypeCreator.cs b/Editor/ABI/TypeCreator.cs index 28bf54a..12af7ae 100644 --- a/Editor/ABI/TypeCreator.cs +++ b/Editor/ABI/TypeCreator.cs @@ -68,7 +68,7 @@ namespace HybridCLR.Editor.ABI TypeDef typeDef = type.ToTypeDefOrRef().ResolveTypeDef(); if (typeDef == null) { - throw new Exception($"type:{type} 未能找到定义。请尝试 `HybridCLR/Genergate/LinkXml`,然后Build一次生成AOT dll,再重新生成桥接函数"); + throw new Exception($"type:{type} definition could not be found. Please try `HybridCLR/Genergate/LinkXml`, then Build once to generate the AOT dll, and then regenerate the bridge function"); } if (typeDef.IsEnum) { diff --git a/Editor/BuildProcessors/CheckSettings.cs b/Editor/BuildProcessors/CheckSettings.cs index fdc5a17..defe491 100644 --- a/Editor/BuildProcessors/CheckSettings.cs +++ b/Editor/BuildProcessors/CheckSettings.cs @@ -23,7 +23,7 @@ namespace HybridCLR.Editor.BuildProcessors if (!string.IsNullOrEmpty(oldIl2cppPath)) { Environment.SetEnvironmentVariable("UNITY_IL2CPP_PATH", ""); - Debug.Log($"[CheckSettings] 清除 UNITY_IL2CPP_PATH, 旧值为:'{oldIl2cppPath}'"); + Debug.Log($"[CheckSettings] clean process environment variable: UNITY_IL2CPP_PATH, old vlaue:'{oldIl2cppPath}'"); } } else @@ -32,7 +32,7 @@ namespace HybridCLR.Editor.BuildProcessors if (curIl2cppPath != SettingsUtil.LocalIl2CppDir) { Environment.SetEnvironmentVariable("UNITY_IL2CPP_PATH", SettingsUtil.LocalIl2CppDir); - Debug.Log($"[CheckSettings] UNITY_IL2CPP_PATH 当前值为:'{curIl2cppPath}',更新为:'{SettingsUtil.LocalIl2CppDir}'"); + Debug.Log($"[CheckSettings] UNITY_IL2CPP_PATH old value:'{curIl2cppPath}', new value:'{SettingsUtil.LocalIl2CppDir}'"); } } if (!globalSettings.enable) @@ -44,20 +44,20 @@ namespace HybridCLR.Editor.BuildProcessors ScriptingImplementation targetScriptingImplementation = ScriptingImplementation.IL2CPP; if (curScriptingImplementation != targetScriptingImplementation) { - Debug.LogError($"[CheckSettings] 当前ScriptingBackend是:{curScriptingImplementation},已经自动切换为:{targetScriptingImplementation}"); + Debug.LogError($"[CheckSettings] current ScriptingBackend:{curScriptingImplementation},have been switched to:{targetScriptingImplementation} automatically"); PlayerSettings.SetScriptingBackend(buildTargetGroup, targetScriptingImplementation); } var installer = new Installer.InstallerController(); if (!installer.HasInstalledHybridCLR()) { - throw new BuildFailedException($"你没有初始化HybridCLR,请通过菜单'HybridCLR/Installer'安装"); + throw new BuildFailedException($"You have not initialized HybridCLR, please install it via menu 'HybridCLR/Installer'"); } HybridCLRSettings gs = SettingsUtil.HybridCLRSettings; if (((gs.hotUpdateAssemblies?.Length + gs.hotUpdateAssemblyDefinitions?.Length) ?? 0) == 0) { - Debug.LogWarning("[CheckSettings] HybridCLRSettings中未配置任何热更新模块"); + Debug.LogWarning("[CheckSettings] No hot update modules configured in HybridCLRSettings"); } } diff --git a/Editor/BuildProcessors/FilterHotFixAssemblies.cs b/Editor/BuildProcessors/FilterHotFixAssemblies.cs index 08bb825..1cb56b6 100644 --- a/Editor/BuildProcessors/FilterHotFixAssemblies.cs +++ b/Editor/BuildProcessors/FilterHotFixAssemblies.cs @@ -33,11 +33,11 @@ namespace HybridCLR.Editor.BuildProcessors { if (string.IsNullOrWhiteSpace(hotUpdateDll)) { - throw new BuildFailedException($"热更新 assembly 名不能为空"); + throw new BuildFailedException($"hot update assembly name cann't be empty"); } if (!hotUpdateDllSet.Add(hotUpdateDll)) { - throw new BuildFailedException($"热更新 assembly:{hotUpdateDll} 在列表中重复,请除去重复条目"); + throw new BuildFailedException($"hot update assembly:{hotUpdateDll} is duplicated"); } } @@ -48,7 +48,7 @@ namespace HybridCLR.Editor.BuildProcessors if (assemblies.Select(Path.GetFileNameWithoutExtension).All(ass => ass != hotUpdateDllName) && string.IsNullOrEmpty(assResolver.ResolveAssembly(hotUpdateDllName, false))) { - throw new BuildFailedException($"热更新 assembly:{hotUpdateDllName} 不存在,请检查拼写错误"); + throw new BuildFailedException($"hot update assembly:{hotUpdateDllName} doesn't exist"); } } @@ -59,7 +59,7 @@ namespace HybridCLR.Editor.BuildProcessors bool reserved = allHotUpdateDllNames.All(dll => !assName.Equals(dll, StringComparison.Ordinal)); if (!reserved) { - Debug.Log($"[FilterHotFixAssemblies] 过滤热更新assembly:{assName}"); + Debug.Log($"[FilterHotFixAssemblies] filter assembly:{assName}"); } return reserved; }).ToArray(); diff --git a/Editor/Commands/StripAOTDllCommand.cs b/Editor/Commands/StripAOTDllCommand.cs index fed8c6d..e5d5e96 100644 --- a/Editor/Commands/StripAOTDllCommand.cs +++ b/Editor/Commands/StripAOTDllCommand.cs @@ -113,7 +113,7 @@ namespace HybridCLR.Editor.Commands if (report.summary.result != UnityEditor.Build.Reporting.BuildResult.Succeeded) { - throw new Exception("GenerateStripedAOTDlls 失败"); + throw new Exception("GenerateStripedAOTDlls failed"); } Debug.Log($"GenerateStripedAOTDlls target:{target} group:{group} path:{outputPath}"); } diff --git a/Editor/Meta/AssemblyResolverBase.cs b/Editor/Meta/AssemblyResolverBase.cs index b59d793..973619a 100644 --- a/Editor/Meta/AssemblyResolverBase.cs +++ b/Editor/Meta/AssemblyResolverBase.cs @@ -18,11 +18,11 @@ namespace HybridCLR.Editor.Meta { if (SettingsUtil.HotUpdateAssemblyNamesIncludePreserved.Contains(assemblyName)) { - throw new Exception($"resolve 热更新 dll:{assemblyName} 失败!请确保已经编译了热更新dll或者外部热更新路径中配置了正确的值。更多请参阅常见错误文档"); + throw new Exception($"resolve Hot update dll:{assemblyName} failed! Please make sure that this hot update dll exists or the search path is configured in the external hot update path."); } else { - throw new Exception($"resolve AOT dll:{assemblyName} 失败! 请确保主工程已经引用了该dll并且正确生成了裁剪后的AOT dll。更多请参阅常见错误文档"); + throw new Exception($"resolve AOT dll:{assemblyName} failed! Please make sure that the AOT project has referenced the dll and generated the trimmed AOT dll correctly."); } } return null; diff --git a/Editor/Meta/MetaUtil.cs b/Editor/Meta/MetaUtil.cs index 915591a..5efb1f7 100644 --- a/Editor/Meta/MetaUtil.cs +++ b/Editor/Meta/MetaUtil.cs @@ -92,7 +92,7 @@ namespace HybridCLR.Editor.Meta TypeDef typeDef = a.ToTypeDefOrRef().ResolveTypeDef(); if (typeDef == null) { - throw new Exception($"type:{a} 未能找到定义"); + throw new Exception($"type:{a} definition could not be found"); } if (typeDef.IsEnum) { @@ -109,7 +109,7 @@ namespace HybridCLR.Editor.Meta TypeDef typeDef = gia.GenericType.ToTypeDefOrRef().ResolveTypeDef(); if (typeDef == null) { - throw new Exception($"type:{a} 未能找到定义"); + throw new Exception($"type:{a} definition could not be found"); } if (typeDef.IsEnum) { diff --git a/Editor/MethodBridge/Generator.cs b/Editor/MethodBridge/Generator.cs index f1a0bff..e105aa8 100644 --- a/Editor/MethodBridge/Generator.cs +++ b/Editor/MethodBridge/Generator.cs @@ -400,7 +400,7 @@ namespace HybridCLR.Editor.MethodBridge TypeDef typeDef = type.ToTypeDefOrRef().ResolveTypeDef(); if (typeDef == null) { - throw new Exception($"type:{type} 未能找到定义。请尝试 `HybridCLR/Genergate/LinkXml`,然后Build一次生成AOT dll,再重新生成桥接函数"); + throw new Exception($"type:{type} definition could not be found. Please try `HybridCLR/Genergate/LinkXml`, then Build once to generate the AOT dll, and then regenerate the bridge function"); } if (typeDef.IsEnum) { diff --git a/Editor/Settings/ScriptableSignleton.cs b/Editor/Settings/ScriptableSignleton.cs index d743bec..52e0247 100644 --- a/Editor/Settings/ScriptableSignleton.cs +++ b/Editor/Settings/ScriptableSignleton.cs @@ -31,7 +31,7 @@ namespace HybridCLR.Editor } else { - Debug.LogError($"{nameof(ScriptableSingleton)}: 请指定单例存档路径! "); + Debug.LogError($"save location of {nameof(ScriptableSingleton)} is invalid"); } return s_Instance; } diff --git a/Editor/SettingsUtil.cs b/Editor/SettingsUtil.cs index 912b01e..368c6c7 100644 --- a/Editor/SettingsUtil.cs +++ b/Editor/SettingsUtil.cs @@ -95,7 +95,7 @@ namespace HybridCLR.Editor { if (allAsses.Contains(assemblyName)) { - throw new Exception($"[HotUpdateAssemblyNamesIncludePreserved] assembly:'{assemblyName}' 重复"); + throw new Exception($"[HotUpdateAssemblyNamesIncludePreserved] assembly:'{assemblyName}' is duplicated"); } allAsses.Add(assemblyName); }