{tool.params}
@@ -750,9 +756,9 @@ const AISettingsModal: React.FCconnectionAttributes=key1:value1,key2:value2 覆盖 GoNavi 默认注入的 OBClient capability。
+ {t(
+ "connection.modal.field.oceanBaseProtocol.help.connectionAttributes",
+ {
+ attributes:
+ "connectionAttributes=key1:value1,key2:value2",
+ },
+ )}
}
style={{ marginBottom: 0 }}
@@ -5078,11 +5354,16 @@ const ConnectionModal: React.FC<{
children: (
{props.value ?? ''}
+ ),
}));
+const renderDataGridWithI18n = (
+ element: React.ReactElement,
+ options: { preference?: LanguagePreference; systemLanguages?: readonly string[] } = {},
+) => {
+ const preference = options.preference ?? mockStoreState.languagePreference;
+ return renderToStaticMarkup(
+ \s*数据表格渲染时发生错误,可能是数据格式问题。\s*<\/p>/);
+ expect(source).not.toMatch(/>\s*重试\s*<\/Button>/);
+ expect(source).not.toContain('title="拖动调整列宽,双击按内容自适应"');
+ expect(source).not.toContain('title="拖拽以调整列顺序"');
+ expect(source).not.toMatch(/label:\s*['"]复制为 INSERT['"]/);
+ expect(source).not.toMatch(/label:\s*['"]复制为 UPDATE['"]/);
+ expect(source).not.toMatch(/label:\s*['"]复制为 DELETE['"]/);
+ expect(source).not.toMatch(/label:\s*['"]复制为 JSON['"]/);
+ expect(source).not.toMatch(/label:\s*['"]复制为 CSV['"]/);
+ expect(source).not.toMatch(/label:\s*['"]复制为 Markdown['"]/);
+ expect(source).not.toMatch(/label:\s*['"]导出选中数据['"]/);
+ });
+
+ it('localizes legacy cell context menu labels through translateDataGrid', () => {
+ const dataGridSource = readFileSync(new URL('./DataGrid.tsx', import.meta.url), 'utf8');
+ const legacyMenuSource = readFileSync(new URL('./DataGridLegacyCellContextMenu.tsx', import.meta.url), 'utf8');
+ const legacyMountStart = dataGridSource.indexOf(' 数据表格渲染时发生错误,可能是数据格式问题。 {t('data_grid.error_boundary.description', undefined, this.props.i18nLanguage)}渲染错误
- {t('data_grid.error_boundary.title', undefined, this.props.i18nLanguage)}
+
{this.state.error?.message}
@@ -170,7 +178,7 @@ class DataGridErrorBoundary extends React.Component<
size="small"
onClick={() => this.setState({ hasError: false, error: null })}
>
- 重试
+ {t('data_grid.error_boundary.retry', undefined, this.props.i18nLanguage)}
void }> = ({ open,
>
{Array.isArray(previewData.schemaStatements) && previewData.schemaStatements.length > 0
? previewData.schemaStatements.join('\n')
- : '-- 当前表结构无可执行变更'}
+ : tr('data_sync.preview.sql.no_schema_changes')}