Skip to content

Commit 864eff4

Browse files
authored
perf: i18n (#4740)
* feat: login limit time config * doc * perf: code * i18n update * update lock * fix: ts * update package
1 parent fdd4e9e commit 864eff4

File tree

229 files changed

+1128
-1293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+1128
-1293
lines changed

.vscode/i18n-ally-custom-framework.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ usageMatchRegex:
1616
# the `{key}` will be placed by a proper keypath matching regex,
1717
# you can ignore it and use your own matching rules as well
1818
- "[^\\w\\d]t\\(['\"`]({key})['\"`]"
19-
- "[^\\w\\d]commonT\\(['\"`]({key})['\"`]"
20-
- "[^\\w\\d]fileT\\(['\"`]({key})['\"`]"
21-
- "[^\\w\\d]workflowT\\(['\"`]({key})['\"`]"
2219
- "[^\\w\\d]i18nT\\(['\"`]({key})['\"`]"
2320

2421
# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys

docSite/content/zh-cn/docs/development/upgrading/498.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ weight: 792
1717
## ⚙️ 优化
1818

1919
1. Chat log list 优化,避免大数据时超出内存限制。
20+
2. 预加载 token 计算 worker,避免主任务中并发创建导致线程阻塞。
2021

2122
## 🐛 修复
2223

24+
1. 应用列表/知识库列表,删除行权限展示问题。
25+
2. 打开知识库搜索参数后,重排选项自动被打开。
2326

env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ declare global {
3535
ALLOWED_ORIGINS?: string;
3636
SHOW_COUPON?: string;
3737
CONFIG_JSON_PATH?: string;
38+
PASSWORD_LOGIN_LOCK_SECONDS?: string;
3839
}
3940
}
4041
}

packages/global/core/dataset/constants.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@ export const DatasetTypeMap = {
1919
[DatasetTypeEnum.dataset]: {
2020
icon: 'core/dataset/commonDatasetOutline',
2121
label: i18nT('dataset:common_dataset'),
22-
collectionLabel: i18nT('common:common.File')
22+
collectionLabel: i18nT('common:File')
2323
},
2424
[DatasetTypeEnum.websiteDataset]: {
2525
icon: 'core/dataset/websiteDatasetOutline',
2626
label: i18nT('dataset:website_dataset'),
27-
collectionLabel: i18nT('common:common.Website')
27+
collectionLabel: i18nT('common:Website')
2828
},
2929
[DatasetTypeEnum.externalFile]: {
3030
icon: 'core/dataset/externalDatasetOutline',
3131
label: i18nT('dataset:external_file'),
32-
collectionLabel: i18nT('common:common.File')
32+
collectionLabel: i18nT('common:File')
3333
},
3434
[DatasetTypeEnum.apiDataset]: {
3535
icon: 'core/dataset/externalDatasetOutline',
3636
label: i18nT('dataset:api_file'),
37-
collectionLabel: i18nT('common:common.File')
37+
collectionLabel: i18nT('common:File')
3838
},
3939
[DatasetTypeEnum.feishu]: {
4040
icon: 'core/dataset/feishuDatasetOutline',
4141
label: i18nT('dataset:feishu_dataset'),
42-
collectionLabel: i18nT('common:common.File')
42+
collectionLabel: i18nT('common:File')
4343
},
4444
[DatasetTypeEnum.yuque]: {
4545
icon: 'core/dataset/yuqueDatasetOutline',
4646
label: i18nT('dataset:yuque_dataset'),
47-
collectionLabel: i18nT('common:common.File')
47+
collectionLabel: i18nT('common:File')
4848
}
4949
};
5050

packages/service/core/workflow/dispatch/dataset/concat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function dispatchDatasetConcat(
2121
props: DatasetConcatProps
2222
): Promise<DatasetConcatResponse> {
2323
const {
24-
params: { limit = 6000, ...quoteMap }
24+
params: { limit = 5000, ...quoteMap }
2525
} = props as DatasetConcatProps;
2626

2727
const quoteList = Object.values(quoteMap).filter((list) => Array.isArray(list));

packages/web/components/common/DateRangePicker/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const DateRangePicker = ({
118118
mr={2}
119119
onClick={() => setShowSelected(false)}
120120
>
121-
{t('common:common.Close')}
121+
{t('common:Close')}
122122
</Button>
123123
<Button
124124
size={'sm'}
@@ -127,7 +127,7 @@ const DateRangePicker = ({
127127
setShowSelected(false);
128128
}}
129129
>
130-
{t('common:common.Confirm')}
130+
{t('common:Confirm')}
131131
</Button>
132132
</Flex>
133133
}

packages/web/components/common/EmptyTip/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const EmptyTip = ({ text, iconSize = '48px', ...props }: Props) => {
1414
<Flex mt={5} flexDirection={'column'} alignItems={'center'} py={'10vh'} {...props}>
1515
<MyIcon name="empty" w={iconSize} h={iconSize} color={'transparent'} />
1616
<Box mt={2} color={'myGray.500'} fontSize={'sm'}>
17-
{text || t('common:common.empty.Common Tip')}
17+
{text || t('common:no_more_data')}
1818
</Box>
1919
</Flex>
2020
);

packages/web/components/common/MyModal/EditFolderModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const EditFolderModal = ({
6767
<MyModal isOpen onClose={onClose} iconSrc="common/folderFill" title={typeMap.title}>
6868
<ModalBody>
6969
<Box>
70-
<FormLabel mb={1}>{t('common:common.Input name')}</FormLabel>
70+
<FormLabel mb={1}>{t('common:input_name')}</FormLabel>
7171
<Input
7272
{...register('name', { required: true })}
7373
bg={'myGray.50'}
@@ -76,13 +76,13 @@ const EditFolderModal = ({
7676
/>
7777
</Box>
7878
<Box mt={4}>
79-
<FormLabel mb={1}>{t('common:common.Input folder description')}</FormLabel>
79+
<FormLabel mb={1}>{t('common:folder_description')}</FormLabel>
8080
<Textarea {...register('intro')} bg={'myGray.50'} maxLength={200} />
8181
</Box>
8282
</ModalBody>
8383
<ModalFooter>
8484
<Button isLoading={loading} onClick={handleSubmit(onSave)} px={6}>
85-
{t('common:common.Confirm')}
85+
{t('common:Confirm')}
8686
</Button>
8787
</ModalFooter>
8888
</MyModal>

packages/web/components/common/MyPopover/PopoverConfirm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ const PopoverConfirm = ({
8787
<HStack mt={1} justifyContent={'flex-end'}>
8888
{showCancel && (
8989
<Button variant={'whiteBase'} size="sm" onClick={onClose}>
90-
{cancelText || t('common:common.Cancel')}
90+
{cancelText || t('common:Cancel')}
9191
</Button>
9292
)}
9393
<Button isLoading={loading} variant={map.variant} size="sm" onClick={onclickConfirm}>
94-
{confirmText || t('common:common.Confirm')}
94+
{confirmText || t('common:Confirm')}
9595
</Button>
9696
</HStack>
9797
</PopoverContent>

packages/web/components/common/MySelect/CronSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const cronString2Label = (
4747
) => {
4848
const cronField = cronString2Fields(cronString);
4949
if (!cronField) {
50-
return t('common:common.Not open');
50+
return t('common:not_open');
5151
}
5252

5353
if (cronField[0] === 'month') {
@@ -82,7 +82,7 @@ export const cronString2Label = (
8282
});
8383
}
8484

85-
return t('common:common.Not open');
85+
return t('common:not_open');
8686
};
8787

8888
const CronSelector = ({

0 commit comments

Comments
 (0)