diff --git a/custom/templates/base/footer_content.tmpl b/custom/templates/base/footer_content.tmpl index 4e43c914f..25b5f42e9 100644 --- a/custom/templates/base/footer_content.tmpl +++ b/custom/templates/base/footer_content.tmpl @@ -4,20 +4,19 @@
- 版权所有:新一代人工智能开源开放平台(OpenI) 京ICP备18004880号 + {{.i18n.Tr "custom.foot.copyright"}} 京ICP备18004880号
- {{.i18n.Tr "powered_by" "鹏城实验室云脑、Trustie、华为云 DevCloud、gitea"}} 构建 + {{.i18n.Tr "powered_by" "鹏城实验室云脑、Trustie、华为云 DevCloud、gitea"}}
diff --git a/custom/templates/base/head_navbar.tmpl b/custom/templates/base/head_navbar.tmpl index a61ae6e29..026966d3b 100644 --- a/custom/templates/base/head_navbar.tmpl +++ b/custom/templates/base/head_navbar.tmpl @@ -11,18 +11,18 @@ {{if .IsSigned}} {{.i18n.Tr "dashboard"}} {{.i18n.Tr "datasets"}} - 项目 + {{.i18n.Tr "custom.head.project"}} {{if not .UnitIssuesGlobalDisabled}} {{.i18n.Tr "issues"}} {{end}} @@ -36,31 +36,34 @@ {{.i18n.Tr "explore"}}
{{else if .IsLandingPageHome}} {{.i18n.Tr "home"}} - 项目 + {{.i18n.Tr "custom.head.project"}} {{else if .IsLandingPageExplore}} diff --git a/custom/templates/datasets/dataset_list.tmpl b/custom/templates/datasets/dataset_list.tmpl index c00abea33..c57feeb0f 100644 --- a/custom/templates/datasets/dataset_list.tmpl +++ b/custom/templates/datasets/dataset_list.tmpl @@ -28,8 +28,8 @@ {{.Title}}
- {{svg "octicon-tasklist" 16}} {{.Task}} - {{svg "octicon-tag" 16}}{{.Category}} + {{svg "octicon-tasklist" 16}} {{$.i18n.Tr (printf "dataset.task.%s" .Task)}} + {{svg "octicon-tag" 16}}{{$.i18n.Tr (printf "dataset.category.%s" .Category)}} {{if ne .DownloadTimes 0}} {{svg "octicon-flame" 16}} {{.DownloadTimes}} {{end}} diff --git a/custom/templates/user/auth/signin_inner.tmpl b/custom/templates/user/auth/signin_inner.tmpl index f1206d63b..a827bde9e 100644 --- a/custom/templates/user/auth/signin_inner.tmpl +++ b/custom/templates/user/auth/signin_inner.tmpl @@ -11,7 +11,7 @@
-
+

