Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed May 19, 2022
1 parent a4076b5 commit de104be
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 12 deletions.
15 changes: 12 additions & 3 deletions ASFEnhance/Localization/Langs.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 55 additions & 1 deletion ASFEnhance/Localization/Langs.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<value>Coming soon</value>
</data>
<data name="AppCategories" xml:space="preserve">
<value> - Categories: {0}</value>
<value> - 标签: {0}</value>
</data>
<data name="AppDelisted" xml:space="preserve">
<value>Unavailable</value>
Expand Down Expand Up @@ -519,4 +519,58 @@
<data name="GetReleaseInfoFailed" xml:space="preserve">
<value>读取插件发行版信息失败!</value>
</data>
<data name="ASFEAsfVersion" xml:space="preserve">
<value> - ASF版本: {0}</value>
</data>
<data name="ASFECurrentVersion" xml:space="preserve">
<value>当前版本: </value>
</data>
<data name="ASFEOnlineVersion" xml:space="preserve">
<value>在线版本: </value>
</data>
<data name="ASFEPluginVersion" xml:space="preserve">
<value> - 插件版本: {0}</value>
</data>
<data name="Assert" xml:space="preserve">
<value> - 附件: </value>
</data>
<data name="CommandHelp" xml:space="preserve">
<value>命令帮助:</value>
</data>
<data name="Detail" xml:space="preserve">
<value> - 描述: {0}</value>
</data>
<data name="DownloadFailed" xml:space="preserve">
<value>下载插件失败!</value>
</data>
<data name="HelpArgsExplain" xml:space="preserve">
<value>[ ]: 可选参数, &lt; &gt;: 数组(使用,分隔)</value>
</data>
<data name="NoArgs" xml:space="preserve">
<value>无参数</value>
</data>
<data name="PluginUpdateReady" xml:space="preserve">
<value>**插件更新准备完毕,重启ASF即可应用更新.**\n{0}</value>
</data>
<data name="SubLink" xml:space="preserve">
<value> - 链接: {0}</value>
</data>
<data name="SubSize" xml:space="preserve">
<value> - 尺寸: {0:0.000} KB</value>
</data>
<data name="SubName" xml:space="preserve">
<value> - 名称: {0}</value>
</data>
<data name="UpdateSuccess" xml:space="preserve">
<value>插件更新完成, 重启ASF即可应用, 如果不兼容请更新ASF版本</value>
</data>
<data name="UpdateFiledWithZip" xml:space="preserve">
<value>插件更新失败, 压缩包内容解析失败</value>
</data>
<data name="Version" xml:space="preserve">
<value> - 版本: {0}</value>
</data>
<data name="UpdateTips" xml:space="preserve">
<value>可以使用命令 ASFEUPDATE / AU 自动更新插件</value>
</data>
</root>
9 changes: 6 additions & 3 deletions ASFEnhance/Localization/Langs.resx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
<value>获取 {0} 失败</value>
</data>
<data name="DataIsNull" xml:space="preserve">
<value>{0} 是NULL</value>
<value>{0} 是 NULL</value>
</data>
<data name="DevFeatureEnabledWarning" xml:space="preserve">
<value>开发者特性已开启</value>
Expand Down Expand Up @@ -370,7 +370,7 @@
<value> - 发型商: {0}</value>
</data>
<data name="AppCategories" xml:space="preserve">
<value>- 标签: {0}</value>
<value> - 标签: {0}</value>
</data>
<data name="AppGenres" xml:space="preserve">
<value> - 分类: {0}</value>
Expand Down Expand Up @@ -559,7 +559,7 @@
<value> - 链接: {0}</value>
</data>
<data name="UpdateTips" xml:space="preserve">
<value>可以使用命令 ASFEUPDATE 自动更新插件</value>
<value>可以使用命令 ASFEUPDATE / AU 自动更新插件</value>
</data>
<data name="AlreadyLatest" xml:space="preserve">
<value>当前已经是最新版本, 无需更新插件</value>
Expand All @@ -573,4 +573,7 @@
<data name="UpdateFiledWithZip" xml:space="preserve">
<value>插件更新失败, 压缩包内容解析失败</value>
</data>
<data name="PluginUpdateReady" xml:space="preserve">
<value>**插件更新准备完毕,重启ASF即可应用更新.**\n{0}</value>
</data>
</root>
54 changes: 54 additions & 0 deletions ASFEnhance/Localization/Langs.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -519,4 +519,58 @@
<data name="GetReleaseInfoFailed" xml:space="preserve">
<value>读取插件发行版信息失败!</value>
</data>
<data name="ASFEAsfVersion" xml:space="preserve">
<value> - ASF版本: {0}</value>
</data>
<data name="ASFECurrentVersion" xml:space="preserve">
<value>当前版本: </value>
</data>
<data name="ASFEOnlineVersion" xml:space="preserve">
<value>在线版本: </value>
</data>
<data name="ASFEPluginVersion" xml:space="preserve">
<value> - 插件版本: {0}</value>
</data>
<data name="Assert" xml:space="preserve">
<value> - 附件: </value>
</data>
<data name="CommandHelp" xml:space="preserve">
<value>命令帮助:</value>
</data>
<data name="Detail" xml:space="preserve">
<value> - 描述: {0}</value>
</data>
<data name="DownloadFailed" xml:space="preserve">
<value>下载插件失败!</value>
</data>
<data name="HelpArgsExplain" xml:space="preserve">
<value>[ ]: 可选参数, &lt; &gt;: 数组(使用,分隔)</value>
</data>
<data name="NoArgs" xml:space="preserve">
<value>无参数</value>
</data>
<data name="PluginUpdateReady" xml:space="preserve">
<value>**插件更新准备完毕,重启ASF即可应用更新.**\n{0}</value>
</data>
<data name="SubLink" xml:space="preserve">
<value> - 链接: {0}</value>
</data>
<data name="SubSize" xml:space="preserve">
<value> - 尺寸: {0:0.000} KB</value>
</data>
<data name="SubName" xml:space="preserve">
<value> - 名称: {0}</value>
</data>
<data name="UpdateSuccess" xml:space="preserve">
<value>插件更新完成, 重启ASF即可应用, 如果不兼容请更新ASF版本</value>
</data>
<data name="UpdateFiledWithZip" xml:space="preserve">
<value>插件更新失败, 压缩包内容解析失败</value>
</data>
<data name="Version" xml:space="preserve">
<value> - 版本: {0}</value>
</data>
<data name="UpdateTips" xml:space="preserve">
<value>可以使用命令 ASFEUPDATE / AU 自动更新插件</value>
</data>
</root>
5 changes: 2 additions & 3 deletions ASFEnhance/Other/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using ASFEnhance.Localization;
using System.Diagnostics;
using System.IO.Compression;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using static ASFEnhance.Utils;
Expand Down Expand Up @@ -50,7 +49,7 @@ internal static string ResponseASFEnhanceVersion()
{
StringBuilder sb = new();

sb.AppendLine(Langs.MultipleLineResult);
sb.AppendLine(FormatStaticResponse(Langs.MultipleLineResult));
sb.AppendLine(Langs.CommandHelp);

int count = 0;
Expand Down Expand Up @@ -87,7 +86,7 @@ internal static string ResponseASFEnhanceVersion()
}

