Skip to content

Commit

Permalink
Merge pull request #23 from EasyAbp/display-name-localization
Browse files Browse the repository at this point in the history
Support for display names localization
  • Loading branch information
gdlcf88 authored Jul 4, 2024
2 parents 66bc4ff + e2e44f7 commit 63d254a
Show file tree
Hide file tree
Showing 26 changed files with 4,836 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ await _processManager.UpdateStateAsync(process1,

var process2 = await _processManager.CreateAsync(
new CreateProcessModel("FakeExport", null,
await _userIdUserGroupContributor.CreateGroupKeyAsync(adminUser!.Id.ToString())), now);
await _userIdUserGroupContributor.CreateGroupKeyAsync(adminUser!.Id.ToString())), now.AddHours(-2));

await _processManager.UpdateStateAsync(process2,
new UpdateProcessStateModel(now.AddHours(-1), "Exporting",
Expand All @@ -100,7 +100,7 @@ await _processManager.UpdateStateAsync(process2,

var process3 = await _processManager.CreateAsync(
new CreateProcessModel("FakeExport", null,
await _userIdUserGroupContributor.CreateGroupKeyAsync(adminUser!.Id.ToString())), now);
await _userIdUserGroupContributor.CreateGroupKeyAsync(adminUser!.Id.ToString())), now.AddHours(-3));

await _processManager.UpdateStateAsync(process3,
new UpdateProcessStateModel(now.AddHours(-2), "Exporting",
Expand All @@ -110,7 +110,7 @@ await _processManager.UpdateStateAsync(process3,
"<b>Loading the data...</b>"));

await _processManager.UpdateStateAsync(process3,
new UpdateProcessStateModel(now.AddHours(-1), "Failed",
new UpdateProcessStateModel(now.AddHours(-1), "ExportFailed",
"Failed...",
ProcessStateFlag.Failure,
"Oops, the task failed!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<RootNamespace>EasyAbp.ProcessManagement</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>EasyAbp.ProcessManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010</UserSecretsId>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -48,6 +49,10 @@
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="$(AbpVersion)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\EasyAbp.ProcessManagement.Application\EasyAbp.ProcessManagement.Application.csproj" />
<ProjectReference Include="..\..\src\EasyAbp.ProcessManagement.HttpApi\EasyAbp.ProcessManagement.HttpApi.csproj" />
Expand All @@ -72,4 +77,9 @@
</None>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Localization\Demo\*.json" />
<Content Remove="Localization\Demo\*.json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"culture": "en",
"texts": {
"Process:FakeExport": "Fake export",
"State:Ready": "Ready",
"State:FailedToStartExporting": "Failed",
"State:Exporting": "Exporting",
"State:ExportFailed": "Failed",
"State:Succeeded": "Succeeded"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Volo.Abp.Localization;

namespace EasyAbp.ProcessManagement.Localization;

[LocalizationResourceName("Demo")]
public class DemoResource
{
}
Loading

0 comments on commit 63d254a

Please sign in to comment.