{{if .LinkAccountMode}} {{.i18n.Tr "auth.oauth_signin_title"}} diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 374f13af0..88ebe2bdc 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -301,6 +301,8 @@ func NewFuncMap() []template.FuncMap { "svg": func(icon string, size int) template.HTML { return template.HTML(fmt.Sprintf(``, icon, size, size, icon)) }, + "tasks": tasks, + "categories": categories, }} } @@ -721,3 +723,13 @@ func buildSubjectBodyTemplate(stpl *texttmpl.Template, btpl *template.Template, log.Warn("Failed to parse template [%s/body]: %v", name, err) } } + +// Dataset categories +func categories() []string { + return []string{"computer_vision", "natural_language_processing", "speech_processing", "computer_vision_natural_language_processing"} +} + +// Dataset tasks +func tasks() []string { + return []string{"machine_translation", "question_answering_system", "information_retrieval", "knowledge_graph", "text_annotation", "text_categorization", "emotion_analysis", "language_modeling", "speech_recognition", "automatic_digest", "information_extraction", "description_generation", "image_classification", "face_recognition", "image_search", "target_detection", "image_description_generation", "vehicle_license_plate_recognition", "medical_image_analysis", "unmanned", "unmanned_security", "drone", "vr_ar", "2_d_vision", "2.5_d_vision", "3_d_reconstruction", "image_processing", "video_processing", "visual_input_system", "speech_coding", "speech_enhancement", "speech_recognition", "speech_synthesis"} +} diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 43b0a4b8e..04202c4ec 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -651,6 +651,43 @@ settings.delete_notices_1= - This operation CANNOT be undone. settings.delete_notices_2= - This operation will permanently delete the %s dataset. settings.delete_notices_fork_1= - Forks of this dataset will become independent after deletion. settings.deletion_success= The dataset has been deleted. +task.machine_translation= machine translation +task.question_answering_system= question answering system +task.information_retrieval= information retrieval +task.knowledge_graph= knowledge graph +task.text_annotation= text annotation +task.text_categorization= text categorization +task.emotion_analysis= emotion analysis +task.language_modeling= language modeling +task.speech_recognition= speech recognition +task.automatic_digest= automatic digest +task.information_extraction= information extraction +task.description_generation= description generation +task.image_classification= image classification +task.face_recognition= face recognition +task.image_search= image search +task.target_detection= target detection +task.image_description_generation= image description generation +task.vehicle_license_plate_recognition= vehicle license plate recognition +task.medical_image_analysis= medical image analysis +task.unmanned= unmanned +task.unmanned_security= unmanned security +task.drone= drone +task.vr_ar= VR/AR +task.2_d_vision= 2.D vision +task.2.5_d_vision= 2.5D vision +task.3_d_reconstruction= 3Dreconstruction +task.image_processing= image processing +task.video_processing= video processing +task.visual_input_system= visual input system +task.speech_coding= speech coding +task.speech_enhancement= speech enhancement +task.speech_recognition= speech recognition +task.speech_synthesis= speech synthesis +category.computer_vision= computer vision +category.natural_language_processing= natural language processing +category.speech_processing= speech processing +category.computer_vision_natural_language_processing= computer vision and natural language processing [repo] owner = Owner @@ -2402,3 +2439,23 @@ error.probable_bad_default_signature = "WARNING! Although the default key has th [units] error.no_unit_allowed_repo = You are not allowed to access any section of this repository. error.unit_not_allowed = You are not allowed to access this repository section. + +[custom] +head.community= Community +head.welcome= Welcome to OpenI +head.about_org= About orgnation +head.license= OpenI open source license +head.community_charter= OpenI Community Charter +head.community_infos= Community News +head.project= Project +head.study= Study +head.activity= Activity +foot.council= Council +foot.technical_committee= Technical Committee +foot.join= Join OpenI +foot.news= News +foot.community_news= Community News +foot.member_news= Member news +foot.industry_advisory= Industry Advisory +foot.help= help +foot.copyright= Copyright: New Generation Artificial Intelligence Open Source Open Platform (OpenI) \ No newline at end of file diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index ad0f4ea59..7cefbfe8f 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -651,6 +651,43 @@ settings.delete_notices_1=- 此操作 不可以 被回滚。 settings.delete_notices_2=- 此操作将永久删除据集 %s。 settings.delete_notices_fork_1=- 在此仓库删除后,它的派生据集将变成独立据集。 settings.deletion_success=据集已被删除。 +task.machine_translation=机器翻译 +task.question_answering_system=问答系统 +task.information_retrieval=信息检索 +task.knowledge_graph=知识图谱 +task.text_annotation=文本标注 +task.text_categorization=文本分类 +task.emotion_analysis=情感分析 +task.language_modeling=语言建模 +task.speech_recognition=语音识别 +task.automatic_digest=自动文摘 +task.information_extraction=信息抽取 +task.description_generation=说明生成 +task.image_classification=图像分类 +task.face_recognition=人脸识别 +task.image_search=图像搜索 +task.target_detection=目标检测 +task.image_description_generation=图像描述生成 +task.vehicle_license_plate_recognition=车辆车牌识别 +task.medical_image_analysis=医学图像分析 +task.unmanned=无人驾驶 +task.unmanned_security=无人安防 +task.drone=无人机 +task.vr_ar=VR/AR +task.2_d_vision=2-D视觉 +task.2.5_d_vision=2.5-D视觉 +task.3_d_reconstruction=3D重构 +task.image_processing=图像处理 +task.video_processing=视频处理 +task.visual_input_system=视觉输入系统 +task.speech_coding=语音编码 +task.speech_enhancement=语音增强 +task.speech_recognition=语音识别 +task.speech_synthesis=语音合成 +category.computer_vision=计算机视觉 +category.natural_language_processing=自然语言处理 +category.speech_processing=语音处理 +category.computer_vision_natural_language_processing=计算机视觉、自然语言处理 [repo] owner=拥有者 @@ -2403,3 +2440,24 @@ error.probable_bad_default_signature=警告!虽然默认密钥拥有此ID, error.no_unit_allowed_repo=您没有被允许访问此仓库的任何单元。 error.unit_not_allowed=您没有权限访问此仓库单元 +[custom] +head.community=社区 +head.welcome=欢迎加入启智 +head.about_org=关于组织架构 +head.license=启智开源许可证 +head.community_charter=启智社区章程 +head.community_infos=社区动态 +head.project=项目 +head.study=学些 +head.activity=活动 +foot.council=理事会 +foot.technical_committee=技术委员会 +foot.join=加入启智 +foot.news=动态 +foot.community_news=社区动态 +foot.member_news=成员动态 +foot.industry_advisory=行业咨询 +foot.help=帮助 +foot.copyright= 版权所有:新一代人工智能开源开放平台(OpenI) + + diff --git a/templates/datasets/create.tmpl b/templates/datasets/create.tmpl index a4e0c05cc..362a53043 100644 --- a/templates/datasets/create.tmpl +++ b/templates/datasets/create.tmpl @@ -8,7 +8,7 @@ {{if .PageIsEditDataset}} {{.i18n.Tr "dataset.edit_dataset"}} {{else}} - {{.i18n.Tr "dataset.new_dataset"}} + {{.i18n.Tr "new_dataset"}} {{end}}

