From b9d77cd6676807deceebbaee3e74417aa69d1cbf Mon Sep 17 00:00:00 2001 From: lucperkins Date: Fri, 19 Jul 2019 10:34:31 -0700 Subject: [PATCH 1/4] Provide initial scaffolding for zh translation Signed-off-by: lucperkins --- config.yaml | 10 +++++++++- content/{ => en}/docs/_index.md | 0 content/{ => en}/docs/alerts/_index.md | 0 content/{ => en}/docs/alerts/formatting.md | 0 content/{ => en}/docs/configuration.md | 0 content/{ => en}/docs/event-sources/_index.md | 0 content/{ => en}/docs/event-sources/dropped-events.md | 0 content/{ => en}/docs/event-sources/kernel-module.md | 0 .../{ => en}/docs/event-sources/kubernetes-audit.md | 0 content/{ => en}/docs/event-sources/sample-events.md | 0 content/{ => en}/docs/examples.md | 0 content/{ => en}/docs/installation.md | 0 content/{ => en}/docs/rules/_index.md | 0 content/{ => en}/docs/rules/default-custom.md | 0 content/{ => en}/docs/rules/default-macros.md | 0 content/{ => en}/docs/rules/supported-fields.md | 0 content/{ => en}/docs/running.md | 0 content/{ => en}/docs/source.md | 0 layouts/.gitkeep => i18n/en.yaml | 0 i18n/zh.yaml | 0 20 files changed, 9 insertions(+), 1 deletion(-) rename content/{ => en}/docs/_index.md (100%) rename content/{ => en}/docs/alerts/_index.md (100%) rename content/{ => en}/docs/alerts/formatting.md (100%) rename content/{ => en}/docs/configuration.md (100%) rename content/{ => en}/docs/event-sources/_index.md (100%) rename content/{ => en}/docs/event-sources/dropped-events.md (100%) rename content/{ => en}/docs/event-sources/kernel-module.md (100%) rename content/{ => en}/docs/event-sources/kubernetes-audit.md (100%) rename content/{ => en}/docs/event-sources/sample-events.md (100%) rename content/{ => en}/docs/examples.md (100%) rename content/{ => en}/docs/installation.md (100%) rename content/{ => en}/docs/rules/_index.md (100%) rename content/{ => en}/docs/rules/default-custom.md (100%) rename content/{ => en}/docs/rules/default-macros.md (100%) rename content/{ => en}/docs/rules/supported-fields.md (100%) rename content/{ => en}/docs/running.md (100%) rename content/{ => en}/docs/source.md (100%) rename layouts/.gitkeep => i18n/en.yaml (100%) create mode 100644 i18n/zh.yaml diff --git a/config.yaml b/config.yaml index 84db83fc0..d8fde8b00 100644 --- a/config.yaml +++ b/config.yaml @@ -1,10 +1,18 @@ baseURL: / languageCode: en-us -title: Falco - Container Native Runtime Security theme: falco-fresh disableKinds: ["taxonomy", "taxonomyTerm"] pygmentsCodefences: true pygmentsStyle: monokai +defaultContentLanguage: en + +languages: + en: + title: Falco — Container-native Runtime Security + contentDir: content/en + zh: + title: Falco — Container-native Runtime Security + contentDir: content/zh params: version: v0.15.3 diff --git a/content/docs/_index.md b/content/en/docs/_index.md similarity index 100% rename from content/docs/_index.md rename to content/en/docs/_index.md diff --git a/content/docs/alerts/_index.md b/content/en/docs/alerts/_index.md similarity index 100% rename from content/docs/alerts/_index.md rename to content/en/docs/alerts/_index.md diff --git a/content/docs/alerts/formatting.md b/content/en/docs/alerts/formatting.md similarity index 100% rename from content/docs/alerts/formatting.md rename to content/en/docs/alerts/formatting.md diff --git a/content/docs/configuration.md b/content/en/docs/configuration.md similarity index 100% rename from content/docs/configuration.md rename to content/en/docs/configuration.md diff --git a/content/docs/event-sources/_index.md b/content/en/docs/event-sources/_index.md similarity index 100% rename from content/docs/event-sources/_index.md rename to content/en/docs/event-sources/_index.md diff --git a/content/docs/event-sources/dropped-events.md b/content/en/docs/event-sources/dropped-events.md similarity index 100% rename from content/docs/event-sources/dropped-events.md rename to content/en/docs/event-sources/dropped-events.md diff --git a/content/docs/event-sources/kernel-module.md b/content/en/docs/event-sources/kernel-module.md similarity index 100% rename from content/docs/event-sources/kernel-module.md rename to content/en/docs/event-sources/kernel-module.md diff --git a/content/docs/event-sources/kubernetes-audit.md b/content/en/docs/event-sources/kubernetes-audit.md similarity index 100% rename from content/docs/event-sources/kubernetes-audit.md rename to content/en/docs/event-sources/kubernetes-audit.md diff --git a/content/docs/event-sources/sample-events.md b/content/en/docs/event-sources/sample-events.md similarity index 100% rename from content/docs/event-sources/sample-events.md rename to content/en/docs/event-sources/sample-events.md diff --git a/content/docs/examples.md b/content/en/docs/examples.md similarity index 100% rename from content/docs/examples.md rename to content/en/docs/examples.md diff --git a/content/docs/installation.md b/content/en/docs/installation.md similarity index 100% rename from content/docs/installation.md rename to content/en/docs/installation.md diff --git a/content/docs/rules/_index.md b/content/en/docs/rules/_index.md similarity index 100% rename from content/docs/rules/_index.md rename to content/en/docs/rules/_index.md diff --git a/content/docs/rules/default-custom.md b/content/en/docs/rules/default-custom.md similarity index 100% rename from content/docs/rules/default-custom.md rename to content/en/docs/rules/default-custom.md diff --git a/content/docs/rules/default-macros.md b/content/en/docs/rules/default-macros.md similarity index 100% rename from content/docs/rules/default-macros.md rename to content/en/docs/rules/default-macros.md diff --git a/content/docs/rules/supported-fields.md b/content/en/docs/rules/supported-fields.md similarity index 100% rename from content/docs/rules/supported-fields.md rename to content/en/docs/rules/supported-fields.md diff --git a/content/docs/running.md b/content/en/docs/running.md similarity index 100% rename from content/docs/running.md rename to content/en/docs/running.md diff --git a/content/docs/source.md b/content/en/docs/source.md similarity index 100% rename from content/docs/source.md rename to content/en/docs/source.md diff --git a/layouts/.gitkeep b/i18n/en.yaml similarity index 100% rename from layouts/.gitkeep rename to i18n/en.yaml diff --git a/i18n/zh.yaml b/i18n/zh.yaml new file mode 100644 index 000000000..e69de29bb From 5abe8648f12cbb283a78a31f5ab68ec467572879 Mon Sep 17 00:00:00 2001 From: lucperkins Date: Tue, 23 Jul 2019 11:02:39 -0700 Subject: [PATCH 2/4] Make front page translation ready Signed-off-by: lucperkins --- config.yaml | 194 ++++++++++++------ i18n/en.yaml | 2 + i18n/zh.yaml | 2 + .../layouts/partials/hero-body.html | 13 +- .../layouts/partials/hero-footer.html | 4 +- .../falco-fresh/layouts/partials/navbar.html | 6 +- .../layouts/partials/section-about.html | 6 +- 7 files changed, 152 insertions(+), 75 deletions(-) diff --git a/config.yaml b/config.yaml index 78c787cda..aeb1695ff 100644 --- a/config.yaml +++ b/config.yaml @@ -10,9 +10,141 @@ languages: en: title: Falco — Container-native Runtime Security contentDir: content/en + params: + heroText: + # Main hero title + title: Container Native Runtime Security + # Hero subtitle (optional) + subtitle: Falco is an open source project for intrusion and abnormality detection for Cloud Native platforms such as Kubernetes, Mesosphere, and Cloud Foundry. Detect abnormal application behavior. Alert via Slack, Fluentd, NATS, and more. Protect your platform by taking action through serverless (FaaS) frameworks, or other automation. + # Button text + buttontext: Get started + sectionAbout: + title: About Falco. + summary: With more responsibility shifting left to developers and the opaque nature of containers, organizations require deeper insight into container activities. The Falco project was hatched to understand container behavior and protect your platform from possible malicious activity. Leveraging Sysdig’s open source Linux kernel instrumentation, Falco gains deep insight into system behavior. The rules engine can then detect abnormal activity in applications, containers, the underlying host, and the container platform. + section1: + title: Key Features. + subtitle: + tiles: + - title: Platform Aware + icon: check.png + text: Build rules specific to your Cloud Native platforms to enforce policy across all your containers & microservices. + - title: Container-native + icon: box.png + text: Runtime Security built for containers. Built from the ground up to natively support containerized applications. + - title: Deep Visibility + icon: scalable.png + text: Complete container visibility through a single sensor. Gain insight into application and container behavior. + section2: + title: Downloads + Resources. + subtitle: Get started today, contribute to the open source project, & learn more. + resources: + - title: Contribute + text: Jump over to our GitHub page to contribute to our open source ecosystem. + # Icon (from /images/illustrations/icons/___.svg) + icon: group.png + buttonText: Falco Github + buttonLink: https://github.com/falcosecurity/falco + - title: Download + text: Get started with our Falco installation guide. + icon: download.png + buttonText: Falco Install Guide + buttonLink: /docs/installation + - title: Documentation + text: In the official docs, you can find information about [installing Falco](/docs/installation), [configuration options](/docs/configuration), and writing [custom rules](/docs/rules). + icon: documentation-2.png + buttonText: /docs + buttonLink: /docs + - title: Connect + text: Join our Slack team to interact with other users and developers. + icon: chat.png + buttonText: Falco Slack + buttonLink: https://slack.sysdig.com + section3: + title: Stay up to date. + subtitle: Sign-up for project updates. + buttonText: Sign-up! + menu: + navbar: + - name: About + url: "/#about" + weight: 1 + - name: Features + url: "/#features" + weight: 2 + - name: Download + url: "/#download" + - name: Docs + url: /docs + weight: 3 zh: title: Falco — Container-native Runtime Security contentDir: content/zh + params: + heroText: + # Main hero title + title: Container Native Runtime Security + # Hero subtitle (optional) + subtitle: Falco is an open source project for intrusion and abnormality detection for Cloud Native platforms such as Kubernetes, Mesosphere, and Cloud Foundry. Detect abnormal application behavior. Alert via Slack, Fluentd, NATS, and more. Protect your platform by taking action through serverless (FaaS) frameworks, or other automation. + # Button text + buttontext: Get started + sectionAbout: + title: About Falco. + summary: With more responsibility shifting left to developers and the opaque nature of containers, organizations require deeper insight into container activities. The Falco project was hatched to understand container behavior and protect your platform from possible malicious activity. Leveraging Sysdig’s open source Linux kernel instrumentation, Falco gains deep insight into system behavior. The rules engine can then detect abnormal activity in applications, containers, the underlying host, and the container platform. + section1: + title: Key Features. + subtitle: + tiles: + - title: Platform Aware + icon: check.png + text: Build rules specific to your Cloud Native platforms to enforce policy across all your containers & microservices. + - title: Container-native + icon: box.png + text: Runtime Security built for containers. Built from the ground up to natively support containerized applications. + - title: Deep Visibility + icon: scalable.png + text: Complete container visibility through a single sensor. Gain insight into application and container behavior. + section2: + title: Downloads + Resources. + subtitle: Get started today, contribute to the open source project, & learn more. + resources: + - title: Contribute + text: Jump over to our GitHub page to contribute to our open source ecosystem. + # Icon (from /images/illustrations/icons/___.svg) + icon: group.png + buttonText: Falco Github + buttonLink: https://github.com/falcosecurity/falco + - title: Download + text: Get started with our Falco installation guide. + icon: download.png + buttonText: Falco Install Guide + buttonLink: /docs/installation + - title: Documentation + text: In the official docs, you can find information about [installing Falco](/docs/installation), [configuration options](/docs/configuration), and writing [custom rules](/docs/rules). + icon: documentation-2.png + buttonText: /docs + buttonLink: /docs + - title: Connect + text: Join our Slack team to interact with other users and developers. + icon: chat.png + buttonText: Falco Slack + buttonLink: https://slack.sysdig.com + section3: + title: Stay up to date. + subtitle: Sign-up for project updates. + buttonText: Sign-up! + menu: + navbar: + - name: About + url: "/#about" + weight: 1 + - name: Features + url: "/#features" + weight: 2 + - name: Download + url: "/#download" + - name: Docs + url: /docs + weight: 3 params: version: v0.16.0 @@ -23,12 +155,6 @@ params: secondaryFont: name: "MaaxMono" hero: - # Main hero title - title: Container Native Runtime Security - # Hero subtitle (optional) - subtitle: Falco is an open source project for intrusion and abnormality detection for Cloud Native platforms such as Kubernetes, Mesosphere, and Cloud Foundry. Detect abnormal application behavior. Alert via Slack, Fluentd, NATS, and more. Protect your platform by taking action through serverless (FaaS) frameworks, or other automation. - # Button text - buttontext: Get started # Where the main hero button links to buttonlink: "#download" # Hero image (from /images/___) @@ -59,58 +185,4 @@ params: logo: cncf-black.svg cncfLink: https://cncf.io level: Sandbox - levelLink: https://github.com/cncf/toc/blob/master/process/sandbox.md - menu: - - title: About - url: "/#about" - - title: Features - url: "/#features" - - title: Download - url: "/#download" - - title: Docs - url: /docs - sectionAbout: - title: About Falco. - summary: With more responsibility shifting left to developers and the opaque nature of containers, organizations require deeper insight into container activities. The Falco project was hatched to understand container behavior and protect your platform from possible malicious activity. Leveraging Sysdig’s open source Linux kernel instrumentation, Falco gains deep insight into system behavior. The rules engine can then detect abnormal activity in applications, containers, the underlying host, and the container platform. - section1: - title: Key Features. - subtitle: - tiles: - - title: Platform Aware - icon: check.png - text: Build rules specific to your Cloud Native platforms to enforce policy across all your containers & microservices. - - title: Container-native - icon: box.png - text: Runtime Security built for containers. Built from the ground up to natively support containerized applications. - - title: Deep Visibility - icon: scalable.png - text: Complete container visibility through a single sensor. Gain insight into application and container behavior. - section2: - title: Downloads + Resources. - subtitle: Get started today, contribute to the open source project, & learn more. - resources: - - title: Contribute - text: Jump over to our GitHub page to contribute to our open source ecosystem. - # Icon (from /images/illustrations/icons/___.svg) - icon: group.png - buttonText: Falco Github - buttonLink: https://github.com/falcosecurity/falco - - title: Download - text: Get started with our Falco installation guide. - icon: download.png - buttonText: Falco Install Guide - buttonLink: /docs/installation - - title: Documentation - text: In the official docs, you can find information about [installing Falco](/docs/installation), [configuration options](/docs/configuration), and writing [custom rules](/docs/rules). - icon: documentation-2.png - buttonText: /docs - buttonLink: /docs - - title: Connect - text: Join our Slack team to interact with other users and developers. - icon: chat.png - buttonText: Falco Slack - buttonLink: https://slack.sysdig.com - section3: - title: Stay up to date. - subtitle: Sign-up for project updates. - buttonText: Sign-up! + levelLink: https://github.com/cncf/toc/blob/master/process/sandbox.md diff --git a/i18n/en.yaml b/i18n/en.yaml index e69de29bb..721345847 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -0,0 +1,2 @@ +integrations_and_platforms: + other: Integrations & Platforms diff --git a/i18n/zh.yaml b/i18n/zh.yaml index e69de29bb..721345847 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -0,0 +1,2 @@ +integrations_and_platforms: + other: Integrations & Platforms diff --git a/themes/falco-fresh/layouts/partials/hero-body.html b/themes/falco-fresh/layouts/partials/hero-body.html index 9b8dfe3a9..c860c5e85 100644 --- a/themes/falco-fresh/layouts/partials/hero-body.html +++ b/themes/falco-fresh/layouts/partials/hero-body.html @@ -1,9 +1,10 @@ {{- $hero := .Site.Params.hero }} -{{- $title := index $hero "title" }} -{{- $subtitle := index $hero "subtitle" }} -{{- $buttonText := index $hero "buttontext" }} -{{- $buttonLink := index $hero "buttonlink" }} -{{- $image := index $hero "image" }} +{{- $heroText := .Site.Params.heroText }} +{{- $title := $heroText.title }} +{{- $subtitle := $heroText.subtitle }} +{{- $buttonText := $heroText.buttontext }} +{{- $buttonLink := $hero.buttonlink }} +{{- $image := $hero.image }}
@@ -41,4 +42,4 @@

