CN-1456 feat: 内置知识库标题和描述增加国际化

This commit is contained in:
chenjinsong
2023-11-17 17:10:40 +08:00
parent 38af43b322
commit abc1d07e6c
2 changed files with 23 additions and 23 deletions

View File

@@ -20,9 +20,9 @@
<img :src="data.iconUrl"/>
</div>
<div class="card-title">
<div class="card-title-name" :title="data.label">{{data.label}}</div>
<div class="card-title-name" :title="$t(data.label)">{{$t(data.label)}}</div>
</div>
<div class="card-desc" :title="data.desc">{{data.desc ? data.desc : '—'}}</div>
<div class="card-desc" :title="$t(data.desc)">{{$t(data.desc) || '—'}}</div>
</div>
<div class="card-operate__footer">
<button v-if="data.showUpdate && hasPermission('editBuiltInKnowledgeBase')"
@@ -44,9 +44,9 @@
<img :src="data.iconUrl"/>
</div>
<div class="card-title">
<div class="card-title-name" :title="data.label">{{data.label}}</div>
<div class="card-title-name" :title="$t(data.label)">{{$t(data.label)}}</div>
</div>
<div class="card-desc" :title="data.desc ? data.desc:'—'">{{data.desc ? data.desc : '—'}}</div>
<div class="card-desc" :title="data.desc ? $t(data.desc) : '—'">{{data.desc ? $t(data.desc) : '—'}}</div>
</div>
<div class="card-operate__footer">
<button v-if="data.showUpdate && hasPermission('editBuiltInKnowledgeBase')" :title="$t('overall.update')" class="top-tool-btn--update"
@@ -77,7 +77,7 @@
<div class="update-right">
<div class="knowledge-enable">
<div class="update-title">
<div class="card-title-name" :title="updateKnowledge.label">{{updateKnowledge.label}}</div>
<div class="card-title-name" :title="$t(updateKnowledge.label)">{{$t(updateKnowledge.label)}}</div>
</div>
<el-switch v-model="updateKnowledge.status"
active-color="#38ACD2"
@@ -89,7 +89,7 @@
>
</el-switch>
</div>
<div class="knowledge-desc" :title="updateKnowledge.desc">{{updateKnowledge.desc ? updateKnowledge.desc : ''}}</div>
<div class="knowledge-desc" :title="updateKnowledge.desc ? $t(updateKnowledge.desc) : '-'">{{updateKnowledge.desc ? $t(updateKnowledge.desc) : '-'}}</div>
</div>
</div>
<template v-if="!showAddUpdateDialog">

View File

@@ -1812,61 +1812,61 @@ export const builtInKnowledgeBaseBasicInfo = [
knowledgeId: 10,
label: 'Psiphon3 VPN',
iconUrl: 'images/knowledge-base-logo/psiphon3-vpn.png',
desc: 'Psiphon3 is a circumvention software for Windows and other platforms that provides uncensored access to Internet content.'
desc: 'knowledgeBase.desc.psiphon3'
},
{
knowledgeId: 5,
label: 'Domain Category',
label: 'network.domainCategory',
iconUrl: 'images/knowledge-base-logo/fqdn.png',
desc: 'Domain category provides basic information including categories, providers, reputation score.'
desc: 'knowledgeBase.desc.domainCategory'
},
{
knowledgeId: 6,
label: 'Domain Whois',
label: 'knowledgeBase.domainWhois',
iconUrl: 'images/knowledge-base-logo/fqdn-whois.png',
desc: 'Domain whois contains registration and ownership information for domain names. It includes details like domain registrar, registrant, creation/expiry dates, and contact information.'
desc: 'knowledgeBase.desc.domainWhois'
},
{
knowledgeId: 2,
label: 'IP ASN',
iconUrl: 'images/knowledge-base-logo/ip-asn.png',
desc: 'ASN Database associates IP addresses with their corresponding Autonomous System Numbers, which are unique identifiers assigned to internet networks. This database helps identify the network and its owner, facilitating network analysis and monitoring tasks.'
desc: 'knowledgeBase.desc.ipAsn'
},
{
knowledgeId: 3,
label: 'DNS Server Info',
label: 'knowledgeBase.dnsServerInfo',
iconUrl: 'images/knowledge-base-logo/dns-server-info.png',
desc: 'A DNS Server Info stores information about Domain Name System (DNS) servers. It includes details such as IP addresses, host names, locations, software name, operation system, and roles of the servers.'
desc: 'knowledgeBase.desc.dnsServer'
},
{
knowledgeId: 9,
label: 'APP Category',
label: 'knowledgeBase.appCategory',
iconUrl: 'images/knowledge-base-logo/app-category.png',
desc: 'APP category provides basic information for over 3000 popular applications, including their categories and service providers.'
desc: 'knowledgeBase.desc.appCategory'
},
{
knowledgeId: 7,
label: 'Indicators of Compromise',
label: 'knowledgeBase.ioc',
iconUrl: 'images/knowledge-base-logo/indicators-of-compromise.png',
desc: 'Indicator of Compromise (IoC) refers to forensic artifacts, such as unusual network traffic or malicious files, indicating a security breach or cyberattack.'
desc: 'knowledgeBase.desc.ioc'
},
{
knowledgeId: 4,
label: 'ICP',
iconUrl: 'images/knowledge-base-logo/icp.png',
desc: 'ICP (Internet Content Provider) license is a permit issued by Chinese authorities, mandatory for websites to legally operate and publish content within mainland China.'
desc: 'knowledgeBase.desc.icp'
},
{
knowledgeId: 1,
label: 'IP Location',
label: 'knowledgeBase.ipLocation',
iconUrl: 'images/knowledge-base-logo/ip-location.png',
desc: 'IP location Database is a repository containing geographical data associated with IP addresses, such as country, city, ISP, organization, latitude, longitude, and other relevant details.'
desc: 'knowledgeBase.desc.ipLocation'
},
{
knowledgeId: 8,
label: 'Anonymity',
label: 'eventType.anonymity',
iconUrl: 'images/knowledge-base-logo/anonymity.png',
desc: 'Communication system that conceals users\' identities and activities to protect privacy and prevent tracking or surveillance. This database provides lists of Tor nodes, I2P nodes, obfs4, etc.'
desc: 'knowledgeBase.desc.anonymity'
}
]