Skip to content

Commit

Permalink
tr
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Mar 12, 2024
1 parent 775581c commit b80b3f1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 20 deletions.
2 changes: 1 addition & 1 deletion nvd-yew/i18n.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Access Complexity":{"zh":"访问复杂度"},"Access Vector":{"zh":"访问途径"},"AdjacentNetwork":{"zh":"相邻网络"},"Attack Complexity":{"zh":"攻击复杂度"},"Attack Vector":{"zh":"攻击途径"},"Authentication":{"zh":"认证"},"Availability Impact":{"zh":"可用性影响度"},"CVE":{"zh":"CVE编号"},"CVSS":{"zh":"评分"},"CWE":{"zh":"弱点"},"Changed":{"zh":"更改"},"Comments":{"zh":"评论"},"Complete":{"zh":"完全"},"Confidentiality Impact":{"zh":"机密性影响度"},"Configurations":{"zh":"影响组件"},"Count":{"zh":"条"},"Entries":{"zh":"共"},"High":{"zh":"高"},"Home":{"zh":"主页"},"Integrity Impact":{"zh":"完整性影响度"},"KnowledgeBase":{"zh":"知识库"},"Lang":{"zh":"语言"},"Link":{"zh":"链接"},"Local":{"zh":"本地网络"},"Low":{"zh":"低"},"Match":{"zh":"影响版本"},"Medium":{"zh":"中"},"Meta":{"zh":"元数据"},"Multiple":{"zh":"多个"},"Name":{"zh":"名称"},"Network":{"zh":"网络"},"Next":{"zh":"下一页"},"None":{"zh":"无"},"Operator":{"zh":"逻辑"},"Partial":{"zh":"部分"},"Path":{"zh":"路径"},"Physical":{"zh":"物理"},"Prev":{"zh":"上一页"},"Privileges Required":{"zh":"权限要求"},"Products":{"zh":"产品"},"References":{"zh":"参考"},"Required":{"zh":"需要"},"Resource":{"zh":"资源"},"Scope":{"zh":"作用域属性"},"Show":{"zh":"展示"},"Single":{"zh":"单个"},"Source Code":{"zh":"源码"},"Sponsor":{"zh":"赞助"},"Tags":{"zh":"标签"},"To":{"zh":"到"},"Unchanged":{"zh":"未更改"},"Updated":{"zh":"更新时间"},"User Interaction":{"zh":"用户交互"},"Vendors":{"zh":"厂商"},"Verified":{"zh":"是否已验证"},"Weaknesses":{"zh":"弱点"}}
{"Access Complexity":{"zh":"访问复杂度"},"Access Vector":{"zh":"访问途径"},"AdjacentNetwork":{"zh":"相邻网络"},"Attack Complexity":{"zh":"攻击复杂度"},"Attack Vector":{"zh":"攻击途径"},"Authentication":{"zh":"认证"},"Availability Impact":{"zh":"可用性影响度"},"CPE":{"zh":"通用平台枚举"},"CVE":{"zh":"CVE编号"},"CVSS":{"zh":"评分"},"CWE":{"zh":"脆弱点"},"Changed":{"zh":"更改"},"Comments":{"zh":"评论"},"Complete":{"zh":"完全"},"Confidentiality Impact":{"zh":"机密性影响度"},"Configurations":{"zh":"影响产品"},"Count":{"zh":"条"},"Entries":{"zh":"共"},"High":{"zh":"高"},"Home":{"zh":"主页"},"Integrity Impact":{"zh":"完整性影响度"},"KnowledgeBase":{"zh":"知识库"},"Lang":{"zh":"语言"},"Link":{"zh":"链接"},"Local":{"zh":"本地网络"},"Low":{"zh":"低"},"Match":{"zh":"影响版本"},"Medium":{"zh":"中"},"Meta":{"zh":"元数据"},"Multiple":{"zh":"多个"},"Name":{"zh":"名称"},"Network":{"zh":"网络"},"Next":{"zh":"下一页"},"None":{"zh":"无"},"Operator":{"zh":"逻辑"},"Partial":{"zh":"部分"},"Path":{"zh":"路径"},"Physical":{"zh":"物理"},"Prev":{"zh":"上一页"},"Privileges Required":{"zh":"权限要求"},"Product":{"zh":"产品"},"Products":{"zh":"产品"},"References":{"zh":"参考"},"Required":{"zh":"需要"},"Resource":{"zh":"资源"},"Scope":{"zh":"作用域属性"},"Show":{"zh":"展示"},"Single":{"zh":"单个"},"Source":{"zh":"来源"},"Source Code":{"zh":"源码"},"Sponsor":{"zh":"赞助"},"Tags":{"zh":"标签"},"To":{"zh":"到"},"Unchanged":{"zh":"未更改"},"Updated":{"zh":"更新时间"},"User Interaction":{"zh":"用户交互"},"Vendor":{"zh":"厂商"},"Vendors":{"zh":"厂商"},"Verified":{"zh":"是否已验证"},"Version":{"zh":"版本"},"Weaknesses":{"zh":"脆弱点"}}
18 changes: 14 additions & 4 deletions nvd-yew/i18n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Vendors:
Products:
zh: 产品
CWE:
zh: 弱点
zh: 脆弱点
CVSS:
zh: 评分
Updated:
Expand All @@ -25,11 +25,11 @@ Resource:
Tags:
zh: 标签
Weaknesses:
zh: 弱点
zh: 脆弱点
KnowledgeBase:
zh: 知识库
Configurations:
zh: 影响组件
zh: 影响产品
Comments:
zh: 评论
Operator:
Expand Down Expand Up @@ -109,4 +109,14 @@ Unchanged:
Changed:
zh: 更改
Required:
zh: 需要
zh: 需要
Source:
zh: 来源
Vendor:
zh: 厂商
Product:
zh: 产品
CPE:
zh: 通用平台枚举
Version:
zh: 版本
29 changes: 18 additions & 11 deletions nvd-yew/src/component/knowledge_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use yew::prelude::*;