- \ No newline at end of file + diff --git a/themes/falco-fresh/layouts/partials/hero-footer.html b/themes/falco-fresh/layouts/partials/hero-footer.html index 4a1326c6e..ecdea7fb5 100644 --- a/themes/falco-fresh/layouts/partials/hero-footer.html +++ b/themes/falco-fresh/layouts/partials/hero-footer.html @@ -3,7 +3,7 @@
-

Integrations & Platforms

+

{{ T "integrations_and_platforms" }}

    {{- range $clientLogos }} @@ -13,4 +13,4 @@

    Integrations & Platforms

    {{- end }}
-
\ No newline at end of file + diff --git a/themes/falco-fresh/layouts/partials/navbar.html b/themes/falco-fresh/layouts/partials/navbar.html index d3c5be84f..fc64e4aa0 100644 --- a/themes/falco-fresh/layouts/partials/navbar.html +++ b/themes/falco-fresh/layouts/partials/navbar.html @@ -1,5 +1,5 @@ {{- $navbar := .Site.Params.navbar }} -{{- $menu := index $navbar "menu"}} +{{- $menu := .Site.Menus.navbar }} {{- $cncf := index $navbar "cncf" }} {{- $isHome := .IsHome }} {{- $isDocs := eq .Section "docs" }} @@ -20,8 +20,8 @@ - \ No newline at end of file + From 89f6a6c7f4d4c34bec85a89283a01b747edca39d Mon Sep 17 00:00:00 2001 From: lucperkins Date: Tue, 23 Jul 2019 11:10:40 -0700 Subject: [PATCH 3/4] Add Chinese placeholder content Signed-off-by: lucperkins --- config.yaml | 3 ++- content/zh/docs/_index.md | 3 +++ i18n/en.yaml | 4 ++++ i18n/zh.yaml | 4 ++++ themes/falco-fresh/layouts/partials/footer.html | 2 +- themes/falco-fresh/layouts/partials/navbar.html | 13 +++++++------ 6 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 content/zh/docs/_index.md diff --git a/config.yaml b/config.yaml index aeb1695ff..79aa9408e 100644 --- a/config.yaml +++ b/config.yaml @@ -5,6 +5,7 @@ disableKinds: ["taxonomy", "taxonomyTerm"] pygmentsCodefences: true pygmentsStyle: monokai defaultContentLanguage: en +disableLanguages: [zh] languages: en: @@ -88,7 +89,7 @@ languages: # Button text buttontext: Get started sectionAbout: - title: About Falco. + title: About Falco. (in chinese!) summary: With more responsibility shifting left to developers and the opaque nature of containers, organizations require deeper insight into container activities. The Falco project was hatched to understand container behavior and protect your platform from possible malicious activity. Leveraging Sysdig’s open source Linux kernel instrumentation, Falco gains deep insight into system behavior. The rules engine can then detect abnormal activity in applications, containers, the underlying host, and the container platform. section1: title: Key Features. diff --git a/content/zh/docs/_index.md b/content/zh/docs/_index.md new file mode 100644 index 000000000..970247298 --- /dev/null +++ b/content/zh/docs/_index.md @@ -0,0 +1,3 @@ +--- +title: Falco Chinese documentation +--- diff --git a/i18n/en.yaml b/i18n/en.yaml index 721345847..0e8fa8383 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,2 +1,6 @@ integrations_and_platforms: other: Integrations & Platforms +copyright: + other: Copyright +falco_authors: + other: The Falco authors diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 721345847..0e8fa8383 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -1,2 +1,6 @@ integrations_and_platforms: other: Integrations & Platforms +copyright: + other: Copyright +falco_authors: + other: The Falco authors diff --git a/themes/falco-fresh/layouts/partials/footer.html b/themes/falco-fresh/layouts/partials/footer.html index 8f7179f76..c0332fd9b 100644 --- a/themes/falco-fresh/layouts/partials/footer.html +++ b/themes/falco-fresh/layouts/partials/footer.html @@ -4,7 +4,7 @@ {{ if $isHome }}
{{ end }}
- Copyright {{ $year }}, The Falco authors + {{ T "copyright"}} {{ $year }}, {{ T "falco_authors"}}
{{ if $isHome }}
{{ end }} diff --git a/themes/falco-fresh/layouts/partials/navbar.html b/themes/falco-fresh/layouts/partials/navbar.html index fc64e4aa0..2207faa52 100644 --- a/themes/falco-fresh/layouts/partials/navbar.html +++ b/themes/falco-fresh/layouts/partials/navbar.html @@ -1,12 +1,13 @@ -{{- $navbar := .Site.Params.navbar }} -{{- $menu := .Site.Menus.navbar }} -{{- $cncf := index $navbar "cncf" }} -{{- $isHome := .IsHome }} -{{- $isDocs := eq .Section "docs" }} +{{- $navbar := .Site.Params.navbar }} +{{- $menu := .Site.Menus.navbar }} +{{- $cncf := index $navbar "cncf" }} +{{- $isHome := .IsHome }} +{{- $isDocs := eq .Section "docs" }} +{{- $baseUrl := printf "/%s" .Language }}