mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
refactor: 数据集后端国际化
This commit is contained in:
@@ -266,7 +266,7 @@ public class DatasetGroupManage {
|
||||
Set<Long> ids = new LinkedHashSet();
|
||||
coreDatasetTables.forEach(ele -> ids.add(ele.getDatasourceId()));
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
DEException.throwException("数据集因异常导致无法使用,请重新创建");
|
||||
DEException.throwException(Translator.get("i18n_dataset_create_error"));
|
||||
}
|
||||
|
||||
QueryWrapper<CoreDatasource> datasourceQueryWrapper = new QueryWrapper<>();
|
||||
@@ -278,7 +278,7 @@ public class DatasetGroupManage {
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
if (ids.size() != datasourceDTOList.size()) {
|
||||
DEException.throwException("由于数据集所用的数据源已被删除,无法显示数据集");
|
||||
DEException.throwException(Translator.get("i18n_dataset_ds_delete"));
|
||||
}
|
||||
return datasourceDTOList;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ public class DatasetSQLManage {
|
||||
dto.setSuffix(first.getSuffix());
|
||||
return dto;
|
||||
} else {
|
||||
DEException.throwException("当前数据源插件不存在");
|
||||
DEException.throwException(Translator.get("i18n_dataset_plugin_error"));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -217,7 +217,7 @@ public class DatasetTableFieldManage {
|
||||
Map<Long, DatasourceSchemaDTO> dsMap = (Map<Long, DatasourceSchemaDTO>) sqlMap.get("dsMap");
|
||||
boolean crossDs = Utils.isCrossDs(dsMap);
|
||||
if (crossDs) {
|
||||
DEException.throwException("跨源数据集不支持该功能");
|
||||
DEException.throwException(Translator.get("i18n_dataset_cross_error"));
|
||||
}
|
||||
|
||||
QueryWrapper<CoreDatasetTableField> wrapper = new QueryWrapper<>();
|
||||
@@ -279,7 +279,7 @@ public class DatasetTableFieldManage {
|
||||
}
|
||||
|
||||
public List<DatasetTableFieldDTO> transDTO(List<CoreDatasetTableField> list) {
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
return list.stream().map(ele -> {
|
||||
DatasetTableFieldDTO dto = new DatasetTableFieldDTO();
|
||||
if (ele == null) return null;
|
||||
@@ -292,7 +292,7 @@ public class DatasetTableFieldManage {
|
||||
}
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
}else{
|
||||
} else {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
@@ -186,4 +186,9 @@ i18n_time_date_next=Tomorrow
|
||||
i18n_time_date_start=Beginning of the month
|
||||
i18n_time_date_end=End of the month
|
||||
|
||||
i18n_dataset_create_error=Create error,please try again
|
||||
i18n_dataset_ds_delete=Datasource deleted,this dataset can not be show
|
||||
i18n_dataset_plugin_error=Datasource plugin is not exist
|
||||
i18n_dataset_cross_error=Dataset with more than two data sources is not supported
|
||||
|
||||
|
||||
|
||||
@@ -185,4 +185,7 @@ 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
|
||||
|
||||
@@ -184,3 +184,9 @@ i18n_time_date_last=\u6628\u5929
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user