From 02dff27be612bb10894092243847ab3c763bac5c Mon Sep 17 00:00:00 2001 From: chai001125 <1637519169@qq.com> Date: Wed, 15 Nov 2023 14:59:26 +0800 Subject: [PATCH] optimize: fix En community page --- i18n/en/code.json | 195 ++++++++++++++++++- i18n/en/docusaurus-theme-classic/navbar.json | 8 + src/pages/community/index.tsx | 47 ++--- 3 files changed, 219 insertions(+), 31 deletions(-) diff --git a/i18n/en/code.json b/i18n/en/code.json index c758aa7c7d8..73fd79b4821 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -30,25 +30,25 @@ "message": "Cloud Service EDAS" }, "community.barText": { - "message": "社区" + "message": "Community" }, "community.eventsTitle": { - "message": "事件 & 新闻" + "message": "Events & News" }, "community.contactsTitle": { - "message": "联系我们" + "message": "Talk To Us" }, "community.contactsDesc": { - "message": "有问题需要反馈?可以优先通过钉钉群(1群已满,2群群号:30438813)联系我们,或者通过以下方式参与我们一起互动。" + "message": "Feel free to contact us through the DingTalk group (1 group is full, 2 group number: 30438813), or via the following channel." }, "community.contributeTitle": { - "message": "贡献指南" + "message": "Contributor Guide" }, "community.contributeDesc": { - "message": "Nacos社区欢迎任何形式的贡献。" + "message": "Want to contribute to Nacos?" }, "community.dubboTitle": { - "message": "开源生态相关" + "message": "Open Source Ecology Corelated" }, "theme.navbar.mobileLanguageDropdown.label": { "message": "Languages", @@ -404,5 +404,184 @@ "theme.tags.tagsPageTitle": { "message": "Tags", "description": "The title of the tag list page" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "One document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Type your search here", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Search", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Search by Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "No results were found", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Fetching new results...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "community.contactsListTitle1": { + "message": "Mailing List" + }, + "community.contactsListTitle2": { + "message": "Gitter" + }, + "community.contactsListTitle3": { + "message": "segmentfault" + }, + "community.contactsListTitle4": { + "message": "@Nacos" + }, + "community.contributeListTitle1": { + "message": "Mailing List" + }, + "community.contributeListContent1": { + "message": "Mailing List" + }, + "community.contributeListTitle2": { + "message": "Issue" + }, + "community.contributeListContent2_1": { + "message": "Reporting issues via " + }, + "community.contributeListContent2_2": { + "message": "" + }, + "community.contributeListTitle3": { + "message": "Documents" + }, + "community.contributeListContent3_1": { + "message": "Improve the" + }, + "community.contributeListContent3_2": { + "message": "documentation" + }, + "community.contributeListTitle4": { + "message": "Pull Request" + }, + "community.ecosListContent1": { + "message": "Dubbo and Nacos are the classic combination from production practice of Alibaba's large-scale micro-service. Compared to traditional registry centers such as ZooKeeper and configuration center solutions, when building a microservice application platform by using cloud native and Service Mesh paradigm, with the use of Nacos in Dubbo, all the power of Dubbo in the large-scale microservice management, traffic management, service integration and sharing can be fully released." + }, + "community.ecosListContent2": { + "message": "Nacos supports service discovery and dynamic configuration management required by Kubernetes and CNCF. Nacos can replace completely and seamlessly Kubernetes’ primary DNS-based Service Discovery solutions. Nacos is featured with providing more service governance, which includes management of service domain, service health and life cycle management, traffic management and intelligent routing strategy management and etc. Nacos also enhances the management of ConfigMap, including version configuration and gated launch and etc." + }, + "community.ecosListContent3": { + "message": "Nacos is fully compatible and seamlessly supports the relevant API and main related functions of Spring Cloud. You can use Nacos as a configuration service for Spring Cloud Config Server or a better alternative for product of service discovery such as Eureka/Consul/ZooKeeper and etc. Nacos brings many feature enhancements required by the production and micro-service governance in configuration management and service management." } -} \ No newline at end of file +} diff --git a/i18n/en/docusaurus-theme-classic/navbar.json b/i18n/en/docusaurus-theme-classic/navbar.json index 318f8a32f6a..c35e963de8b 100644 --- a/i18n/en/docusaurus-theme-classic/navbar.json +++ b/i18n/en/docusaurus-theme-classic/navbar.json @@ -58,5 +58,13 @@ "item.label.Service mesh Solution": { "message": "Service mesh Solution", "description": "Navbar item with label Service mesh Solution" + }, + "item.label. ": { + "message": " ", + "description": "Navbar item with label " + }, + "item.label.NACOS CLOUD": { + "message": "NACOS CLOUD", + "description": "Navbar item with label NACOS CLOUD" } } diff --git a/src/pages/community/index.tsx b/src/pages/community/index.tsx index 4200000c507..a8ee7a91a5d 100644 --- a/src/pages/community/index.tsx +++ b/src/pages/community/index.tsx @@ -54,28 +54,28 @@ const data = { img: "https://img.alicdn.com/imgextra/i3/O1CN018jYPjh1EwZeZ0x4Ir_!!6000000000416-2-tps-160-160.png", imgHover: "https://img.alicdn.com/imgextra/i4/O1CN017jnUKf1MHMwlRqS5W_!!6000000001409-2-tps-160-160.png", - title: "邮件列表", + title: translate({ id: 'community.contactsListTitle1', message: '邮件列表' }), link: "mailto:nacos_dev@linux.alibaba.com", }, { img: "https://img.alicdn.com/imgextra/i1/O1CN010WA9R91tvZ1fQNaQt_!!6000000005964-2-tps-172-172.png", imgHover: "https://img.alicdn.com/imgextra/i1/O1CN01ZJTRpF21zhWvsfrOx_!!6000000007056-2-tps-172-172.png", - title: "Gitter", + title: translate({ id: 'community.contactsListTitle2', message: 'Gitter' }), link: "https://gitter.im/alibaba/nacos", }, { img: "https://img.alicdn.com/imgextra/i3/O1CN01dMENDd1PMM6bEAWOM_!!6000000001826-2-tps-304-88.png", imgHover: "https://img.alicdn.com/imgextra/i3/O1CN01vhGiH71h5YfChGR07_!!6000000004226-2-tps-304-88.png", - title: "segmentfault", + title: translate({ id: 'community.contactsListTitle3', message: 'segmentfault' }), link: "https://segmentfault.com/t/nacos", }, { img: "https://img.alicdn.com/imgextra/i2/O1CN01u1oA5a1eWdEBcbsul_!!6000000003879-2-tps-164-172.png", imgHover: "https://img.alicdn.com/imgextra/i1/O1CN01eE6zkk1f96UzJlXtN_!!6000000003963-2-tps-164-172.png", - title: "@Nacos", + title: translate({ id: 'community.contactsListTitle4', message: '@Nacos' }), link: "https://weibo.com/u/6574374908", }, ], @@ -86,37 +86,46 @@ const data = { list: [ { img: "https://img.alicdn.com/imgextra/i3/O1CN018jYPjh1EwZeZ0x4Ir_!!6000000000416-2-tps-160-160.png", - title: "邮件列表", + title: translate({ id: 'community.contributeListTitle1', message: '邮件列表' }), content: ( - 发送 邮件列表 参与讨论。 + + {translate({ id: 'community.contributeListContent1', message: '邮件列表' })} + ), }, { img: "https://img.alicdn.com/imgextra/i3/O1CN01HZvKBp1IWFLd5xG19_!!6000000000900-2-tps-160-160.png", - title: "报告缺陷", + title: translate({ id: 'community.contributeListTitle2', message: '报告缺陷' }), content: ( - 通过 Github issues 报告缺陷。 + {translate({ id: 'community.contributeListContent2_1', message: '通过' })} + Github issues + {translate({ id: 'community.contributeListContent2_2', message: '报告缺陷。' })} ), }, { img: "https://img.alicdn.com/imgextra/i4/O1CN01bYb6VG1JUhd9wqL83_!!6000000001032-2-tps-160-160.png", - title: "文档", + title: translate({ id: 'community.contributeListTitle3', message: '文档' }), content: ( - 优化Nacos 文档。 + {translate({ id: 'community.contributeListContent3_1', message: '优化 Nacos' })}  + + {translate({ id: 'community.contributeListContent3_2', message: '文档' })} + ), }, { img: "https://img.alicdn.com/imgextra/i3/O1CN01wewhuB23ZFtOpVoZ1_!!6000000007269-2-tps-160-160.png", - title: "Pull Request", + title: translate({ id: 'community.contributeListTitle4', message: 'Pull Request' }), content: ( - 提交 Pull requests 来修复问题。 + {translate({ id: 'community.contributeListContent2_1', message: '提交' })} + Pull requests + {translate({ id: 'community.contributeListContent2_2', message: '来修复问题。' })} ), }, @@ -124,15 +133,12 @@ const data = { }, ecos: { title: translate({ id: "community.dubboTitle", message: "开源生态相关" }), - // desc: translate({ id: 'community.dubboDesc', message: 'Nacos社区欢迎任何形式的贡献。' }), list: [ { title: "Dubbo and Dubbo Mesh", content: ( - Dubbo 及 - Nacos是阿里巴巴大规模微服务生产实践中的经典组合,对比传统的如ZooKeeper等注册中心与配置中心解决方案,在使用云原生及Service - Mesh范式构建微服务应用平台时,通过在Dubbo中使用Nacos,可以完全释放Dubbo在大规模微服务治理、流量管理、服务集成及共享上的所有威力。 + {translate({ id: 'community.ecosListContent1', message: 'Dubbo 及Nacos是阿里巴巴大规模微服务生产实践中的经典组合,对比传统的如ZooKeeper等注册中心与配置中心解决方案,在使用云原生及ServiceMesh范式构建微服务应用平台时,通过在Dubbo中使用Nacos,可以完全释放Dubbo在大规模微服务治理、流量管理、服务集成及共享上的所有威力。' })} ), tags: [ @@ -152,10 +158,7 @@ const data = { title: "Kubernetes and CNCF", content: ( - Nacos 支持Kubernetes 以及 - CNCF所需要的服务发现及动态配置管理的需求,Nacos可以完全无缝的替代Kubernetes的原生的DNS-based - Service Discovery 解决方案,Nacos - 提供了更多的服务治理侧的特性,这包括服务的域名管理,服务健康及生命周期管理,流量管理及智能路由策略管理等,Nacos也增强了对ConfigMap的管理,这包括版本配置、灰度发布等。 + {translate({ id: 'community.ecosListContent2', message: 'Nacos 支持Kubernetes 以及CNCF所需要的服务发现及动态配置管理的需求,Nacos可以完全无缝的替代Kubernetes的原生的DNS-basedService Discovery 解决方案,Nacos提供了更多的服务治理侧的特性,这包括服务的域名管理,服务健康及生命周期管理,流量管理及智能路由策略管理等,Nacos也增强了对ConfigMap的管理,这包括版本配置、灰度发布等。'})} ), tags: [ @@ -175,9 +178,7 @@ const data = { title: "Spring Cloud", content: ( - Nacos 完全兼容和无缝支持 Spring Cloud的相关API及主要相关功能,你可以将Nacos作为SpringCloud Config - Server的配置服务或者Eureka/Consul/ZooKeeper等的服务发现产品的更好替代者,Nacos - 在配置管理和服务管理上带来了很多面向生产及微服务治理所需要的特性增强。 + {translate({ id: 'community.ecosListContent3', message: 'Nacos 完全兼容和无缝支持 Spring Cloud的相关API及主要相关功能,你可以将Nacos作为SpringCloud ConfigServer的配置服务或者Eureka/Consul/ZooKeeper等的服务发现产品的更好替代者,Nacos在配置管理和服务管理上带来了很多面向生产及微服务治理所需要的特性增强。'})} ), tags: [