Browse Source

feat: Optimize the multilingual management module

pull/1517/head
colin 3 months ago
parent
commit
122f544df2
  1. 1
      apps/vben5/packages/@abp/localization/package.json
  2. 25
      apps/vben5/packages/@abp/localization/src/api/useLanguagesApi.ts
  3. 25
      apps/vben5/packages/@abp/localization/src/api/useResourcesApi.ts
  4. 17
      apps/vben5/packages/@abp/localization/src/api/useTextsApi.ts
  5. 55
      apps/vben5/packages/@abp/localization/src/components/languages/LocalizationLanguageTable.vue
  6. 54
      apps/vben5/packages/@abp/localization/src/components/resources/LocalizationResourceTable.vue
  7. 30
      apps/vben5/packages/@abp/localization/src/components/texts/LocalizationTextModal.vue
  8. 78
      apps/vben5/packages/@abp/localization/src/components/texts/LocalizationTextTable.vue
  9. 9
      apps/vben5/packages/@abp/localization/src/types/languages.ts
  10. 9
      apps/vben5/packages/@abp/localization/src/types/resources.ts
  11. 4
      apps/vben5/packages/@abp/localization/src/types/texts.ts
  12. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.AIService/AIServiceModule.cs
  13. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.AIService/LINGYUN.Abp.MicroService.AIService.csproj
  14. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.cs
  15. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.AdminService/LINGYUN.Abp.MicroService.AdminService.csproj
  16. 3
      aspnet-core/aspire/LINGYUN.Abp.MicroService.IdentityService/IdentityServiceModule.cs
  17. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.IdentityService/LINGYUN.Abp.MicroService.IdentityService.csproj
  18. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/LINGYUN.Abp.MicroService.MessageService.csproj
  19. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/MessageServiceModule.cs
  20. 3
      aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/appsettings.json
  21. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.PlatformService/LINGYUN.Abp.MicroService.PlatformService.csproj
  22. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.PlatformService/PlatformServiceModule.cs
  23. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/LINGYUN.Abp.MicroService.TaskService.csproj
  24. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/TaskServiceModule.cs
  25. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WeChatService/LINGYUN.Abp.MicroService.WeChatService.csproj
  26. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WeChatService/WeChatServiceModule.cs
  27. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WebhookService/LINGYUN.Abp.MicroService.WebhookService.csproj
  28. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WebhookService/WebhookServiceModule.cs
  29. 1
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/LINGYUN.Abp.MicroService.WorkflowService.csproj
  30. 2
      aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.cs
  31. 2
      aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/AbpAspNetCoreMvcLocalizationModule.cs
  32. 6
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/ILanguageAppService.cs
  33. 3
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/IResourceAppService.cs
  34. 11
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/ITextAppService.cs
  35. 8
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/LanguageGetPagedListInput.cs
  36. 8
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/ResourceGetPagedListInput.cs
  37. 19
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDeleteInput.cs
  38. 11
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDifferenceDto.cs
  39. 18
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDifferenceGetListInput.cs
  40. 9
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDto.cs
  41. 15
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextGetByKeyInput.cs
  42. 23
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/LanguageAppService.cs
  43. 23
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/ResourceAppService.cs
  44. 78
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/TextAppService.cs
  45. 20
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain.Shared/LINGYUN/Abp/LocalizationManagement/Localization/Resources/en.json
  46. 20
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain.Shared/LINGYUN/Abp/LocalizationManagement/Localization/Resources/zh-Hans.json
  47. 65
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/DynamicLocalizationInitializerEventHandler.cs
  48. 15
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/ILanguageRepository.cs
  49. 15
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/IResourceRepository.cs
  50. 25
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreLanguageRepository.cs
  51. 25
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreResourceRepository.cs
  52. 5
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN.Abp.LocalizationManagement.HttpApi.csproj
  53. 8
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/AbpLocalizationManagementHttpApiModule.cs
  54. 7
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/LanguageController.cs
  55. 7
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/ResourceController.cs
  56. 24
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/TextController.cs
  57. 1
      aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj
  58. 3
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
  59. 3
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs
  60. 1
      aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj
  61. 2
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs
  62. 1
      aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj
  63. 1
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj
  64. 2
      aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs
  65. 1
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj
  66. 2
      aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs
  67. 1
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj
  68. 2
      aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs
  69. 1
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj
  70. 2
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs
  71. 1
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/LY.MicroService.WechatManagement.HttpApi.Host.csproj
  72. 2
      aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.cs
  73. 1
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj
  74. 2
      aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs

1
apps/vben5/packages/@abp/localization/package.json

@ -32,6 +32,7 @@
"@vben/icons": "workspace:*",
"@vben/layouts": "workspace:*",
"@vben/locales": "workspace:*",
"@vueuse/core": "catalog:",
"ant-design-vue": "catalog:",
"dayjs": "catalog:",
"vue": "catalog:",

25
apps/vben5/packages/@abp/localization/src/api/useLanguagesApi.ts

