mirror of
https://github.com/dataease/dataease.git
synced 2026-05-19 02:08:10 +08:00
fix: 国际化
This commit is contained in:
@@ -1425,13 +1425,13 @@ public class CalciteProvider extends Provider {
|
||||
CalciteConnection calciteConnection = connection.unwrap(CalciteConnection.class);
|
||||
SchemaPlus rootSchema = calciteConnection.getRootSchema();
|
||||
if (rootSchema.getSubSchema(String.format(SQLConstants.SCHEMA, dsId)) == null) {
|
||||
DEException.throwException("请检查数据源的有效性!");
|
||||
DEException.throwException(Translator.get("i18n_check_datasource_connection"));
|
||||
}
|
||||
JdbcSchema jdbcSchema = rootSchema.getSubSchema(String.format(SQLConstants.SCHEMA, dsId)).unwrap(JdbcSchema.class);
|
||||
BasicDataSource basicDataSource = (BasicDataSource) jdbcSchema.getDataSource();
|
||||
return basicDataSource.getConnection();
|
||||
} catch (Exception e) {
|
||||
DEException.throwException("连接无效, " + e.getMessage());
|
||||
DEException.throwException(Translator.get("i18n_invalid_connection") + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -193,3 +193,5 @@ i18n_dataset_cross_error=Dataset with more than two data sources is not supporte
|
||||
i18n_board=Board
|
||||
|
||||
|
||||
i18n_invalid_connection=Invalid connection.
|
||||
i18n_check_datasource_connection=Please check the validity of the datasource.
|
||||
|
||||
@@ -185,8 +185,11 @@ i18n_time_date_next=\u660E\u5929
|
||||
i18n_time_date_start=\u6708\u521D
|
||||
i18n_time_date_end=\u6708\u672B
|
||||
|
||||
i18n_dataset_create_error=\u6570\u636e\u96c6\u56e0\u5f02\u5e38\u5bfc\u81f4\u65e0\u6cd5\u4f7f\u7528\uff0c\u8bf7\u91cd\u65b0\u521b\u5efa
|
||||
i18n_dataset_ds_delete=\u7531\u4e8e\u6570\u636e\u96c6\u6240\u7528\u7684\u6570\u636e\u6e90\u5df2\u88ab\u5220\u9664\2c\u65e0\u6cd5\u663e\u793a\u6570\u636e\u96c6
|
||||
i18n_dataset_plugin_error=\u5f53\u524d\u6570\u636e\u6e90\u63d2\u4ef6\u4e0d\u5b58\u5728
|
||||
i18n_dataset_cross_error=\u8de8\u6e90\u6570\u636e\u96c6\u4e0d\u652f\u6301\u8be5\u529f\u80fd
|
||||
i18n_board=\u8fb9\u6846
|
||||
i18n_dataset_create_error=\u6570\u636E\u96C6\u56E0\u5F02\u5E38\u5BFC\u81F4\u65E0\u6CD5\u4F7F\u7528\uFF0C\u8BF7\u91CD\u65B0\u521B\u5EFA
|
||||
i18n_dataset_ds_delete=\u7531\u4E8E\u6570\u636E\u96C6\u6240\u7528\u7684\u6570\u636E\u6E90\u5DF2\u88AB\u5220\u9664\2c\u65E0\u6CD5\u663E\u793A\u6570\u636E\u96C6
|
||||
i18n_dataset_plugin_error=\u5F53\u524D\u6570\u636E\u6E90\u63D2\u4EF6\u4E0D\u5B58\u5728
|
||||
i18n_dataset_cross_error=\u8DE8\u6E90\u6570\u636E\u96C6\u4E0D\u652F\u6301\u8BE5\u529F\u80FD
|
||||
i18n_board=\u8FB9\u6846
|
||||
i18n_invalid_connection=\u8FDE\u63A5\u65E0\u6548,
|
||||
i18n_check_datasource_connection=\u8BF7\u68C0\u67E5\u6570\u636E\u6E90\u7684\u6709\u6548\u6027
|
||||
|
||||
|
||||
@@ -185,9 +185,12 @@ i18n_time_date_next=\u660E\u5929
|
||||
i18n_time_date_start=\u6708\u521D
|
||||
i18n_time_date_end=\u6708\u672B
|
||||
|
||||
i18n_dataset_create_error=\u6578\u64da\u96c6\u56e0\u7570\u5e38\u5c0e\u81f4\u7121\u6cd5\u4f7f\u7528\uff0c\u8acb\u91cd\u65b0\u5275\u5efa
|
||||
i18n_dataset_ds_delete=\u7531\u4e8e\u6578\u64da\u96c6\u6240\u7528\u7684\u6578\u64da\u6e90\u5df2\u88ab\u522a\u9664\2c\u7121\u6cd5\u986f\u793a\u6578\u64da\u96c6
|
||||
i18n_dataset_plugin_error=\u7576\u524d\u6578\u64da\u6e90\u63d2\u4ef6\u4e0d\u5b58\u5728
|
||||
i18n_dataset_cross_error=\u8de8\u6e90\u6578\u64da\u96c6\u4e0d\u652f\u6301\u8a72\u529f\u80fd
|
||||
i18n_board=\u908a\u6846
|
||||
i18n_dataset_create_error=\u6578\u64DA\u96C6\u56E0\u7570\u5E38\u5C0E\u81F4\u7121\u6CD5\u4F7F\u7528\uFF0C\u8ACB\u91CD\u65B0\u5275\u5EFA
|
||||
i18n_dataset_ds_delete=\u7531\u4E8E\u6578\u64DA\u96C6\u6240\u7528\u7684\u6578\u64DA\u6E90\u5DF2\u88AB\u522A\u9664\2c\u7121\u6CD5\u986F\u793A\u6578\u64DA\u96C6
|
||||
i18n_dataset_plugin_error=\u7576\u524D\u6578\u64DA\u6E90\u63D2\u4EF6\u4E0D\u5B58\u5728
|
||||
i18n_dataset_cross_error=\u8DE8\u6E90\u6578\u64DA\u96C6\u4E0D\u652F\u6301\u8A72\u529F\u80FD
|
||||
i18n_board=\u908A\u6846
|
||||
|
||||
|
||||
i18n_invalid_connection=\u9023\u63A5\u7121\u6548,
|
||||
i18n_check_datasource_connection=\u8ACB\u6AA2\u67E5\u6578\u64DA\u6E90\u7684\u6709\u6548\u6027
|
||||
|
||||
@@ -406,55 +406,61 @@ const getEmptyDesc = (): string => {
|
||||
|
||||
<el-table-column width="100" fixed="right" key="_operation" :label="$t('common.operate')">
|
||||
<template #default="scope">
|
||||
<template v-if="['dashboard', 'dataV', 'panel', 'screen'].includes(scope.row.type)">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="t('work_branch.new_page_preview')"
|
||||
placement="top"
|
||||
>
|
||||
<el-icon
|
||||
class="hover-icon hover-icon-in-table"
|
||||
@click.stop="
|
||||
preview(activeName === 'recent' ? scope.row.id : scope.row.resourceId)
|
||||
"
|
||||
<div style="display: flex; flex-direction: row; align-items: center">
|
||||
<template v-if="['dashboard', 'dataV', 'panel', 'screen'].includes(scope.row.type)">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="t('work_branch.new_page_preview')"
|
||||
placement="top"
|
||||
>
|
||||
<Icon name="icon_pc_outlined"><icon_pc_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<ShareHandler
|
||||
v-if="!shareDisable"
|
||||
:in-grid="true"
|
||||
:weight="scope.row.weight"
|
||||
:resource-id="activeName === 'recent' ? scope.row.id : scope.row.resourceId"
|
||||
:resource-type="scope.row.type"
|
||||
/>
|
||||
<el-tooltip
|
||||
v-if="activeName === 'store'"
|
||||
effect="dark"
|
||||
:content="t('work_branch.cancel_favorites')"
|
||||
placement="top"
|
||||
>
|
||||
<el-icon
|
||||
class="hover-icon hover-icon-in-table"
|
||||
@click.stop="executeCancelStore(scope.row)"
|
||||
<el-icon
|
||||
class="hover-icon hover-icon-in-table"
|
||||
@click.stop="
|
||||
preview(activeName === 'recent' ? scope.row.id : scope.row.resourceId)
|
||||
"
|
||||
>
|
||||
<Icon name="icon_pc_outlined"><icon_pc_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<ShareHandler
|
||||
v-if="!shareDisable"
|
||||
:in-grid="true"
|
||||
:weight="scope.row.weight"
|
||||
:resource-id="activeName === 'recent' ? scope.row.id : scope.row.resourceId"
|
||||
:resource-type="scope.row.type"
|
||||
/>
|
||||
<el-tooltip
|
||||
v-if="activeName === 'store'"
|
||||
effect="dark"
|
||||
:content="t('work_branch.cancel_favorites')"
|
||||
placement="top"
|
||||
>
|
||||
<Icon name="icon_cancel_store"><icon_cancel_store class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<el-icon
|
||||
class="hover-icon hover-icon-in-table"
|
||||
@click.stop="executeCancelStore(scope.row)"
|
||||
>
|
||||
<Icon name="icon_cancel_store"><icon_cancel_store class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-if="['dataset'].includes(scope.row.type)">
|
||||
<el-tooltip effect="dark" :content="t('work_branch.open_dataset')" placement="top">
|
||||
<el-icon
|
||||
class="hover-icon hover-icon-in-table"
|
||||
@click.stop="
|
||||
openDataset(activeName === 'recent' ? scope.row.id : scope.row.resourceId)
|
||||
"
|
||||
<template v-if="['dataset'].includes(scope.row.type)">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="t('work_branch.open_dataset')"
|
||||
placement="top"
|
||||
>
|
||||
<Icon name="icon_pc_outlined"><icon_pc_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<el-icon
|
||||
class="hover-icon hover-icon-in-table"
|
||||
@click.stop="
|
||||
openDataset(activeName === 'recent' ? scope.row.id : scope.row.resourceId)
|
||||
"
|
||||
>
|
||||
<Icon name="icon_pc_outlined"><icon_pc_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</GridTable>
|
||||
|
||||
Reference in New Issue
Block a user