From 8df32c186c013b8e2ce07f57c29d82e7d55a55a4 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sun, 4 Aug 2024 19:23:46 +0800 Subject: [PATCH] chore: optimize text for data loading mode (#4918) --- packages/core/client/src/locale/en_US.json | 4 ++-- packages/core/client/src/locale/es_ES.json | 4 ++-- packages/core/client/src/locale/fr_FR.json | 4 ++-- packages/core/client/src/locale/ja_JP.json | 4 ++-- packages/core/client/src/locale/ko_KR.json | 4 ++-- packages/core/client/src/locale/pt_BR.json | 4 ++-- packages/core/client/src/locale/ru_RU.json | 4 ++-- packages/core/client/src/locale/tr_TR.json | 4 ++-- packages/core/client/src/locale/uk_UA.json | 4 ++-- packages/core/client/src/locale/zh-CN.json | 4 ++-- packages/core/client/src/locale/zh-TW.json | 4 ++-- .../__e2e__/setDataLoadingModeSettingsItem.test.ts | 8 ++++---- .../details-multi/setDataLoadingModeSettingsItem.tsx | 8 ++++---- .../antd/table-v2/__tests__/Table.settings.test.tsx | 2 +- 14 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/core/client/src/locale/en_US.json b/packages/core/client/src/locale/en_US.json index 705e7e50b..3602c0cb0 100644 --- a/packages/core/client/src/locale/en_US.json +++ b/packages/core/client/src/locale/en_US.json @@ -108,8 +108,8 @@ "Close": "Close", "Set the data scope": "Set the data scope", "Set data loading mode": "Set data loading mode", - "Automatically load data": "Automatically load data", - "Load data after filtering": "Load data after filtering", + "Load all data when filter is empty": "Load all data when filter is empty", + "Do not load data when filter is empty": "Do not load data when filter is empty", "Data loading mode": "Data loading mode", "Data blocks": "Data blocks", "Filter blocks": "Filter blocks", diff --git a/packages/core/client/src/locale/es_ES.json b/packages/core/client/src/locale/es_ES.json index 08a3c95a3..bdedd8089 100644 --- a/packages/core/client/src/locale/es_ES.json +++ b/packages/core/client/src/locale/es_ES.json @@ -104,8 +104,8 @@ "Set the data scope": "Establecer el ámbito de los datos", "Data loading mode": "Modo de carga de datos", "Set data loading mode": "Establecer el modo de carga de datos", - "Automatically load data": "Cargar datos", - "Load data after filtering": "Cargar datos después de filtrar", + "Load all data when filter is empty": "Cargar todos los datos cuando el filtro esté vacío", + "Do not load data when filter is empty": "No cargar datos cuando el filtro esté vacío", "Data blocks": "Bloques de datos", "Filter blocks": "Bloques de filtro", "Table": "Tabla", diff --git a/packages/core/client/src/locale/fr_FR.json b/packages/core/client/src/locale/fr_FR.json index af35da49f..9e0fd8221 100644 --- a/packages/core/client/src/locale/fr_FR.json +++ b/packages/core/client/src/locale/fr_FR.json @@ -104,8 +104,8 @@ "Set the data scope": "Définir la portée des données", "Data loading mode": "Mode de chargement des données", "Set data loading mode": "Définir le mode de chargement des données", - "Automatically load data": "Charger automatiquement les données", - "Load data after filtering": "Charger les données après filtrage", + "Load all data when filter is empty": "Charger toutes les données lorsque le filtre est vide", + "Do not load data when filter is empty": "Ne pas charger les données lorsque le filtre est vide", "Data blocks": "Blocs de données", "Filter blocks": "Blocs de filtre", "Table": "Tableau", diff --git a/packages/core/client/src/locale/ja_JP.json b/packages/core/client/src/locale/ja_JP.json index adc08b20f..059f2a864 100644 --- a/packages/core/client/src/locale/ja_JP.json +++ b/packages/core/client/src/locale/ja_JP.json @@ -107,8 +107,8 @@ "Set the data scope": "データ範囲の設定", "Data loading mode": "データ読み込みモード", "Set data loading mode": "データ読み込みモードの設定", - "Automatically load data": "データを自動的に読み込む", - "Load data after filtering": "フィルタリング後にデータを読み込む", + "Load all data when filter is empty": "フィルターが空の場合、すべてのデータを読み込む", + "Do not load data when filter is empty": "フィルターが空の場合、データを読み込まない", "Data blocks": "データブロック", "Filter blocks": "フィルターブロック", "Table OID(Inheritance)": "データテーブルOID(継承)", diff --git a/packages/core/client/src/locale/ko_KR.json b/packages/core/client/src/locale/ko_KR.json index a603939dd..9ad417db2 100644 --- a/packages/core/client/src/locale/ko_KR.json +++ b/packages/core/client/src/locale/ko_KR.json @@ -127,8 +127,8 @@ "Set the data scope": "데이터 범위 설정", "Data loading mode": "데이터 로드 모드", "Set data loading mode": "데이터 로드 모드 설정", - "Automatically load data": "데이터 자동 로드", - "Load data after filtering": "필터링 후 데이터 로드", + "Load all data when filter is empty": "필터가 비어 있을 때 모든 데이터 로드", + "Do not load data when filter is empty": "필터가 비어 있을 때 데이터 로드 안 함", "Block": "블록", "Data blocks": "데이터 블록", "Filter blocks": "필터 블록", diff --git a/packages/core/client/src/locale/pt_BR.json b/packages/core/client/src/locale/pt_BR.json index 87c5ab1c3..f077b5420 100644 --- a/packages/core/client/src/locale/pt_BR.json +++ b/packages/core/client/src/locale/pt_BR.json @@ -78,8 +78,8 @@ "Set the data scope": "Definir o escopo de dados", "Data loading mode": "Modo de carregamento de dados", "Set data loading mode": "Definir modo de carregamento de dados", - "Automatically load data": "Carregar dados automaticamente", - "Load data after filtering": "Carregar dados após filtragem", + "Load all data when filter is empty": "Carregar todos os dados quando o filtro estiver vazio", + "Do not load data when filter is empty": "Não carregar dados quando o filtro estiver vazio", "Data blocks": "Blocos de dados", "Filter blocks": "Blocos de filtro", "Table": "Tabela", diff --git a/packages/core/client/src/locale/ru_RU.json b/packages/core/client/src/locale/ru_RU.json index 0d46545d3..64ac482dd 100644 --- a/packages/core/client/src/locale/ru_RU.json +++ b/packages/core/client/src/locale/ru_RU.json @@ -74,8 +74,8 @@ "Set the data scope": "Установить область данных", "Data loading mode": "Режим загрузки данных", "Set data loading mode": "Установить режим загрузки данных", - "Automatically load data": "Автоматически загружать данные", - "Load data after filtering": "Загружать данные после фильтрации", + "Load all data when filter is empty": "Загружать все данные, когда фильтр пуст", + "Do not load data when filter is empty": "Не загружать данные, когда фильтр пуст", "Data blocks": "Блоки данных", "Filter blocks": "Просеивающие блоки", "Table": "Таблица", diff --git a/packages/core/client/src/locale/tr_TR.json b/packages/core/client/src/locale/tr_TR.json index 594745029..aad3784c1 100644 --- a/packages/core/client/src/locale/tr_TR.json +++ b/packages/core/client/src/locale/tr_TR.json @@ -74,8 +74,8 @@ "Set the data scope": "Veri kapsamını ayarla", "Data loading mode": "Veri yükleme modu", "Set data loading mode": "Veri yükleme modunu ayarla", - "Automatically load data": "Veriyi otomatik yükle", - "Load data after filtering": "Filtrelemeden sonra veriyi yükle", + "Load all data when filter is empty": "Filtre boş olduğunda tüm verileri yükle", + "Do not load data when filter is empty": "Filtre boş olduğunda veri yükleme", "Data blocks": "Veri Blokları", "Filter blocks": "Filtre blokları", "Table": "Tablo", diff --git a/packages/core/client/src/locale/uk_UA.json b/packages/core/client/src/locale/uk_UA.json index 4077a96bb..d14945fd6 100644 --- a/packages/core/client/src/locale/uk_UA.json +++ b/packages/core/client/src/locale/uk_UA.json @@ -104,8 +104,8 @@ "Set the data scope": "Встановити обсяг даних", "Data loading mode": "Режим завантаження даних", "Set data loading mode": "Встановити режим завантаження даних", - "Automatically load data": "Автоматично завантажувати дані", - "Load data after filtering": "Завантажувати дані після фільтрації", + "Load all data when filter is empty": "Завантажувати всі дані, коли фільтр порожній", + "Do not load data when filter is empty": "Не завантажувати дані, коли фільтр порожній", "Data blocks": "Блоки даних", "Filter blocks": "Блоки фільтрів", "Table": "Таблиця", diff --git a/packages/core/client/src/locale/zh-CN.json b/packages/core/client/src/locale/zh-CN.json index b45ebd3f9..fae581d41 100644 --- a/packages/core/client/src/locale/zh-CN.json +++ b/packages/core/client/src/locale/zh-CN.json @@ -127,8 +127,8 @@ "Set the data scope": "设置数据范围", "Data loading mode": "数据加载方式", "Set data loading mode": "设置数据加载方式", - "Automatically load data": "自动加载数据", - "Load data after filtering": "筛选后才加载数据", + "Load all data when filter is empty": "筛选条件为空时加载全部数据", + "Do not load data when filter is empty": "筛选条件为空时不加载数据", "Block": "区块", "Data blocks": "数据区块", "Filter blocks": "筛选区块", diff --git a/packages/core/client/src/locale/zh-TW.json b/packages/core/client/src/locale/zh-TW.json index 8ec9e5ac5..0a5dddf6e 100644 --- a/packages/core/client/src/locale/zh-TW.json +++ b/packages/core/client/src/locale/zh-TW.json @@ -127,8 +127,8 @@ "Set the data scope": "設定資料範圍", "Data loading mode": "資料加載方式", "Set data loading mode": "設定資料加載方式", - "Automatically load data": "自動加載資料", - "Load data after filtering": "篩選後才加載資料", + "Load all data when filter is empty": "當篩選條件為空時加載所有資料", + "Do not load data when filter is empty": "當篩選條件為空時不加載資料", "Block": "區塊", "Data blocks": "資料區塊", "Filter blocks": "篩選區塊", diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/setDataLoadingModeSettingsItem.test.ts b/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/setDataLoadingModeSettingsItem.test.ts index 27be89640..eaa98da27 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/setDataLoadingModeSettingsItem.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/details-multi/__e2e__/setDataLoadingModeSettingsItem.test.ts @@ -25,28 +25,28 @@ test.describe('setDataLoadingModeSettingsItem', () => { await page.getByLabel('block-item-CardItem-users-table').hover(); await page.getByLabel('designer-schema-settings-CardItem-blockSettings:table-users').hover(); await page.getByRole('menuitem', { name: 'Set data loading mode' }).click(); - await page.getByLabel('Load data after filtering').check(); + await page.getByLabel('Do not load data when filter is empty').check(); await page.getByRole('button', { name: 'OK', exact: true }).click(); // Details await page.getByLabel('block-item-CardItem-users-details').hover(); await page.getByLabel('designer-schema-settings-CardItem-blockSettings:detailsWithPagination-users').hover(); await page.getByRole('menuitem', { name: 'Set data loading mode' }).click(); - await page.getByLabel('Load data after filtering').check(); + await page.getByLabel('Do not load data when filter is empty').check(); await page.getByRole('button', { name: 'OK', exact: true }).click(); // List await page.getByLabel('block-item-CardItem-users-list').hover(); await page.getByLabel('designer-schema-settings-CardItem-blockSettings:list-users').hover(); await page.getByRole('menuitem', { name: 'Set data loading mode' }).click(); - await page.getByLabel('Load data after filtering').check(); + await page.getByLabel('Do not load data when filter is empty').check(); await page.getByRole('button', { name: 'OK', exact: true }).click(); // GridCard await page.getByLabel('block-item-BlockItem-users-').hover(); await page.getByLabel('designer-schema-settings-BlockItem-blockSettings:gridCard-users').hover(); await page.getByRole('menuitem', { name: 'Set data loading mode' }).click(); - await page.getByLabel('Load data after filtering').check(); + await page.getByLabel('Do not load data when filter is empty').check(); await page.getByRole('button', { name: 'OK', exact: true }).click(); // 所有区块应该显示 No data diff --git a/packages/core/client/src/modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem.tsx b/packages/core/client/src/modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem.tsx index 626706601..a39b3c463 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem.tsx +++ b/packages/core/client/src/modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem.tsx @@ -11,10 +11,10 @@ import { ISchema, useField, useFieldSchema } from '@formily/react'; import _ from 'lodash'; import React from 'react'; import { useTranslation } from 'react-i18next'; -import { useDesignable } from '../../../../schema-component'; -import { SchemaSettingsModalItem, useCollectionState } from '../../../../schema-settings'; import { useCollection_deprecated } from '../../../../collection-manager/hooks/useCollection_deprecated'; import { useDataBlockProps, useDataBlockRequest } from '../../../../data-source'; +import { useDesignable } from '../../../../schema-component'; +import { SchemaSettingsModalItem, useCollectionState } from '../../../../schema-settings'; export const setDataLoadingModeSettingsItem = { name: 'setDataLoadingMode', @@ -49,8 +49,8 @@ export function SetDataLoadingMode() { 'x-component': 'Radio.Group', default: fieldSchema['x-decorator-props']?.dataLoadingMode || 'auto', enum: [ - { value: 'auto', label: t('Automatically load data') }, - { value: 'manual', label: t('Load data after filtering') }, + { value: 'auto', label: t('Load all data when filter is empty') }, + { value: 'manual', label: t('Do not load data when filter is empty') }, ], }, }, diff --git a/packages/core/client/src/schema-component/antd/table-v2/__tests__/Table.settings.test.tsx b/packages/core/client/src/schema-component/antd/table-v2/__tests__/Table.settings.test.tsx index 08b6d6585..729a7cc4f 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/__tests__/Table.settings.test.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/__tests__/Table.settings.test.tsx @@ -178,7 +178,7 @@ describe('Table.settings', () => { modalChecker: { modalTitle: 'Data loading mode', async beforeCheck() { - await userEvent.click(screen.getByText('Load data after filtering')); + await userEvent.click(screen.getByText('Do not load data when filter is empty')); }, async afterSubmit() { await checkSchema({