diff --git a/templates/datasets/dataset_list.tmpl b/templates/datasets/dataset_list.tmpl index 2b2695147..3c99e3e4a 100644 --- a/templates/datasets/dataset_list.tmpl +++ b/templates/datasets/dataset_list.tmpl @@ -6,8 +6,8 @@ {{.Title}}
- {{svg "octicon-tasklist" 16}} {{.Task}} - {{svg "octicon-tag" 16}}{{.Category}} + {{svg "octicon-tasklist" 16}}{{$.i18n.Tr (printf "dataset.task.%s" .Task)}} + {{svg "octicon-tag" 16}}{{$.i18n.Tr (printf "dataset.category.%s" .Category)}} {{svg "octicon-flame" 16}} 24
diff --git a/templates/datasets/form.tmpl b/templates/datasets/form.tmpl index 76bdbd3c1..f22c88d23 100644 --- a/templates/datasets/form.tmpl +++ b/templates/datasets/form.tmpl @@ -30,15 +30,12 @@
{{.i18n.Tr "dataset.category"}}
@@ -50,18 +47,12 @@
{{.i18n.Tr "dataset.task"}}
diff --git a/templates/datasets/show.tmpl b/templates/datasets/show.tmpl index 847883127..4740561e1 100644 --- a/templates/datasets/show.tmpl +++ b/templates/datasets/show.tmpl @@ -21,13 +21,13 @@ {{$.i18n.Tr "dataset.private"}} {{end}} - {{.dataset.Category}} + {{$.i18n.Tr (printf "dataset.task.%s" .dataset.Task)}} {{.dataset.License}} - {{.dataset.Task}} + {{$.i18n.Tr (printf "dataset.category.%s" .dataset.Category)}}