use nvd_model::knowledge_base::{KnowledgeBase, QueryKnowledgeBase};

use crate::component::{KBRow, KbProps};
use crate::component::{use_translation, KBRow, KbProps};
use crate::console_log;
use crate::modules::Paging;
use crate::services::kb::knowledge_base_list;
Expand Down Expand Up @@ -76,16 +76,7 @@ impl Component for CVEKnowledgeBaseInfoList {
return html! {
<div class="table-responsive">
<table class="table table-vcenter card-table table-striped">
<thead>
<tr>
<th scope="col">{"Name"}</th>
<th scope="col">{"Source"}</th>
<th scope="col">{"Verified"}</th>
<th scope="col">{"Path"}</th>
<th scope="col">{"Meta"}</th>
<th scope="col">{"Updated"}</th>
</tr>
</thead>
<KBHead/>
<tbody>
{knowledge_base.into_iter().map(|e|{
let p = KbProps{props:e.clone()};
Expand All @@ -104,3 +95,19 @@ impl Component for CVEKnowledgeBaseInfoList {
}
}
}
#[function_component]
pub fn KBHead() -> Html {
let i18n = use_translation();
html! {
<thead>
<tr>
<th scope="col">{i18n.t("Name")}</th>
<th scope="col">{i18n.t("Source")}</th>
<th scope="col">{i18n.t("Verified")}</th>
<th scope="col">{i18n.t("Path")}</th>
<th scope="col">{i18n.t("Meta")}</th>
<th scope="col">{i18n.t("Updated")}</th>
</tr>
</thead>
}
}
9 changes: 5 additions & 4 deletions nvd-yew/src/layout/footer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ impl Component for Footer {
<div class="row text-center align-items-center flex-row-reverse">
<div class="col-lg-auto ms-lg-auto">
<i class="ti ti-alert-triangle text-red"></i>
{"本站提供的任何内容、代码与服务仅供学习,请勿用于非法用途,否则后果自负!"}
{"本站提供的任何内容、代码与服务仅供学习,请勿用于非法用途或盈利,否则后果自负!"}
</div>
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
<ul class="list-inline list-inline-dots mb-0">
<li class="list-inline-item">
{"Copyright © 2023-2024"}
<a href="https://github.com/cn-kali-team" target="_blank">{"Kali-Team"}</a>{"."}
{"All rights reserved."}
<span>{" Copyright © 2023-2024 "}</span>
<a href="https://github.com/cn-kali-team" target="_blank">{"三米前有蕉皮 @Kali-Team"}</a>
{" All rights reserved. "}
<a href="https://github.com/emo-crab/scap-rs/blob/main/LICENSE" target="_blank">{"GPL-3.0-only"}</a>
</li>
</ul>
</div>
Expand Down

0 comments on commit b80b3f1

Please sign in to comment.