🐛 The compile error has been fixed by ChatGPT which I dont know how did it made it

This commit is contained in:
LittleSheep 2025-05-19 21:56:06 +08:00
parent 99f5d931c3
commit 793043aba2
3 changed files with 113 additions and 105 deletions

View File

@ -14,7 +14,8 @@ RUN dotnet build -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish FROM build AS publish
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
RUN dotnet publish -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false RUN mkdir -p /app/publish/zh-Hans
RUN dotnet publish -c $BUILD_CONFIGURATION -o /app/publish
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app

View File

@ -7,6 +7,7 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<UserSecretsId>cfdec342-d2f2-4a86-800b-93f0a0e4abde</UserSecretsId> <UserSecretsId>cfdec342-d2f2-4a86-800b-93f0a0e4abde</UserSecretsId>
<SatelliteResourceLanguages>en-US;zh-Hans</SatelliteResourceLanguages>
</PropertyGroup> </PropertyGroup>
<!-- NPM Configuration --> <!-- NPM Configuration -->
@ -101,12 +102,18 @@
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Email.LandingResource.Designer.cs</LastGenOutput> <LastGenOutput>Email.LandingResource.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<!-- <EmbeddedResource Update="Resources\Localization\SharedResource.zh-hans.resx">--> <EmbeddedResource Update="Resources\Localization\SharedResource.zh-hans.resx">
<!-- <DependentUpon>SharedResource.resx</DependentUpon>--> <DependentUpon>SharedResource.resx</DependentUpon>
<!-- </EmbeddedResource>--> </EmbeddedResource>
<!-- <EmbeddedResource Update="Resources\Localization\AccountEventResource.zh-hans.resx">--> <EmbeddedResource Update="Resources\Localization\AccountEventResource.zh-hans.resx">
<!-- <DependentUpon>AccountEventResource.resx</DependentUpon>--> <DependentUpon>AccountEventResource.resx</DependentUpon>
<!-- </EmbeddedResource>--> </EmbeddedResource>
<EmbeddedResource Update="Resources\Localization\EmailResource.zh-hans.resx">
<DependentUpon>EmailResource.resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Localization\NotificationResource.zh-hans.resx">
<DependentUpon>NotificationResource.resx</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -63,8 +63,8 @@ builder.Services.Configure<RequestLocalizationOptions>(options =>
{ {
var supportedCultures = new[] var supportedCultures = new[]
{ {
new CultureInfo("en-us"), new CultureInfo("en-US"),
new CultureInfo("zh-hans"), new CultureInfo("zh-Hans"),
}; };
options.SupportedCultures = supportedCultures; options.SupportedCultures = supportedCultures;