StringBuilder sb = new();
sb.AppendLine(Langs.MultipleLineResult);
sb.AppendLine(FormatStaticResponse(Langs.MultipleLineResult));

FileVersionInfo asfVersion = Process.GetCurrentProcess().MainModule.FileVersionInfo;

Expand Down
5 changes: 3 additions & 2 deletions ASFEnhance/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using ArchiSteamFarm.Steam.Integration;
using ArchiSteamFarm.Steam.Interaction;
using ASFEnhance.Data;
using ASFEnhance.Localization;

namespace ASFEnhance
{
Expand All @@ -26,7 +27,7 @@ internal static string FormatStaticResponse(string message)
}
else
{
return Commands.FormatStaticResponse(string.Format("{0}\n**插件更新准备完毕,重启ASF即可应用更新.**", message));
return Commands.FormatStaticResponse(string.Format(Langs.PluginUpdateReady, message));
}
}

Expand All @@ -44,7 +45,7 @@ internal static string FormatBotResponse(this Bot bot, string message)
}
else
{
return bot.Commands.FormatBotResponse(string.Format("{0}\n**插件更新准备完毕,重启ASF即可应用更新.**", message));
return bot.Commands.FormatBotResponse(string.Format(Langs.PluginUpdateReady, message));
}
}

Expand Down

0 comments on commit de104be

Please sign in to comment.