@ -1,9 +1,9 @@
import type { ListResultDto } from '@abp/core';
import type { PagedResultDto } from '@abp/core';
import type {
LanguageCreateDto,
LanguageDto,
LanguageGetListInput,
LanguageGetPagedListInput,
LanguageUpdateDto,
} from '../types/languages';
@ -13,20 +13,17 @@ export function useLanguagesApi() {
const { cancel, request } = useRequest();
/**
*
*
* @param input
* @returns
*/
function getListApi(
input?: LanguageGetListInput,
): Promise<ListResultDto<LanguageDto>> {
return request<ListResultDto<LanguageDto>>(
'/api/abp/localization/languages',
{
method: 'GET',
params: input,
},
);
function getPagedListApi(
input?: LanguageGetPagedListInput,
): Promise<PagedResultDto<LanguageDto>> {
return request<PagedResultDto<LanguageDto>>('/api/localization/languages', {
method: 'GET',
params: input,
});
}
/**
@ -83,7 +80,7 @@ export function useLanguagesApi() {
createApi,
deleteApi,
getApi,
getListApi,
getPagedListApi,
updateApi,
};
}

25
apps/vben5/packages/@abp/localization/src/api/useResourcesApi.ts

@ -1,9 +1,9 @@
import type { ListResultDto } from '@abp/core';
import type { PagedResultDto } from '@abp/core';
import type {
ResourceCreateDto,
ResourceDto,
ResourceGetListInput,
ResourceGetPagedListInput,
ResourceUpdateDto,
} from '../types/resources';
@ -13,20 +13,17 @@ export function useResourcesApi() {
const { cancel, request } = useRequest();
/**
*
*
* @param input
* @returns
*/
function getListApi(
input?: ResourceGetListInput,
): Promise<ListResultDto<ResourceDto>> {
return request<ListResultDto<ResourceDto>>(
'/api/abp/localization/resources',
{
method: 'GET',
params: input,
},
);
function getPagedListApi(
input?: ResourceGetPagedListInput,
): Promise<PagedResultDto<ResourceDto>> {
return request<PagedResultDto<ResourceDto>>('/api/localization/resources', {
method: 'GET',
params: input,
});
}
/**
@ -83,7 +80,7 @@ export function useResourcesApi() {
createApi,
deleteApi,
getApi,
getListApi,
getPagedListApi,
updateApi,
};
}

17
apps/vben5/packages/@abp/localization/src/api/useTextsApi.ts

@ -1,6 +1,7 @@
import type { ListResultDto } from '@abp/core';
import type {
DeleteTextInput,
GetTextByKeyInput,
GetTextsInput,
SetTextInput,
@ -22,7 +23,7 @@ export function useTextsApi() {
input: GetTextsInput,
): Promise<ListResultDto<TextDifferenceDto>> {
return request<ListResultDto<TextDifferenceDto>>(
'/api/abp/localization/texts',
'/api/localization/texts',
{
method: 'GET',
params: input,
@ -36,7 +37,7 @@ export function useTextsApi() {
* @returns
*/
function getApi(input: GetTextByKeyInput): Promise<TextDto> {
return request<TextDto>('/api/abp/localization/texts/by-culture-key', {
return request<TextDto>('/api/localization/texts/by-key', {
method: 'GET',
params: input,
});
@ -53,8 +54,20 @@ export function useTextsApi() {
});
}
/**
*
* @param input
*/
function deleteApi(input: DeleteTextInput): Promise<void> {
return request('/api/localization/texts', {
data: input,
method: 'DELETE',
});
}
return {
cancel,
deleteApi,
getApi,
getListApi,
setApi,

55
apps/vben5/packages/@abp/localization/src/components/languages/LocalizationLanguageTable.vue

@ -5,12 +5,12 @@ import type { VbenFormProps } from '@vben/common-ui';
import type { LanguageDto } from '../../types/languages';
import { defineAsyncComponent, h, onMounted, ref } from 'vue';
import { defineAsyncComponent, h } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { sortby, useAbpStore } from '@abp/core';
import { useAbpStore } from '@abp/core';
import { useVbenVxeGrid } from '@abp/ui';
import {
DeleteOutlined,
@ -27,19 +27,13 @@ defineOptions({
name: 'LocalizationLanguageTable',
});
const dataSource = ref<LanguageDto[]>([]);
const abpStore = useAbpStore();
const { deleteApi, getListApi } = useLanguagesApi();
const { deleteApi, getPagedListApi } = useLanguagesApi();
const { getLocalizationApi } = useLocalizationsApi();
const formOptions: VbenFormProps = {
//
collapsed: false,
handleReset: onReset,
async handleSubmit(params) {
await onGet(params);
},
schema: [
{
component: 'Input',
@ -89,20 +83,13 @@ const gridOptions: VxeGridProps<LanguageDto> = {
keepSource: true,
proxyConfig: {
ajax: {
query: async ({ page, sort }) => {
let items = sortby(dataSource.value, sort.field);
if (sort.order === 'desc') {
items = items.toReversed();
}
const result = {
totalCount: dataSource.value.length,
items: items.slice(
(page.currentPage - 1) * page.pageSize,
page.currentPage * page.pageSize,
),
};
return new Promise((resolve) => {
resolve(result);
query: async ({ page, sort }, formValues) => {
const sorting = sort.order ? `${sort.field} ${sort.order}` : undefined;
return await getPagedListApi({
sorting,
maxResultCount: page.pageSize,
skipCount: (page.currentPage - 1) * page.pageSize,
...formValues,
});
},
},
@ -137,23 +124,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
gridOptions,
});
async function onGet(input?: Record<string, string>) {
try {
gridApi.setLoading(true);
const { items } = await getListApi(input);
dataSource.value = items;
setTimeout(() => gridApi.reload(), 100);
} finally {
gridApi.setLoading(false);
}
}
async function onReset() {
await gridApi.formApi.resetForm();
const input = await gridApi.formApi.getValues();
await onGet(input);
}
function onCreate() {
modalApi.setData({});
modalApi.open();
@ -178,8 +148,6 @@ function onDelete(row: LanguageDto) {
}
async function onChange(data: LanguageDto) {
const input = await gridApi.formApi.getValues();
onGet(input);
//
const cultureName =
abpStore.application!.localization.currentCulture.cultureName;
@ -190,8 +158,6 @@ async function onChange(data: LanguageDto) {
abpStore.setLocalization(localization);
}
}
onMounted(onGet);
</script>
<template>
@ -218,7 +184,6 @@ onMounted(onGet);
{{ $t('AbpUi.Edit') }}
</Button>
<Button
v-if="!row.isStatic"
:icon="h(DeleteOutlined)"
block
danger

54
apps/vben5/packages/@abp/localization/src/components/resources/LocalizationResourceTable.vue

@ -5,12 +5,12 @@ import type { VbenFormProps } from '@vben/common-ui';
import type { ResourceDto } from '../../types/resources';
import { defineAsyncComponent, h, onMounted, ref } from 'vue';
import { defineAsyncComponent, h } from 'vue';
import { useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { sortby, useAbpStore } from '@abp/core';
import { useAbpStore } from '@abp/core';
import { useVbenVxeGrid } from '@abp/ui';
import {
DeleteOutlined,
@ -27,18 +27,13 @@ defineOptions({
name: 'LocalizationResourceTable',
});
const dataSource = ref<ResourceDto[]>([]);
const abpStore = useAbpStore();
const { deleteApi, getListApi } = useResourcesApi();
const { deleteApi, getPagedListApi } = useResourcesApi();
const { getLocalizationApi } = useLocalizationsApi();
const formOptions: VbenFormProps = {
//
collapsed: false,
handleReset: onReset,
async handleSubmit(params) {
await onGet(params);
},
schema: [
{
component: 'Input',
@ -81,20 +76,13 @@ const gridOptions: VxeGridProps<ResourceDto> = {
keepSource: true,
proxyConfig: {
ajax: {
query: async ({ page, sort }) => {
let items = sortby(dataSource.value, sort.field);
if (sort.order === 'desc') {
items = items.toReversed();
}
const result = {
totalCount: dataSource.value.length,
items: items.slice(
(page.currentPage - 1) * page.pageSize,
page.currentPage * page.pageSize,
),
};
return new Promise((resolve) => {
resolve(result);
query: async ({ page, sort }, formValues) => {
const sorting = sort.order ? `${sort.field} ${sort.order}` : undefined;
return await getPagedListApi({
sorting,
maxResultCount: page.pageSize,
skipCount: (page.currentPage - 1) * page.pageSize,
...formValues,
});
},
},
@ -129,23 +117,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
gridOptions,
});
async function onGet(input?: Record<string, string>) {
try {
gridApi.setLoading(true);
const { items } = await getListApi(input);
dataSource.value = items;
setTimeout(() => gridApi.reload(), 100);
} finally {
gridApi.setLoading(false);
}
}
async function onReset() {
await gridApi.formApi.resetForm();
const input = await gridApi.formApi.getValues();
await onGet(input);
}
function onCreate() {
modalApi.setData({});
modalApi.open();
@ -170,8 +141,6 @@ function onDelete(row: ResourceDto) {
}
async function onChange() {
const input = await gridApi.formApi.getValues();
onGet(input);
//
const cultureName = abpStore.localization!.currentCulture.cultureName;
const localization = await getLocalizationApi({
@ -179,8 +148,6 @@ async function onChange() {
});
abpStore.setLocalization(localization);
}
onMounted(onGet);
</script>
<template>
@ -207,7 +174,6 @@ onMounted(onGet);
{{ $t('AbpUi.Edit') }}
</Button>
<Button
v-if="!row.isStatic"
:icon="h(DeleteOutlined)"
block
danger

30
apps/vben5/packages/@abp/localization/src/components/texts/LocalizationTextModal.vue

@ -12,7 +12,7 @@ import type {
import {
defineEmits,
defineOptions,
onMounted,
defineProps,
ref,
toValue,
useTemplateRef,
@ -23,17 +23,24 @@ import { $t } from '@vben/locales';
import { Form, Input, message, Select, Textarea } from 'ant-design-vue';
import { useLanguagesApi } from '../../api/useLanguagesApi';
import { useResourcesApi } from '../../api/useResourcesApi';
import { useTextsApi } from '../../api/useTextsApi';
defineOptions({
name: 'LocalizationTextModal',
});
withDefaults(
defineProps<{
languages?: LanguageDto[];
resources?: ResourceDto[];
}>(),
{
languages: () => [],
resources: () => [],
},
);
const emits = defineEmits<{
(event: 'change', data: TextDto): void;
}>();
const FormItem = Form.Item;
const defaultModel = {} as TextDto;
@ -41,11 +48,7 @@ const defaultModel = {} as TextDto;
const isEditModal = ref(false);
const form = useTemplateRef<FormInstance>('form');
const formModel = ref<TextDto>({ ...defaultModel });
const resources = ref<ResourceDto[]>([]);
const languages = ref<LanguageDto[]>([]);
const { getListApi: getLanguagesApi } = useLanguagesApi();
const { getListApi: getResourcesApi } = useResourcesApi();
const { cancel, getApi, setApi } = useTextsApi();
const [Modal, modalApi] = useVbenModal({
@ -73,15 +76,6 @@ const [Modal, modalApi] = useVbenModal({
title: $t('LocalizationManagement.Text:AddNew'),
});
async function onInit() {
const [languageRes, resourceRes] = await Promise.all([
getLanguagesApi(),
getResourcesApi(),
]);
languages.value = languageRes.items;
resources.value = resourceRes.items;
}
async function onGet() {
const dto = modalApi.getData<TextDifferenceDto>();
if (dto.targetCultureName) {
@ -131,8 +125,6 @@ async function onSubmit() {
modalApi.setState({ submitting: false });
}
}
onMounted(onInit);
</script>
<template>

78
apps/vben5/packages/@abp/localization/src/components/texts/LocalizationTextTable.vue

@ -12,9 +12,14 @@ import { useVbenModal } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { sortby, useAbpStore } from '@abp/core';
import { useVbenVxeGrid } from '@abp/ui';
import { EditOutlined, PlusOutlined } from '@ant-design/icons-vue';
import { Button, Select } from 'ant-design-vue';
import { useMessage, useVbenVxeGrid } from '@abp/ui';
import {
DeleteOutlined,
EditOutlined,
PlusOutlined,
} from '@ant-design/icons-vue';
import { useDebounceFn } from '@vueuse/core';
import { Button, Modal, Select } from 'ant-design-vue';
import { useLanguagesApi } from '../../api/useLanguagesApi';
import { useLocalizationsApi } from '../../api/useLocalizationsApi';
@ -40,10 +45,11 @@ const targetValueOptions = reactive([
},
]);
const message = useMessage();
const abpStore = useAbpStore();
const { getListApi } = useTextsApi();
const { getListApi: getLanguagesApi } = useLanguagesApi();
const { getListApi: getResourcesApi } = useResourcesApi();
const { getListApi, deleteApi } = useTextsApi();
const { getPagedListApi: getLanguagesApi } = useLanguagesApi();
const { getPagedListApi: getResourcesApi } = useResourcesApi();
const { getLocalizationApi } = useLocalizationsApi();
const formOptions: VbenFormProps = {
@ -188,20 +194,27 @@ const [LocalizationTextModal, modalApi] = useVbenModal({
),
});
const onSearchLanguages = useDebounceFn((filter?: string) => {
getLanguagesApi({ filter, maxResultCount: 100 }).then((res) => {
languages.value = res.items;
});
}, 200);
const onSearchResources = useDebounceFn((filter?: string) => {
getResourcesApi({ filter, maxResultCount: 100 }).then((res) => {
resources.value = res.items;
});
}, 200);
async function onInit() {
const [languageRes, resourceRes] = await Promise.all([
getLanguagesApi(),
getResourcesApi(),
]);
languages.value = languageRes.items;
resources.value = resourceRes.items;
await Promise.all([onSearchLanguages(), onSearchResources()]);
}
function onFieldChange(fieldName: string, value?: string) {
gridApi.formApi.setFieldValue(fieldName, value);
}
async function onGet(input: Record<string, string>) {
async function onGet(input?: Record<string, string>) {
try {
gridApi.setLoading(true);
const { items } = await getListApi(input as any);
@ -232,6 +245,23 @@ function onUpdate(row: TextDifferenceDto) {
modalApi.open();
}
function onDelete(row: TextDifferenceDto) {
Modal.confirm({
centered: true,
content: `${$t('AbpUi.ItemWillBeDeletedMessageWithFormat', [row.key])}`,
onOk: async () => {
await deleteApi({
resourceName: row.resourceName,
cultureName: row.cultureName,
key: row.key,
});
message.success($t('AbpUi.DeletedSuccessfully'));
await onChange(row);
},
title: $t('AbpUi.AreYouSure'),
});
}
async function onChange(data: TextDto) {
const input = await gridApi.formApi.getValues();
onGet(input);
@ -255,32 +285,38 @@ onMounted(onInit);
<Select
class="w-full"
allow-clear
show-search
:options="languages"
:value="modelValue"
:field-names="{ label: 'displayName', value: 'cultureName' }"
@change="(value) => onFieldChange('cultureName', value?.toString())"
@search="onSearchLanguages"
/>
</template>
<template #form-targetCultureName="{ modelValue }">
<Select
class="w-full"
allow-clear
show-search
:options="languages"
:value="modelValue"
:field-names="{ label: 'displayName', value: 'cultureName' }"
@change="
(value) => onFieldChange('targetCultureName', value?.toString())
"
@search="onSearchLanguages"
/>
</template>
<template #form-resourceName="{ modelValue }">
<Select
class="w-full"
allow-clear
show-search
:options="resources"
:value="modelValue"
:field-names="{ label: 'displayName', value: 'name' }"
@change="(value) => onFieldChange('resourceName', value?.toString())"
@search="onSearchResources"
/>
</template>
<template #form-onlyNull="{ modelValue }">
@ -313,10 +349,24 @@ onMounted(onInit);
>
{{ $t('AbpUi.Edit') }}
</Button>
<Button
:icon="h(DeleteOutlined)"
block
type="link"
danger
v-access:code="[TextsPermissions.Delete]"
@click="onDelete(row)"
>
{{ $t('AbpUi.Delete') }}
</Button>
</div>
</template>
</Grid>
<LocalizationTextModal @change="onChange" />
<LocalizationTextModal
:resources="resources"
:languages="languages"
@change="onChange"
/>
</template>
<style scoped></style>

9
apps/vben5/packages/@abp/localization/src/types/languages.ts

@ -1,4 +1,7 @@
import type { AuditedEntityDto } from '@abp/core';
import type {
AuditedEntityDto,
PagedAndSortedResultRequestDto,
} from '@abp/core';
interface LanguageDto extends AuditedEntityDto<string> {
cultureName: string;
@ -7,7 +10,7 @@ interface LanguageDto extends AuditedEntityDto<string> {
uiCultureName: string;
}
interface LanguageGetListInput {
interface LanguageGetPagedListInput extends PagedAndSortedResultRequestDto {
filter?: string;
}
@ -25,6 +28,6 @@ type LanguageUpdateDto = LanguageCreateOrUpdateDto;
export type {
LanguageCreateDto,
LanguageDto,
LanguageGetListInput,
LanguageGetPagedListInput,
LanguageUpdateDto,
};

9
apps/vben5/packages/@abp/localization/src/types/resources.ts

@ -1,4 +1,7 @@
import type { AuditedEntityDto } from '@abp/core';
import type {
AuditedEntityDto,
PagedAndSortedResultRequestDto,
} from '@abp/core';
interface ResourceDto extends AuditedEntityDto<string> {
defaultCultureName?: string;
@ -21,13 +24,13 @@ interface ResourceCreateDto extends ResourceCreateOrUpdateDto {
type ResourceUpdateDto = ResourceCreateOrUpdateDto;
interface ResourceGetListInput {
interface ResourceGetPagedListInput extends PagedAndSortedResultRequestDto {
filter?: string;
}
export type {
ResourceCreateDto,
ResourceDto,
ResourceGetListInput,
ResourceGetPagedListInput,
ResourceUpdateDto,
};

4
apps/vben5/packages/@abp/localization/src/types/texts.ts

@ -19,7 +19,7 @@ interface SetTextInput {
value: string;
}
interface RestoreDefaultTextInput {
interface DeleteTextInput {
cultureName: string;
key: string;
resourceName: string;
@ -42,9 +42,9 @@ interface TextDto {
}
export type {
DeleteTextInput,
GetTextByKeyInput,
GetTextsInput,
RestoreDefaultTextInput,
SetTextInput,
TextDifferenceDto,
TextDto,

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.AIService/AIServiceModule.cs

@ -4,7 +4,6 @@ using LINGYUN.Abp.AI.Tools.Http;
using LINGYUN.Abp.AI.Tools.Mcp;
using LINGYUN.Abp.AIManagement;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Claims.Mapping;
@ -41,7 +40,6 @@ namespace LINGYUN.Abp.MicroService.AIService;
typeof(AbpLoggingSerilogElasticsearchModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpPermissionManagementDomainOpenIddictModule),

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.AIService/LINGYUN.Abp.MicroService.AIService.csproj

@ -46,7 +46,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\features\LINGYUN.Abp.FeatureManagement.Client\LINGYUN.Abp.FeatureManagement.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Logging.Serilog.Elasticsearch\LINGYUN.Abp.Logging.Serilog.Elasticsearch.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.AdminService/AdminServiceModule.cs

@ -1,6 +1,5 @@
using LINGYUN.Abp.Aliyun.SettingManagement;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.Auditing;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
@ -52,7 +51,6 @@ namespace LINGYUN.Abp.MicroService.AdminService;
typeof(AbpLoggingSerilogElasticsearchModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
// 设置管理
typeof(AbpAliyunSettingManagementModule),

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.AdminService/LINGYUN.Abp.MicroService.AdminService.csproj

@ -47,7 +47,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\features\LINGYUN.Abp.FeatureManagement.Client\LINGYUN.Abp.FeatureManagement.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Logging.Serilog.Elasticsearch\LINGYUN.Abp.Logging.Serilog.Elasticsearch.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />

3
aspnet-core/aspire/LINGYUN.Abp.MicroService.IdentityService/IdentityServiceModule.cs

@ -1,6 +1,5 @@
using LINGYUN.Abp.Account;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -35,7 +34,6 @@ using Volo.Abp.Autofac;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.IdentityModel.Web;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
@ -50,7 +48,6 @@ namespace LINGYUN.Abp.MicroService.IdentityService;
typeof(AbpSerilogEnrichersUniqueIdModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpIdentityAspNetCoreModule),

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.IdentityService/LINGYUN.Abp.MicroService.IdentityService.csproj

@ -49,7 +49,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\exporter\LINGYUN.Abp.Exporter.MiniSoftware\LINGYUN.Abp.Exporter.MiniSoftware.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/LINGYUN.Abp.MicroService.MessageService.csproj

@ -45,7 +45,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation.Redis.Client\LINGYUN.Abp.Features.LimitValidation.Redis.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/MessageServiceModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -67,7 +66,6 @@ namespace LINGYUN.Abp.MicroService.MessageService;
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpMessageServiceApplicationModule),
typeof(AbpMessageServiceHttpApiModule),
typeof(AbpNotificationsApplicationModule),

3
aspnet-core/aspire/LINGYUN.Abp.MicroService.MessageService/appsettings.json

@ -1,7 +1,4 @@
{
"Clock": {
"Kind": "Utc"
},
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.PlatformService/LINGYUN.Abp.MicroService.PlatformService.csproj

@ -50,7 +50,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation.Redis.Client\LINGYUN.Abp.Features.LimitValidation.Redis.Client.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Sms.Aliyun\LINGYUN.Abp.Sms.Aliyun.csproj" />
<ProjectReference Include="..\..\framework\features\LINGYUN.Abp.Features.Client\LINGYUN.Abp.Features.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.PlatformService/PlatformServiceModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -55,7 +54,6 @@ namespace LINGYUN.Abp.MicroService.PlatformService;
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpBlobManagementApplicationModule),
typeof(AbpBlobManagementAliyunModule),

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/LINGYUN.Abp.MicroService.TaskService.csproj

@ -45,7 +45,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.Elasticsearch\LINGYUN.Abp.AuditLogging.Elasticsearch.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.TaskService/TaskServiceModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -54,7 +53,6 @@ namespace LINGYUN.Abp.MicroService.TaskService;
typeof(AbpEmailingExceptionHandlingModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpElasticsearchJobsModule),
typeof(AbpIdentityJobsModule),
typeof(AbpBackgroundTasksJobsModule),

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.WeChatService/LINGYUN.Abp.MicroService.WeChatService.csproj

@ -51,7 +51,6 @@
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj" />
<ProjectReference Include="..\..\framework\tenants\LINGYUN.Abp.MultiTenancy.Editions\LINGYUN.Abp.MultiTenancy.Editions.csproj" />
<ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.Identity.WeChat.Work\LINGYUN.Abp.Identity.WeChat.Work.csproj" />

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WeChatService/WeChatServiceModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -72,7 +71,6 @@ namespace LINGYUN.Abp.MicroService.WeChatService;
typeof(AbpCAPEventBusModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpSwashbuckleModule),

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.WebhookService/LINGYUN.Abp.MicroService.WebhookService.csproj

@ -47,7 +47,6 @@
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj" />
<ProjectReference Include="..\..\framework\telemetry\LINGYUN.Abp.Telemetry.OpenTelemetry\LINGYUN.Abp.Telemetry.OpenTelemetry.csproj" />
<ProjectReference Include="..\..\framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj" />

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WebhookService/WebhookServiceModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -55,7 +54,6 @@ namespace LINGYUN.Abp.MicroService.WebhookService;
typeof(AbpCAPEventBusModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpSwashbuckleModule),

1
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/LINGYUN.Abp.MicroService.WorkflowService.csproj

@ -53,7 +53,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Http.Client.Wrapper\LINGYUN.Abp.Http.Client.Wrapper.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

2
aspnet-core/aspire/LINGYUN.Abp.MicroService.WorkflowService/WorkflowServiceModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -60,7 +59,6 @@ namespace LINGYUN.Abp.MicroService.WorkflowService;
typeof(AbpEmailingExceptionHandlingModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpBackgroundTasksQuartzModule),
typeof(AbpBackgroundTasksDistributedLockingModule),
typeof(AbpBackgroundTasksExceptionHandlingModule),

2
aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/AbpAspNetCoreMvcLocalizationModule.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.Localization;
@ -9,6 +10,7 @@ using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.AspNetCore.Mvc.Localization;
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
[Obsolete("This module has been deprecated. Please use the LocalizationManagement module instead.")]
public class AbpAspNetCoreMvcLocalizationModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)

6
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/ILanguageAppService.cs

@ -1,5 +1,5 @@
using System;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.LocalizationManagement;
@ -10,6 +10,8 @@ public interface ILanguageAppService : IApplicationService
Task<LanguageDto> CreateAsync(LanguageCreateDto input);
Task<PagedResultDto<LanguageDto>> GetListAsync(LanguageGetPagedListInput input);
Task<LanguageDto> UpdateAsync(string name, LanguageUpdateDto input);
Task DeleteAsync(string name);

3
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/IResourceAppService.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.LocalizationManagement;
@ -11,5 +12,7 @@ public interface IResourceAppService : IApplicationService
Task<ResourceDto> UpdateAsync(string name, ResourceUpdateDto input);
Task<PagedResultDto<ResourceDto>> GetListAsync(ResourceGetPagedListInput input);
Task DeleteAsync(string name);
}

11
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/ITextAppService.cs

@ -1,11 +1,20 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.LocalizationManagement;
public interface ITextAppService : IApplicationService
{
Task<TextDto> GetByKeyAsync(TextGetByKeyInput input);
Task<ListResultDto<TextDifferenceDto>> GetDifferencesAsync(TextDifferenceGetListInput input);
Task SetTextAsync(SetTextInput input);
Task DeleteAsync(TextDeleteInput input);
[Obsolete("This interface will be removed in the next version. Please use DeleteAsync instead.")]
Task RestoreToDefaultAsync(RestoreDefaultTextInput input);
}

8
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/LanguageGetPagedListInput.cs

@ -0,0 +1,8 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.LocalizationManagement;
public class LanguageGetPagedListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}

8
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/ResourceGetPagedListInput.cs

@ -0,0 +1,8 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.LocalizationManagement;
public class ResourceGetPagedListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}

19
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDeleteInput.cs

@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
namespace LINGYUN.Abp.LocalizationManagement;
public class TextDeleteInput
{
[Required]
[DynamicStringLength(typeof(ResourceConsts), nameof(ResourceConsts.MaxNameLength))]
public string ResourceName { get; set; }
[Required]
[DynamicStringLength(typeof(TextConsts), nameof(TextConsts.MaxKeyLength))]
public string Key { get; set; }
[Required]
[DynamicStringLength(typeof(LanguageConsts), nameof(LanguageConsts.MaxCultureNameLength))]
public string CultureName { get; set; }
}

11
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDifferenceDto.cs

@ -0,0 +1,11 @@
namespace LINGYUN.Abp.LocalizationManagement;
public class TextDifferenceDto
{
public string CultureName { get; set; }
public string Key { get; set; }
public string Value { get; set; }
public string ResourceName { get; set; }
public string TargetCultureName { get; set; }
public string TargetValue { get; set; }
}

18
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDifferenceGetListInput.cs

@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.LocalizationManagement;
public class TextDifferenceGetListInput
{
[Required]
public string CultureName { get; set; }
[Required]
public string TargetCultureName { get; set; }
public string ResourceName { get; set; }
public bool? OnlyNull { get; set; }
public string Filter { get; set; }
}

9
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextDto.cs

@ -0,0 +1,9 @@
namespace LINGYUN.Abp.LocalizationManagement;
public class TextDto
{
public string Key { get; set; }
public string Value { get; set; }
public string CultureName { get; set; }
public string ResourceName { get; set; }
}

15
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application.Contracts/LINGYUN/Abp/LocalizationManagement/TextGetByKeyInput.cs

@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.LocalizationManagement;
public class TextGetByKeyInput
{
[Required]
public string Key { get; set; }
[Required]
public string CultureName { get; set; }
[Required]
public string ResourceName { get; set; }
}

23
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/LanguageAppService.cs

@ -1,9 +1,14 @@
using LINGYUN.Abp.LocalizationManagement.Features;
using LINGYUN.Abp.LocalizationManagement.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.Localization;
@ -78,6 +83,24 @@ public class LanguageAppService : LocalizationAppServiceBase, ILanguageAppServic
return ObjectMapper.Map<Language, LanguageDto>(language);
}
public async virtual Task<PagedResultDto<LanguageDto>> GetListAsync(LanguageGetPagedListInput input)
{
Expression<Func<Language, bool>> predicate = _ => true;
if (!input.Filter.IsNullOrWhiteSpace())
{
predicate = predicate.And(x => x.CultureName.Contains(input.Filter) ||
x.UiCultureName.Contains(input.Filter) || x.DisplayName.Contains(input.Filter));
}
var specification = new Volo.Abp.Specifications.ExpressionSpecification<Language>(predicate);
var totalCount = await _repository.GetCountAsync(specification);
var languages = await _repository.GetListAsync(specification,
input.Sorting, input.MaxResultCount, input.SkipCount);
return new PagedResultDto<LanguageDto>(totalCount,
ObjectMapper.Map<List<Language>, List<LanguageDto>>(languages));
}
private async Task<Language> InternalGetByNameAsync(string name)
{
var language = await _repository.FindByCultureNameAsync(name);

23
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/ResourceAppService.cs

@ -1,8 +1,13 @@
using LINGYUN.Abp.LocalizationManagement.Features;
using LINGYUN.Abp.LocalizationManagement.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
namespace LINGYUN.Abp.LocalizationManagement;
@ -74,6 +79,24 @@ public class ResourceAppService : LocalizationAppServiceBase, IResourceAppServic
return ObjectMapper.Map<Resource, ResourceDto>(resource);
}
public async virtual Task<PagedResultDto<ResourceDto>> GetListAsync(ResourceGetPagedListInput input)
{
Expression<Func<Resource, bool>> predicate = _ => true;
if (!input.Filter.IsNullOrWhiteSpace())
{
predicate = predicate.And(x => x.Name.Contains(input.Filter) ||
x.DisplayName.Contains(input.Filter) || x.Description.Contains(input.Filter));
}
var specification = new Volo.Abp.Specifications.ExpressionSpecification<Resource>(predicate);
var totalCount = await _repository.GetCountAsync(specification);
var languages = await _repository.GetListAsync(specification,
input.Sorting, input.MaxResultCount, input.SkipCount);
return new PagedResultDto<ResourceDto>(totalCount,
ObjectMapper.Map<List<Resource>, List<ResourceDto>>(languages));
}
private async Task<Resource> InternalGetByNameAsync(string name)
{
var resource = await _repository.FindByNameAsync(name);

78
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/TextAppService.cs

@ -1,7 +1,11 @@
using LINGYUN.Abp.LocalizationManagement.Features;
using LINGYUN.Abp.LocalizationManagement.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
namespace LINGYUN.Abp.LocalizationManagement;
@ -16,6 +20,67 @@ public class TextAppService : LocalizationAppServiceBase, ITextAppService
_textRepository = repository;
}
public async virtual Task<TextDto> GetByKeyAsync(TextGetByKeyInput input)
{
var text = await _textRepository.GetByCultureKeyAsync(input.ResourceName, input.CultureName, input.Key);
return new TextDto
{
Key = input.Key,
CultureName = input.CultureName,
ResourceName = input.ResourceName,
Value = text?.Value
};
}
public async virtual Task<ListResultDto<TextDifferenceDto>> GetDifferencesAsync(TextDifferenceGetListInput input)
{
Expression<Func<Text, bool>> basicPredicate = _ => true;
if (!input.ResourceName.IsNullOrWhiteSpace())
{
basicPredicate = basicPredicate.And(x => x.ResourceName == input.ResourceName);
}
if (!input.Filter.IsNullOrWhiteSpace())
{
basicPredicate = basicPredicate.And(x => x.ResourceName.Contains(input.Filter) || x.Key.Contains(input.Filter));
}
var queryable = await _textRepository.GetQueryableAsync();
var sourceQueryable = queryable.Where(basicPredicate.And(x => x.CultureName == input.CultureName));
var targetQueryable = queryable.Where(basicPredicate.And(x => x.CultureName == input.TargetCultureName));
var query = from source in sourceQueryable
join target in targetQueryable
on new { source.ResourceName, source.Key }
equals new { target.ResourceName, target.Key } into joined
from target in joined.DefaultIfEmpty()
select new
{
Source = source,
Target = target,
IsMissingOrEmpty = target == null || string.IsNullOrEmpty(target.Value)
};
if (input.OnlyNull == true)
{
query = query.Where(x => x.IsMissingOrEmpty);
}
var texts = await AsyncExecuter.ToListAsync(query
.Select(x => new TextDifferenceDto
{
ResourceName = x.Source.ResourceName,
CultureName = x.Source.CultureName,
Key = x.Source.Key,
Value = x.Source.Value,
TargetCultureName = input.TargetCultureName,
TargetValue = x.Target != null ? x.Target.Value : null,
}));
return new ListResultDto<TextDifferenceDto>(texts);
}
public async virtual Task SetTextAsync(SetTextInput input)
{
var text = await _textRepository.GetByCultureKeyAsync(input.ResourceName, input.CultureName, input.Key);
@ -44,6 +109,19 @@ public class TextAppService : LocalizationAppServiceBase, ITextAppService
}
[Authorize(LocalizationManagementPermissions.Text.Delete)]
public async virtual Task DeleteAsync(TextDeleteInput input)
{
var text = await _textRepository.GetByCultureKeyAsync(input.ResourceName, input.CultureName, input.Key);
if (text != null)
{
await _textRepository.DeleteAsync(text);
await CurrentUnitOfWork.SaveChangesAsync();
}
}
[Authorize(LocalizationManagementPermissions.Text.Delete)]
[Obsolete("This interface will be removed in the next version. Please use DeleteAsync instead.")]
public async virtual Task RestoreToDefaultAsync(RestoreDefaultTextInput input)
{
var text = await _textRepository.GetByCultureKeyAsync(input.ResourceName, input.CultureName, input.Key);

20
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain.Shared/LINGYUN/Abp/LocalizationManagement/Localization/Resources/en.json

@ -27,6 +27,24 @@
"Localization:001100": "Language {CultureName} already exists!",
"Localization:001400": "Language name {CultureName} not found or built-in language operation not allowed!",
"Localization:002100": "Resource {Name} already exists!",
"Localization:002400": "Resource Name {Name} not found or built-in resource operation not allowed!"
"Localization:002400": "Resource Name {Name} not found or built-in resource operation not allowed!",
"Languages": "Languages",
"Resources": "Resources",
"Texts": "Texts",
"DisplayName:Key": "Key",
"DisplayName:Value": "Value",
"DisplayName:Name": "Name",
"DisplayName:CultureName": "Culture Name",
"DisplayName:ResourceName": "Resource Name",
"DisplayName:TargetCultureName": "Target Culture",
"DisplayName:TargetValue": "Target Value",
"DisplayName:Any": "Any",
"DisplayName:OnlyNull": "Only Null",
"DisplayName:Filter": "Filter",
"DisplayName:UiCultureName": "Ui Culture Name",
"DisplayName:DisplayName": "Display Name",
"DisplayName:FlagIcon": "Flag Icon",
"DisplayName:Description": "Description",
"DisplayName:DefaultCultureName": "Default Culture"
}
}

20
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain.Shared/LINGYUN/Abp/LocalizationManagement/Localization/Resources/zh-Hans.json

@ -27,6 +27,24 @@
"Localization:001100": "语言 {CultureName} 已经存在!",
"Localization:001400": "没有找到名为 {CultureName} 的语言名称或内置语言不允许操作!",
"Localization:002100": "资源 {Name} 已经存在!",
"Localization:002400": "没有找到名为 {Name} 的资源名称或内置资源不允许操作!"
"Localization:002400": "没有找到名为 {Name} 的资源名称或内置资源不允许操作!",
"Languages": "语言",
"Resources": "资源",
"Texts": "文档",
"DisplayName:Key": "键名",
"DisplayName:Value": "键值",
"DisplayName:Name": "名称",
"DisplayName:CultureName": "文化名称",
"DisplayName:ResourceName": "资源名称",
"DisplayName:TargetCultureName": "目标文化",
"DisplayName:TargetValue": "目标值",
"DisplayName:Any": "所有",
"DisplayName:OnlyNull": "仅限空值",
"DisplayName:Filter": "筛选",
"DisplayName:UiCultureName": "Ui文件名称",
"DisplayName:DisplayName": "显示名称",
"DisplayName:FlagIcon": "旗帜图标",
"DisplayName:Description": "描述",
"DisplayName:DefaultCultureName": "默认文化"
}
}

65
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/DynamicLocalizationInitializerEeventHandler.cs → aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/DynamicLocalizationInitializerEventHandler.cs

@ -10,6 +10,9 @@ using Volo.Abp;
using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DistributedLocking;
using Volo.Abp.Domain.ChangeTracking;
using Volo.Abp.Domain.Entities.Events;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Guids;
using Volo.Abp.Localization;
@ -17,10 +20,13 @@ using Volo.Abp.Uow;
namespace LINGYUN.Abp.LocalizationManagement;
public class DynamicLocalizationInitializerEeventHandler :
public class DynamicLocalizationInitializerEventHandler :
IDistributedEventHandler<DynamicLanguageInitializerEto>,
IDistributedEventHandler<DynamicResourceInitializerEto>,
IDistributedEventHandler<DynamicTextInitializerEto>,
ILocalEventHandler<EntityChangedEventData<Resource>>,
ILocalEventHandler<EntityChangedEventData<Language>>,
ILocalEventHandler<EntityChangedEventData<Text>>,
ITransientDependency
{
public ILogger<StaticLocalizationSaver> Logger { protected get; set; }
@ -45,7 +51,7 @@ public class DynamicLocalizationInitializerEeventHandler :
protected IResourceRepository ResourceRepository { get; }
protected ITextRepository TextRepository { get; }
public DynamicLocalizationInitializerEeventHandler(
public DynamicLocalizationInitializerEventHandler(
IDistributedCache<LocalizationResourceCacheItem> resourceCache,
IDistributedCache<LocalizationResourcesCacheItem> resourcesCache,
IDistributedCache<LocalizationLanguageCacheItem> languageCache,
@ -81,6 +87,19 @@ public class DynamicLocalizationInitializerEeventHandler :
Logger = NullLogger<StaticLocalizationSaver>.Instance;
}
[DisableEntityChangeTracking]
public async virtual Task HandleEventAsync(EntityChangedEventData<Language> eventData)
{
Logger.LogInformation("Languages have changed. Refresh the language cache.");
await RefreshLanguagesCacheAsync();
await DistributedEventBus.PublishAsync(new DynamicLocalizationChangedEto());
Logger.LogInformation("Language cache has been refreshed.");
}
[DisableEntityChangeTracking]
public async virtual Task HandleEventAsync(DynamicLanguageInitializerEto eventData)
{
if (!LocalizationManagementOptions.SaveStaticLocalizationsToDatabase ||
@ -92,7 +111,7 @@ public class DynamicLocalizationInitializerEeventHandler :
Logger.LogDebug("Waiting to acquire the distributed lock for saving static languages...");
await using var applicationLockHandle = await DistributedLock.TryAcquireAsync(
$"{nameof(DynamicLocalizationInitializerEeventHandler)}_{nameof(DynamicLanguageInitializerEto)}",
$"{nameof(DynamicLocalizationInitializerEventHandler)}_{nameof(DynamicLanguageInitializerEto)}",
TimeSpan.FromSeconds(5));
if (applicationLockHandle == null)
{
@ -117,6 +136,19 @@ public class DynamicLocalizationInitializerEeventHandler :
Logger.LogInformation("Completed to save static languages.");
}
[DisableEntityChangeTracking]
public async virtual Task HandleEventAsync(EntityChangedEventData<Resource> eventData)
{
Logger.LogInformation("Resources have changed. Refresh the resource cache.");
await RefreshResourcesCacheAsync();
await DistributedEventBus.PublishAsync(new DynamicLocalizationChangedEto());
Logger.LogInformation("Resource cache has been refreshed.");
}
[DisableEntityChangeTracking]
public async virtual Task HandleEventAsync(DynamicResourceInitializerEto eventData)
{
if (!LocalizationManagementOptions.SaveStaticLocalizationsToDatabase ||
@ -128,7 +160,7 @@ public class DynamicLocalizationInitializerEeventHandler :
Logger.LogDebug("Waiting to acquire the distributed lock for saving static resources...");
await using var applicationLockHandle = await DistributedLock.TryAcquireAsync(
$"{nameof(DynamicLocalizationInitializerEeventHandler)}_{nameof(DynamicResourceInitializerEto)}",
$"{nameof(DynamicLocalizationInitializerEventHandler)}_{nameof(DynamicResourceInitializerEto)}",
TimeSpan.FromSeconds(5));
if (applicationLockHandle == null)
{
@ -153,6 +185,29 @@ public class DynamicLocalizationInitializerEeventHandler :
Logger.LogInformation("Completed to save static resources.");
}
[DisableEntityChangeTracking]
public async virtual Task HandleEventAsync(EntityChangedEventData<Text> eventData)
{
Logger.LogInformation("Texts have changed. Refresh the text cache.");
var setTexts = new Dictionary<string, string>();
var allTexts = await TextRepository.GetListAsync(eventData.Entity.ResourceName, eventData.Entity.CultureName);
foreach (var text in allTexts)
{
setTexts[text.Key] = text.Value;
}
var textCacheKey = LocalizationTextCacheItem.CalculateCacheKey(eventData.Entity.ResourceName, eventData.Entity.CultureName);
var textCacheItem = new LocalizationTextCacheItem(eventData.Entity.ResourceName, eventData.Entity.CultureName, setTexts);
await LocalizationTextCache.SetAsync(textCacheKey, textCacheItem);
await DistributedEventBus.PublishAsync(new DynamicLocalizationChangedEto());
Logger.LogInformation("Text cache has been refreshed.");
}
[DisableEntityChangeTracking]
public async virtual Task HandleEventAsync(DynamicTextInitializerEto eventData)
{
if (!LocalizationManagementOptions.SaveStaticLocalizationsToDatabase ||
@ -164,7 +219,7 @@ public class DynamicLocalizationInitializerEeventHandler :
Logger.LogDebug("Waiting to acquire the distributed lock for saving static texts...");
await using var applicationLockHandle = await DistributedLock.TryAcquireAsync(
$"{nameof(DynamicLocalizationInitializerEeventHandler)}_{nameof(DynamicTextInitializerEto)}",
$"{nameof(DynamicLocalizationInitializerEventHandler)}_{nameof(DynamicTextInitializerEto)}",
TimeSpan.FromSeconds(5));
if (applicationLockHandle == null)
{

15
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/ILanguageRepository.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Specifications;
namespace LINGYUN.Abp.LocalizationManagement;
@ -12,5 +13,17 @@ public interface ILanguageRepository : IRepository<Language, Guid>
string cultureName,
CancellationToken cancellationToken = default);
Task<List<Language>> GetActivedListAsync(CancellationToken cancellationToken = default);
Task<List<Language>> GetActivedListAsync(
CancellationToken cancellationToken = default);
Task<int> GetCountAsync(
ISpecification<Language> specification,
CancellationToken cancellationToken = default);
Task<List<Language>> GetListAsync(
ISpecification<Language> specification,
string sorting = nameof(Language.CultureName),
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default);
}

15
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/IResourceRepository.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Specifications;
namespace LINGYUN.Abp.LocalizationManagement;
@ -18,5 +19,17 @@ public interface IResourceRepository : IRepository<Resource, Guid>
string name,
CancellationToken cancellationToken = default);
Task<List<Resource>> GetActivedListAsync(CancellationToken cancellationToken = default);
Task<List<Resource>> GetActivedListAsync(
CancellationToken cancellationToken = default);
Task<int> GetCountAsync(
ISpecification<Resource> specification,
CancellationToken cancellationToken = default);
Task<List<Resource>> GetListAsync(
ISpecification<Resource> specification,
string sorting = nameof(Resource.Name),
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default);
}

25
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreLanguageRepository.cs

@ -2,10 +2,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Specifications;
namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
@ -30,4 +32,27 @@ public class EfCoreLanguageRepository : EfCoreRepository<ILocalizationDbContext,
return await (await GetDbSetAsync()).Where(x => x.Enable)
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<int> GetCountAsync(
ISpecification<Language> specification,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.CountAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<List<Language>> GetListAsync(
ISpecification<Language> specification,
string sorting = nameof(Language.CultureName),
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.OrderBy(!sorting.IsNullOrWhiteSpace() ? sorting : nameof(Language.CultureName))
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}
}

25
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore/LINGYUN/Abp/LocalizationManagement/EntityFrameworkCore/EfCoreResourceRepository.cs

@ -2,10 +2,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Specifications;
using Volo.Abp.Threading;
namespace LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
@ -47,4 +49,27 @@ public class EfCoreResourceRepository : EfCoreRepository<ILocalizationDbContext,
return await (await GetDbSetAsync()).Where(x => x.Enable)
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<int> GetCountAsync(
ISpecification<Resource> specification,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.CountAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<List<Resource>> GetListAsync(
ISpecification<Resource> specification,
string sorting = nameof(Resource.Name),
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.OrderBy(!sorting.IsNullOrWhiteSpace() ? sorting : nameof(Resource.Name))
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}
}

5
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN.Abp.LocalizationManagement.HttpApi.csproj

@ -14,7 +14,10 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.LocalizationManagement.Application.Contracts\LINGYUN.Abp.LocalizationManagement.Application.Contracts.csproj" />
</ItemGroup>

8
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/AbpLocalizationManagementHttpApiModule.cs

@ -1,6 +1,6 @@
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.LocalizationManagement.Localization;
using LINGYUN.Abp.LocalizationManagement.Localization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpLocalization;
@ -10,8 +10,8 @@ using Volo.Abp.Validation.Localization;
namespace LINGYUN.Abp.LocalizationManagement;
[DependsOn(
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpLocalizationManagementApplicationContractsModule))]
typeof(AbpLocalizationManagementApplicationContractsModule),
typeof(AbpAspNetCoreMvcModule))]
public class AbpLocalizationManagementHttpApiModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)

7
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/LanguageController.cs

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.LocalizationManagement;
@ -26,6 +27,12 @@ public class LanguageController : AbpControllerBase, ILanguageAppService
return _service.GetByNameAsync(name);
}
[HttpGet]
public virtual Task<PagedResultDto<LanguageDto>> GetListAsync(LanguageGetPagedListInput input)
{
return _service.GetListAsync(input);
}
[HttpPost]
[Authorize(LocalizationManagementPermissions.Language.Create)]
public virtual Task<LanguageDto> CreateAsync(LanguageCreateDto input)

7
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/ResourceController.cs

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.LocalizationManagement;
@ -27,6 +28,12 @@ public class ResourceController : AbpControllerBase, IResourceAppService
return _service.GetByNameAsync(name);
}
[HttpGet]
public virtual Task<PagedResultDto<ResourceDto>> GetListAsync(ResourceGetPagedListInput input)
{
return _service.GetListAsync(input);
}
[HttpPost]
[Authorize(LocalizationManagementPermissions.Resource.Create)]
public virtual Task<ResourceDto> CreateAsync(ResourceCreateDto input)

24
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/TextController.cs

@ -1,6 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.LocalizationManagement;
@ -17,15 +19,35 @@ public class TextController : AbpControllerBase, ITextAppService
_service = service;
}
[HttpGet]
[Route("by-key")]
public virtual Task<TextDto> GetByKeyAsync(TextGetByKeyInput input)
{
return _service.GetByKeyAsync(input);
}
[HttpGet]
public virtual Task<ListResultDto<TextDifferenceDto>> GetDifferencesAsync(TextDifferenceGetListInput input)
{
return _service.GetDifferencesAsync(input);
}
[HttpPut]
public virtual Task SetTextAsync(SetTextInput input)
{
return _service.SetTextAsync(input);
}
[HttpDelete]
public virtual Task DeleteAsync([FromBody] TextDeleteInput input)
{
return _service.DeleteAsync(input);
}
[HttpDelete]
[Route("restore-to-default")]
public virtual Task RestoreToDefaultAsync(RestoreDefaultTextInput input)
[Obsolete("This interface will be removed in the next version. Please use DeleteAsync instead.")]
public virtual Task RestoreToDefaultAsync([FromBody] RestoreDefaultTextInput input)
{
return _service.RestoreToDefaultAsync(input);
}

1
aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj

@ -95,7 +95,6 @@
<ProjectReference Include="..\..\framework\dynamic-queryable\LINGYUN.Linq.Dynamic.Queryable\LINGYUN.Linq.Dynamic.Queryable.csproj" />
<ProjectReference Include="..\..\framework\exporter\LINGYUN.Abp.Exporter.MiniSoftware\LINGYUN.Abp.Exporter.MiniSoftware.csproj" />
<ProjectReference Include="..\..\framework\features\LINGYUN.Abp.FeatureManagement.Client\LINGYUN.Abp.FeatureManagement.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Logging.Serilog.Elasticsearch\LINGYUN.Abp.Logging.Serilog.Elasticsearch.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Logging\LINGYUN.Abp.Logging.csproj" />

3
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.BlobManagement.MimeCheck;
using LINGYUN.Abp.Exporter.MiniSoftware;
using LINGYUN.Abp.Identity.Jobs;
using LINGYUN.Abp.Notifications.Calendar;
@ -300,8 +299,6 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpFeaturesValidationRedisClientModule),
// 功能管理模块 Mvc视图
typeof(AbpFeatureManagementWebModule),
// 多语言模块
typeof(AbpAspNetCoreMvcLocalizationModule),
// 多语言模块 语言映射
typeof(AbpLocalizationCultureMapModule),

3
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/AuthServerHttpApiHostModule.cs

@ -1,6 +1,5 @@
using LINGYUN.Abp.Account;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -37,7 +36,6 @@ using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.IdentityModel.Web;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
@ -52,7 +50,6 @@ namespace LY.MicroService.AuthServer;
typeof(AbpSerilogEnrichersUniqueIdModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpIdentityApplicationModule),

1
aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/LY.MicroService.AuthServer.HttpApi.Host.csproj

@ -50,7 +50,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\efcore\LINGYUN.Abp.EntityFrameworkCore.MySQL.Microting\LINGYUN.Abp.EntityFrameworkCore.MySQL.Microting.csproj" />
<ProjectReference Include="..\..\framework\exporter\LINGYUN.Abp.Exporter.MiniSoftware\LINGYUN.Abp.Exporter.MiniSoftware.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

2
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/BackendAdminHttpApiHostModule.cs

@ -1,6 +1,5 @@
using LINGYUN.Abp.Aliyun.SettingManagement;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.Auditing;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
@ -67,7 +66,6 @@ namespace LY.MicroService.BackendAdmin;
typeof(AbpLoggingSerilogElasticsearchModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
// 设置管理
typeof(AbpAliyunSettingManagementModule),

1
aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/LY.MicroService.BackendAdmin.HttpApi.Host.csproj

@ -53,7 +53,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\features\LINGYUN.Abp.FeatureManagement.Client\LINGYUN.Abp.FeatureManagement.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Logging.Serilog.Elasticsearch\LINGYUN.Abp.Logging.Serilog.Elasticsearch.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />

1
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/LY.MicroService.PlatformManagement.HttpApi.Host.csproj

@ -51,7 +51,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation.Redis.Client\LINGYUN.Abp.Features.LimitValidation.Redis.Client.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Sms.Aliyun\LINGYUN.Abp.Sms.Aliyun.csproj" />
<ProjectReference Include="..\..\framework\features\LINGYUN.Abp.Features.Client\LINGYUN.Abp.Features.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

2
aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/PlatformManagementHttpApiHostModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -66,7 +65,6 @@ namespace LY.MicroService.PlatformManagement;
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpUINavigationVueVbenAdmin5Module),
typeof(PlatformThemeVueVbenAdminModule),
typeof(AbpBlobManagementAliyunModule), // 阿里云存储提供者模块

1
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/LY.MicroService.RealtimeMessage.HttpApi.Host.csproj

@ -50,7 +50,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation.Redis.Client\LINGYUN.Abp.Features.LimitValidation.Redis.Client.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

2
aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/RealtimeMessageHttpApiHostModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -72,7 +71,6 @@ namespace LY.MicroService.RealtimeMessage;
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpMessageServiceApplicationModule),
typeof(AbpMessageServiceHttpApiModule),
typeof(AbpNotificationsApplicationModule),

1
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/LY.MicroService.TaskManagement.HttpApi.Host.csproj

@ -44,7 +44,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.Elasticsearch\LINGYUN.Abp.AuditLogging.Elasticsearch.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />

2
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/TaskManagementHttpApiHostModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -61,7 +60,6 @@ namespace LY.MicroService.TaskManagement;
typeof(AbpBlobManagementHttpApiClientModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpBackgroundTasksJobsModule),
typeof(AbpBackgroundTasksQuartzModule),
typeof(AbpBackgroundTasksDistributedLockingModule),

1
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj

@ -49,7 +49,6 @@
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj" />
<ProjectReference Include="..\..\framework\telemetry\LINGYUN.Abp.Telemetry.OpenTelemetry\LINGYUN.Abp.Telemetry.OpenTelemetry.csproj" />
<ProjectReference Include="..\..\framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj" />

2
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -76,7 +75,6 @@ namespace LY.MicroService.WebhooksManagement;
typeof(AbpCAPEventBusModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpSwashbuckleModule),

1
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/LY.MicroService.WechatManagement.HttpApi.Host.csproj

@ -50,7 +50,6 @@
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\security\LINGYUN.Abp.Claims.Mapping\LINGYUN.Abp.Claims.Mapping.csproj" />
<ProjectReference Include="..\..\framework\telemetry\LINGYUN.Abp.Telemetry.OpenTelemetry\LINGYUN.Abp.Telemetry.OpenTelemetry.csproj" />
<ProjectReference Include="..\..\framework\telemetry\LINGYUN.Abp.Telemetry.SkyWalking\LINGYUN.Abp.Telemetry.SkyWalking.csproj" />

2
aspnet-core/services/LY.MicroService.WechatManagement.HttpApi.Host/WechatManagementHttpApiHostModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -74,7 +73,6 @@ namespace LY.MicroService.WechatManagement;
typeof(AbpCAPEventBusModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpSwashbuckleModule),

1
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj

@ -53,7 +53,6 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.ExceptionHandling.Emailing\LINGYUN.Abp.ExceptionHandling.Emailing.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Http.Client.Wrapper\LINGYUN.Abp.Http.Client.Wrapper.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.AspNetCore.Mvc.Localization\LINGYUN.Abp.AspNetCore.Mvc.Localization.csproj" />
<ProjectReference Include="..\..\framework\localization\LINGYUN.Abp.Localization.CultureMap\LINGYUN.Abp.Localization.CultureMap.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.Application\LINGYUN.Abp.Serilog.Enrichers.Application.csproj" />
<ProjectReference Include="..\..\framework\logging\LINGYUN.Abp.Serilog.Enrichers.UniqueId\LINGYUN.Abp.Serilog.Enrichers.UniqueId.csproj" />

2
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs

@ -1,5 +1,4 @@
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.AspNetCore.Mvc.Localization;
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.Authorization.OrganizationUnits;
@ -62,7 +61,6 @@ namespace LY.MicroService.WorkflowManagement;
typeof(AbpEmailingExceptionHandlingModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpBackgroundTasksQuartzModule),
typeof(AbpBackgroundTasksDistributedLockingModule),
typeof(AbpBackgroundTasksExceptionHandlingModule),

Loading…
Cancel
Save