This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 6afbcaad56cf8415a91032c81ade3423fa143fee
Author: Qian Xia <lauraxiaq...@gmail.com>
AuthorDate: Thu Jul 13 16:43:32 2023 +0800

    KYLIN-5631 refine logical view locales issue
---
 .../src/components/common/DataSourceBar/handler.js |  3 ++-
 .../src/components/common/DataSourceBar/locales.js |  3 ++-
 kystudio/src/components/studio/DDL/ddl.vue         |  2 +-
 .../components/studio/LogicalView/LogicalView.vue  | 23 ++++------------------
 4 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/kystudio/src/components/common/DataSourceBar/handler.js 
b/kystudio/src/components/common/DataSourceBar/handler.js
index a6a70aa5aa..347f72a493 100644
--- a/kystudio/src/components/common/DataSourceBar/handler.js
+++ b/kystudio/src/components/common/DataSourceBar/handler.js
@@ -27,6 +27,7 @@ export const render = {
   table: {
     render (h, { node, data, store }) {
       const { label, tags, dateRange, isTopSet, datasource, 
isCurrentProLogicalTable } = data // datasource 为L 是逻辑视图表
+      const labelTitle = datasource === 'L' ? label + ' ' + this.$t('project') 
+ data.__data.created_project : label
       const dataRangeTitle = this.$t('dataRange')
       const nodeClass = {
         class: [
@@ -40,7 +41,7 @@ export const render = {
       return (
         <div>
           <div {...nodeClass}>
-            <span title={label} class={datasource === 'L' && 
!isCurrentProLogicalTable ? 'is-disabled' : ''}>{label}</span>
+            <span title={labelTitle} class={datasource === 'L' && 
!isCurrentProLogicalTable ? 'is-disabled' : ''}>{label}</span>
             <div class="right">
               { datasource === 'L' ? (
                 <span class="tree-icon" slot="reference">
diff --git a/kystudio/src/components/common/DataSourceBar/locales.js 
b/kystudio/src/components/common/DataSourceBar/locales.js
index 331b042175..1c45ac3dcf 100644
--- a/kystudio/src/components/common/DataSourceBar/locales.js
+++ b/kystudio/src/components/common/DataSourceBar/locales.js
@@ -3,6 +3,7 @@ export default {
     searchTable: 'Search Database/Table',
     to: 'to',
     dataRange: 'Data Range:',
+    project: 'Belongs to project: ',
     source: 'Source: ',
     addDatasource: 'Add data source',
     emptyText: 'Click to load source tables.',
@@ -15,7 +16,7 @@ export default {
     sourceManagement: 'Source Management',
     loadTables: 'Load Table Metadata',
     loadTablesSuccess: 'Synced successfully',
-    loadTablesFail: 'Can\'t load {db_counts} database(s) or {table_counts} 
source table(s) metadata. Please contact your admin to check whether they exist 
in the datasource.',
+    loadTablesFail: 'Can\'t load {db_counts} database(s) or {table_counts} 
source table(s) metadata. Please contact your admin to check whether they exist 
in the datasource. If loading Logical View fails, please check if you loaded  
Logical Views out of the current project. ',
     databases: 'Database',
     tables: 'Table',
     cloudHive: 'Object Storage',
diff --git a/kystudio/src/components/studio/DDL/ddl.vue 
b/kystudio/src/components/studio/DDL/ddl.vue
index 29f95b8575..a22f979522 100644
--- a/kystudio/src/components/studio/DDL/ddl.vue
+++ b/kystudio/src/components/studio/DDL/ddl.vue
@@ -94,7 +94,7 @@
         newDDLTable: 'New DDL Table',
         datasourceTable: 'Data Source Table',
         syntaxRules: 'Syntax Rules',
-        createDDLSuggestionTitle: 'To create a DDL Table in KE, you need to 
follow the syntax rules of KE.',
+        createDDLSuggestionTitle: 'To create a DDL Table in Kylin, you need to 
follow the syntax rules of Kylin.',
         importDataSource: 'Import',
         runBtnTip: 'Execute ',
         acceleratorKey: '⌃/⌘ enter',
diff --git a/kystudio/src/components/studio/LogicalView/LogicalView.vue 
b/kystudio/src/components/studio/LogicalView/LogicalView.vue
index 80d1902492..649e1b90e6 100644
--- a/kystudio/src/components/studio/LogicalView/LogicalView.vue
+++ b/kystudio/src/components/studio/LogicalView/LogicalView.vue
@@ -86,7 +86,7 @@
                 <div class="label">{{$t('createDDLSuggestionTitle')}}</div>
                 <el-alert v-if="errorMsg" class="ksd-mb-16" :title="errorMsg" 
type="error" show-icon :closable="false"></el-alert>
                 <div v-if="stacktrace" class="trance-msg">{{stacktrace}}</div>
-                <div class="item" v-for="(item, index) in ($lang === 'en' ? 
rules[0] : rules[1])" :key="index">{{index + 1}}. {{item}}</div>
+                <div class="item" v-for="(item, index) in ($lang === 'en' ? 
rules[0] : rules[1])" :key="index">{{index + 1}}. <span 
v-html="item.replace(/\n/g, '<br/>')"></span></div>
               </div>
             </div>
           </template>
@@ -131,29 +131,14 @@
         logicalViewTable: 'Logical View Table',
         datasourceTable: 'Data Source Table',
         syntaxRules: 'Syntax Rules',
-        createDDLSuggestionTitle: 'To create a Logical View in KE, you need to 
follow the syntax rules of KE.',
+        createDDLSuggestionTitle: 'Logical View is a special view which only 
exists in Kylin,you can create or drop Logical View on this page. Create 
Logical View in Kylin needs to follow the following  rules.',
         importDataSource: 'Import',
         runBtnTip: 'Execute ',
         acceleratorKey: '⌃/⌘ enter',
         runSuccess: 'Execute succeed.',
-        runFailed: 'Execute Failed,Please check and try again.',
-        createViewSuccessAlert: 'The Logical View is created in virtual 
database {databaseName}  after executing "Create Logical View". Please import 
it from the data source to use it.',
+        runFailed: 'Execute Failed, Please check and try again.',
+        createViewSuccessAlert: 'After creating logical view, the view is 
created in virtual database {databaseName}, you need click the "refresh now" 
link in datasource and then can see the new Logical View. Then you should load 
it into data source.',
         goToImport: 'Go to Import'
-      },
-      'zh-cn': {
-        newLogicalView: '新的逻辑视图',
-        logicalView: '逻辑视图',
-        logicalViewTable: '逻辑视图表',
-        datasourceTable: '数据源表',
-        syntaxRules: '语法规则',
-        createDDLSuggestionTitle: '在 KE 中创建 Logical View 需要遵循 KE 的语法规则。',
-        importDataSource: '导入',
-        runBtnTip: '执行 ',
-        acceleratorKey: '⌃/⌘ 回车',
-        runSuccess: '执行成功',
-        runFailed: '执行失败,请检查后重试',
-        createViewSuccessAlert: '“Create Logical View” 执行后逻辑视图创建至虚拟库 
{databaseName},需要从数据源导入后可用。',
-        goToImport: '立即导入'
       }
     }
   })

Reply via email to