10 changed files with 99 additions and 7 deletions
@ -1,9 +1,27 @@ |
|||
using Volo.Abp.Modularity; |
|||
using LINGYUN.Abp.DataProtection.Localization; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.ObjectExtending; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace LINGYUN.Abp.DataProtection; |
|||
|
|||
[DependsOn(typeof(AbpLocalizationModule))] |
|||
[DependsOn(typeof(AbpObjectExtendingModule))] |
|||
public class AbpDataProtectionAbstractionsModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<AbpDataProtectionAbstractionsModule>(); |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Add<DataProtectionResource>() |
|||
.AddVirtualJson("/LINGYUN/Abp/DataProtection/Localization/Resources"); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,6 @@ |
|||
{ |
|||
"culture": "en", |
|||
"texts": { |
|||
"DataProtection:010001": "Data access permission not granted to protected resources!" |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"DataProtection:010001": "未授予受保护资源的数据访问权限!" |
|||
} |
|||
} |
|||
@ -1,11 +1,12 @@ |
|||
using Volo.Abp.Application.Services; |
|||
using LINGYUN.Abp.DataProtection.Localization; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace LINGYUN.Abp.DataProtectionManagement; |
|||
public abstract class DataProtectionManagementApplicationServiceBase : ApplicationService |
|||
{ |
|||
protected DataProtectionManagementApplicationServiceBase() |
|||
{ |
|||
LocalizationResource = typeof(AbpDataProtectionManagementApplicationModule); |
|||
LocalizationResource = typeof(DataProtectionResource); |
|||
ObjectMapperContext = typeof(AbpDataProtectionManagementApplicationModule); |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,34 @@ |
|||
using Volo.Abp.Domain; |
|||
using LINGYUN.Abp.DataProtection; |
|||
using LINGYUN.Abp.DataProtection.Localization; |
|||
using Volo.Abp.Domain; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Localization.ExceptionHandling; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace LINGYUN.Abp.DataProtectionManagement; |
|||
|
|||
[DependsOn(typeof(AbpDddDomainSharedModule))] |
|||
[DependsOn(typeof(AbpDataProtectionAbstractionsModule))] |
|||
public class AbpDataProtectionManagementDomainSharedModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<AbpDataProtectionManagementDomainSharedModule>(); |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Get<DataProtectionResource>() |
|||
.AddVirtualJson("/LINGYUN/Abp/DataProtectionManagement/Localization/Resources"); |
|||
}); |
|||
|
|||
Configure<AbpExceptionLocalizationOptions>(options => |
|||
{ |
|||
options.MapCodeNamespace(DataProtectionManagementErrorCodes.Namespace, typeof(DataProtectionResource)); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,9 @@ |
|||
{ |
|||
"culture": "en", |
|||
"texts": { |
|||
"DataProtectionManagement:001100": "There already exists an entity type definition named {Name}!", |
|||
"DataProtectionManagement:001200": "The entity type already has a property definition named {Name}!", |
|||
"DataProtectionManagement:002100": "The {Operation} access rule for entity {Name} has been assigned to role {RoleName}!", |
|||
"DataProtectionManagement:003100": "The {Operation} access rule for entity {Name} has been assigned to organization {RoleName}!" |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"DataProtectionManagement:001100": "已经存在名为 {Name} 的实体类型定义!", |
|||
"DataProtectionManagement:001200": "实体类型已经存在名为 {Name} 的属性定义!", |
|||
"DataProtectionManagement:002100": "已为角色 {RoleName} 分配了实体 {Name} 的 {Operation} 访问规则!", |
|||
"DataProtectionManagement:003100": "已为组织机构 {OrgCode} 分配了实体 {Name} 的 {Operation} 访问规则!" |
|||
} |
|||
} |
|||
Loading…
Reference in new issue