修改国际化异常

This commit is contained in:
2024-10-17 10:03:47 +08:00
parent 41e8164c2e
commit 8a3eb61a34
3 changed files with 18 additions and 12 deletions
@@ -27,15 +27,15 @@ public static class InternationalizationHelper
public static string USJsonPath = Path.Combine(JsonFileFolder, StaticData.En_US_Json);
public static string CNJsonPath = Path.Combine(JsonFileFolder, StaticData.Zh_CN_Json);
//static InternationalizationHelper()
//{
// if (!Directory.Exists(JsonFileFolder) ||
// !Directory.GetFiles(JsonFileFolder).Any(filePath => Path.GetExtension(filePath).Equals(".json", StringComparison.OrdinalIgnoreCase))||
// !File.Exists(USJsonPath) || !File.Exists(CNJsonPath))
// {
// throw new BusinessValidationFailedException(I18n.T("IRaCISCHangfireJob_FileNotFound"));
// }
//}
static InternationalizationHelper()
{
if (!Directory.Exists(JsonFileFolder) ||
!Directory.GetFiles(JsonFileFolder).Any(filePath => Path.GetExtension(filePath).Equals(".json", StringComparison.OrdinalIgnoreCase)) ||
!File.Exists(USJsonPath) || !File.Exists(CNJsonPath))
{
throw new BusinessValidationFailedException(I18n.T("IRaCISCHangfireJob_FileNotFound"));
}
}
@@ -27,6 +27,7 @@
<ItemGroup>
<None Remove="IRaCIS.Core.Application.xml" />
<None Remove="Resources\en-US.json" />
<None Remove="Resources\zh-CN.json" />
<None Remove="Resources\zh_ch.json" />
<None Remove="Service\Allocation\TaskConsistentRuleService.cs~RF1603d47.TMP" />
<None Remove="Service\Reading\ReadingImageTask\ReadingImageTaskService.cs~RF2f9323.TMP" />
@@ -40,6 +41,9 @@
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="Resources\zh-CN.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>