From 6d3ec4a512a2f5937d63b045fec412d754e2dec9 Mon Sep 17 00:00:00 2001 From: liuboaibc Date: Tue, 26 May 2020 16:14:18 +0800 Subject: [PATCH] update README --- README.md | 74 ++++++++++++++ config.toml | 122 +++++++++++++++++++++++ content/tr/_index.md | 159 ++++++++++++++++++++++++++++++ content/tr/case/_index.md | 6 ++ content/tr/contribution/_index.md | 6 ++ content/tr/partner/_index.md | 6 ++ data/tr/footer.yaml | 51 ++++++++++ i18n/en.yaml | 1 - i18n/tr.yaml | 2 + 9 files changed, 426 insertions(+), 1 deletion(-) create mode 100644 content/tr/_index.md create mode 100644 content/tr/case/_index.md create mode 100644 content/tr/contribution/_index.md create mode 100644 content/tr/partner/_index.md create mode 100644 data/tr/footer.yaml create mode 100644 i18n/tr.yaml diff --git a/README.md b/README.md index 9f2e7d486..c68234ffe 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,76 @@ # website kubesphere website + +## Contribute + +### Fork and clone the repo + +First, create your own fork of the repository. + +Then, clone your fork and cd into it: + +``` +git clone https://github.com//website +cd website +``` + +### Running the website locally + +hugo version: hugo_extended_0.70.0 + [hugo releases](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request#creating-a-new-pull-request) + +installed Hugo and clone this project locally. then run: + +``` +hugo server -D +``` + +### Open a pull request + +open a [pull request (PR)](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request#creating-a-new-pull-request) to add a localization to the repository. + +## Localizing + +### Find your two-letter language code + +First, find your localization’s two-letter country code. For example, the two-letter code for Turkey is tr. then, open `config.toml`, change the menu which language you want to translate。 + +``` +[languages.tr] +weight = 3 +contentDir = "content/tr" // there should be changed +languageCode = "tr-TR" // there should be changed +languageName = "Türk" // there should be changed + +[[languages.tr.menu.main]] +weight = 1 +name = "Why KubeSphere" // there should be translated +URL = "reason" + +[[languages.tr.menu.main]] +weight = 2 +name = "Scenario" // there should be translated +hasChildren = true + + [[languages.tr.menu.main]] + parent = "Scenario" // there should be translated + name = "Multi-cluster" // there should be translated + URL = "multi-cluster" + weight = 1 + +``` + +### Add a new localization directory + +Add a language-specific subdirectory to the content folder in the repository. For example, the two-letter code for German is de. It should be named as what you set in `contentDir` in the previous step + +### Translating content + +Localizations must be based on the English files in `content/en` . Some attributes which represent some resource paths do not need to be translated,like `icon`,`image` ,etc. + +### Site strings in i18n + +Localizations must include the contents of i18n/en.yaml in a new language-specific file. + +### Translating data + +Localizations must be based on the English files in `data/en` . diff --git a/config.toml b/config.toml index 41b829802..2603c601c 100644 --- a/config.toml +++ b/config.toml @@ -248,4 +248,126 @@ name = "Community" parent = "Community" name = "Partner" URL = "partner" + weight = 3 + + + +[languages.tr] +weight = 3 +contentDir = "content/tr" +languageCode = "tr-TR" +languageName = "Türk" + +[[languages.tr.menu.main]] +weight = 1 +name = "Why KubeSphere" +URL = "reason" + +[[languages.tr.menu.main]] +weight = 2 +name = "Scenario" +hasChildren = true + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "Multi-cluster" + URL = "multi-cluster" + weight = 1 + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "DevOps" + URL = "devOps" + weight = 2 + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "Network" + URL = "network" + weight = 3 + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "Service Mesh" + URL = "service-mesh" + weight = 4 + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "Storage" + URL = "storage" + weight = 5 + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "AppStore" + URL = "app-store" + weight = 6 + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "Multi-tenancy" + URL = "multi-tenancy" + weight = 7 + + [[languages.tr.menu.main]] + parent = "Scenario" + name = "Observability" + URL = "observability" + weight = 8 + +[[languages.tr.menu.main]] +weight = 3 +name = "Resources" +hasChildren = true + + [[languages.tr.menu.main]] + parent = "Resources" + name = "Open Source Projects" + URL = "projects" + weight = 1 + + [[languages.tr.menu.main]] + parent = "Resources" + name = "KubeCon & QCon" + URL = "conferences" + weight = 2 + + [[languages.tr.menu.main]] + parent = "Resources" + name = "Technology Blogs" + URL = "blogs" + weight = 3 + + [[languages.tr.menu.main]] + parent = "Resources" + name = "Video Resources" + URL = "videos" + weight = 4 + +[[languages.tr.menu.main]] +weight = 4 +name = "Documentation" +URL = "docs" + +[[languages.tr.menu.main]] +weight = 5 +hasChildren = true +name = "Community" + [[languages.tr.menu.main]] + parent = "Community" + name = "Contribution" + URL = "contribution" + weight = 1 + + [[languages.tr.menu.main]] + parent = "Community" + name = "Case Studies" + URL = "case" + weight = 2 + + [[languages.tr.menu.main]] + parent = "Community" + name = "Partner" + URL = "partner" weight = 3 \ No newline at end of file diff --git a/content/tr/_index.md b/content/tr/_index.md new file mode 100644 index 000000000..2ebe2f519 --- /dev/null +++ b/content/tr/_index.md @@ -0,0 +1,159 @@ +--- +title: +description: + + +css: scss/index.scss + +section1: + title: + topic: + content: + btnContent1: + btnContent2: + +section2: + title: + content: + children: + - name: + icon: /images/home/open-source.svg + content: + + - name: + icon: /images/home/easy-to-run.svg + content: + + - name: + icon: /images/home/feature-rich.svg + content: + + - name: + icon: /images/home/modular-pluggable.svg + content: + + + +section3: + title: + content: + children: + - name: + content: + icon: /images/home/7.svg + children: + - content: + - content: + - content: + - content: + + - name: + content: + icon: /images/home/74.png + children: + - content: + - content: + - content: + - content: + + - name: + content: + icon: /images/home/71.svg + children: + - content: + - content: + - content: + - content: + +section4: + title: + content: + children: + - name: + icon: /images/home/provisioning-kubernetes.svg + content: + + - name: + icon: /images/home/k-8-s-resource-management.svg + content: + + - name: + icon: /images/home/multi-tenant-management.svg + content: + + features: + - name: + icon: /images/home/store.svg + content: + color: grape + + - name: + icon: /images/home/service.svg + content: + color: red + + - name: + icon: /images/home/rich.svg + content: + color: green + + - name: + icon: /images/home/dev-ops.svg + content: + color: orange + + - name: + icon: /images/home/multiple.svg + content: + color: grape + + - name: + icon: /images/home/network.svg + content: + color: green + + - name: + icon: /images/home/management.svg + content: + color: orange + +section5: + title: + frontEnd: + title: + project: + children: + - icon: /images/home/mobx.jpg + - icon: /images/home/koa.jpg + - icon: /images/home/react.png + + backEnd: + title: + project: + group: + - name: + - name: + - name: + - name: + + +section6: + title: + content: + children: + - icon: /images/home/section6-1.jpg + - icon: /images/home/section6-2.jpg + - icon: /images/home/section6-3.jpg + - icon: /images/home/section6-4.jpg + - icon: /images/home/section6-5.jpg + - icon: /images/home/section6-6.jpg + - icon: /images/home/section6-7.jpg + - icon: /images/home/section6-8.jpg + - icon: /images/home/section6-9.jpg + - icon: /images/home/section6-10.jpg + btnContent: + btnLink: + link: + linkContent: + image: /images/home/certification.jpg +--- \ No newline at end of file diff --git a/content/tr/case/_index.md b/content/tr/case/_index.md new file mode 100644 index 000000000..280ebc566 --- /dev/null +++ b/content/tr/case/_index.md @@ -0,0 +1,6 @@ +--- +title: + +css: scss/case.scss + +--- \ No newline at end of file diff --git a/content/tr/contribution/_index.md b/content/tr/contribution/_index.md new file mode 100644 index 000000000..38c696058 --- /dev/null +++ b/content/tr/contribution/_index.md @@ -0,0 +1,6 @@ +--- +title: + +css: scss/contribution.scss + +--- \ No newline at end of file diff --git a/content/tr/partner/_index.md b/content/tr/partner/_index.md new file mode 100644 index 000000000..cedfae8f7 --- /dev/null +++ b/content/tr/partner/_index.md @@ -0,0 +1,6 @@ +--- +title: + +css: scss/partner.scss + +--- \ No newline at end of file diff --git a/data/tr/footer.yaml b/data/tr/footer.yaml new file mode 100644 index 000000000..f183646a7 --- /dev/null +++ b/data/tr/footer.yaml @@ -0,0 +1,51 @@ +footer: + list: + - title: + list: + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + + - content: + link: '' + - title: + list: + - content: + link: + - content: + link: + - content: + link: + - content: + link: + - title: + list: + - content: + link: '' + - content: + link: '' + - content: + link: '' + - content: + link: '' + - title: + list: + - content: + link: + - content: + link: + - content: + link: + - content: + link: \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml index 68db6c0a2..ce13c85d7 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,4 +1,3 @@ - - id: introduction2 translation: KubeSphere®️ 2020 All Rights Reserved. - id: introduction3 diff --git a/i18n/tr.yaml b/i18n/tr.yaml new file mode 100644 index 000000000..d90059cc6 --- /dev/null +++ b/i18n/tr.yaml @@ -0,0 +1,2 @@ +- id: introduction2 + translation: ''