From f1d9019b290e124542e95fda26361a10de6b8508 Mon Sep 17 00:00:00 2001 From: zsh2401 Date: Sat, 19 Jan 2019 12:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E6=AD=A3?= =?UTF-8?q?=E5=88=99BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutumnBox.CoreModules/Lib/EDpmSetterBase.cs | 3 ++- .../Extension/_Attrs/ExtInfoI18NAttribute.cs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AutumnBox.CoreModules/Lib/EDpmSetterBase.cs b/AutumnBox.CoreModules/Lib/EDpmSetterBase.cs index acc9160df..d7d5b5550 100644 --- a/AutumnBox.CoreModules/Lib/EDpmSetterBase.cs +++ b/AutumnBox.CoreModules/Lib/EDpmSetterBase.cs @@ -43,7 +43,7 @@ namespace AutumnBox.CoreModules.Lib [ExtText(TIP_OK, "Success!!", "zh-cn:设置成功!")] [ExtText(TIP_FAIL, "Fail!!", "zh-cn:失败!")] [ExtText(OK_MSG, "Fail!!", "zh-cn:终于成功了,请前往手机端软件进行确认,如果需要卸载,一定要前往该软件其设置内进行操作,否则可能导致DPM残留,那可就没得救了")] - [ExtText(ERR_MSG_KEY_DO_ALREADY_SET, "Fail!!", "zh-cn:设备管理员已经被设置过了!请先移除这个设备管理员(冻结APP请前往该APP设置进行移除)")] + [ExtText(ERR_MSG_KEY_DO_ALREADY_SET, "Fail!!", "zh-cn:设备管理员已经被设置过了!请先移除之前的设备管理员应用(冻结APP请前往该APP设置进行移除)")] [ExtText(ERR_MSG_KEY_UNKNOWN, "Fail!!", "zh-cn:奇怪的问题,请点击左上角复制按钮,并将其发送给你想咨询的人")] [ExtText(ERR_MSG_KEY_HAVE_USERS, "Fail!!", "zh-cn:设备上还有多余的用户!请尝试删除应用多开,访客模式等再试")] [ExtText(ERR_MSG_KEY_HAVE_ACCOUNTS, "Fail!!", "zh-cn:设备上还有多余的账号!前往设置->同步/账号->删除,然后再试")] @@ -98,6 +98,7 @@ public void Main(IDevice device, TextAttrManager texts) return; } //提示用户移除屏幕锁等 + Logger.Info(texts["WarningRemoveLock"]); if (!UI.DoYN(texts["WarningRemoveLock"])) { UI.Shutdown(); diff --git a/AutumnBox.OpenFramework.Shared/Extension/_Attrs/ExtInfoI18NAttribute.cs b/AutumnBox.OpenFramework.Shared/Extension/_Attrs/ExtInfoI18NAttribute.cs index e0609ae32..b5db8ff21 100644 --- a/AutumnBox.OpenFramework.Shared/Extension/_Attrs/ExtInfoI18NAttribute.cs +++ b/AutumnBox.OpenFramework.Shared/Extension/_Attrs/ExtInfoI18NAttribute.cs @@ -17,8 +17,8 @@ namespace AutumnBox.OpenFramework.Extension public abstract class ExtInfoI18NAttribute : ExtensionAttribute, IInformationAttribute { private const string DEFAULT_KEY = "ALL_REGIONS"; - private const string KV_PATTERN = @"(?[\w|\-]+):(?.+)"; - private readonly Regex regex = new Regex(KV_PATTERN); + private const string KV_PATTERN = @"(?[^:]+):(?[\s\S]+)"; + private static readonly Regex regex = new Regex(KV_PATTERN); private Dictionary pairsOfRegionAndValue; /// /// 构建 @@ -51,7 +51,7 @@ private void ParseAndAddToDict(string kv) if (match.Success) { AddOrOverwrite( - match.Result("${key}").ToLower() , + match.Result("${key}").ToLower(), match.Result("${value}")); } else