mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Prepare Announcement Regex
This commit is contained in:
@@ -5478,6 +5478,51 @@ namespace Snap.Hutao.Resource.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 (?:〓活动时间〓|〓任务开放时间〓).*?\d\.\d版本更新(?:完成|)后永久开放 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string WebAnnouncementMatchPermanentActivityTime {
|
||||
get {
|
||||
return ResourceManager.GetString("WebAnnouncementMatchPermanentActivityTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 〓活动时间〓.*?\d\.\d版本期间持续开放 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string WebAnnouncementMatchPersistentActivityTime {
|
||||
get {
|
||||
return ResourceManager.GetString("WebAnnouncementMatchPersistentActivityTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 (?:〓活动时间〓|祈愿时间|【上架时间】).*?(\d\.\d版本更新后|\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}).*?~.*?&lt;t class="t_(?:gl|lc)".*?&gt;(.*?)&lt;/t&gt; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string WebAnnouncementMatchTransientActivityTime {
|
||||
get {
|
||||
return ResourceManager.GetString("WebAnnouncementMatchTransientActivityTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 〓更新时间〓.+?&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string WebAnnouncementMatchVersionUpdateTime {
|
||||
get {
|
||||
return ResourceManager.GetString("WebAnnouncementMatchVersionUpdateTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 \d\.\d版本更新说明 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string WebAnnouncementMatchVersionUpdateTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("WebAnnouncementMatchVersionUpdateTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 {0} 天后开始 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -5828,5 +5873,14 @@ namespace Snap.Hutao.Resource.Localization {
|
||||
return ResourceManager.GetString("WebResponseRequestExceptionFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 (?:〓活动时间〓|祈愿时间|【上架时间】).*?(\d\.\d版本更新后|\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}).*?~.*?&lt;t class="t_(?:gl|lc)".*?&gt;(.*?)&lt;/t&gt; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string 活动时间祈愿时间上架时间DD版本更新后D4D2D2D2D2D2LtTClass {
|
||||
get {
|
||||
return ResourceManager.GetString("活动时间祈愿时间上架时间DD版本更新后D4D2D2D2D2D2LtTClass", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1979,6 +1979,21 @@
|
||||
<data name="ViewWikiWeaponHeader" xml:space="preserve">
|
||||
<value>武器资料</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPermanentActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|〓任务开放时间〓).*?\d\.\d版本更新(?:完成|)后永久开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchPersistentActivityTime" xml:space="preserve">
|
||||
<value>〓活动时间〓.*?\d\.\d版本期间持续开放</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchTransientActivityTime" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|祈愿时间|【上架时间】).*?(\d\.\d版本更新后|\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}).*?~.*?&lt;t class="t_(?:gl|lc)".*?&gt;(.*?)&lt;/t&gt;</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchVersionUpdateTime" xml:space="preserve">
|
||||
<value>〓更新时间〓.+?&lt;t class=\"t_(?:gl|lc)\".*?&gt;(.*?)&lt;/t&gt;</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementMatchVersionUpdateTitle" xml:space="preserve">
|
||||
<value>\d\.\d版本更新说明</value>
|
||||
</data>
|
||||
<data name="WebAnnouncementTimeDaysBeginFormat" xml:space="preserve">
|
||||
<value>{0} 天后开始</value>
|
||||
</data>
|
||||
@@ -2096,4 +2111,7 @@
|
||||
<data name="WebResponseRequestExceptionFormat" xml:space="preserve">
|
||||
<value>[{0}] 中的 [{1}] 网络请求异常,请稍后再试</value>
|
||||
</data>
|
||||
<data name="活动时间祈愿时间上架时间DD版本更新后D4D2D2D2D2D2LtTClass" xml:space="preserve">
|
||||
<value>(?:〓活动时间〓|祈愿时间|【上架时间】).*?(\d\.\d版本更新后|\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}).*?~.*?&lt;t class="t_(?:gl|lc)".*?&gt;(.*?)&lt;/t&gt;</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -45,4 +45,4 @@ internal class AnnouncementContent
|
||||
/// </summary>
|
||||
[JsonPropertyName("lang")]
|
||||
public string Lang { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Snap.Hutao.Web.Hoyolab.Hk4e.Common.Announcement;
|
||||
|
||||
internal static class AnnouncementRegex
|
||||
{
|
||||
public static readonly Regex VersionUpdateTitleRegex = new(SH.WebAnnouncementMatchVersionUpdateTitle, RegexOptions.Compiled);
|
||||
|
||||
public static readonly Regex VersionUpdateTimeRegex = new(SH.WebAnnouncementMatchVersionUpdateTime, RegexOptions.Compiled);
|
||||
|
||||
public static readonly Regex TransientActivityTimeRegex = new(SH.WebAnnouncementMatchTransientActivityTime, RegexOptions.Compiled);
|
||||
|
||||
public static readonly Regex PersistentActivityTimeRegex = new(SH.WebAnnouncementMatchPersistentActivityTime, RegexOptions.Compiled);
|
||||
|
||||
public static readonly Regex PermanentActivityTimeRegex = new(SH.WebAnnouncementMatchPermanentActivityTime, RegexOptions.Compiled);
|
||||
}
|
||||
Reference in New Issue
Block a user