From bfec9dc2512e973193fc3f8841c6630f5bc333d0 Mon Sep 17 00:00:00 2001 From: newbe36524 Date: Thu, 4 Mar 2021 13:58:52 +0800 Subject: [PATCH 1/2] Add content that translated into zh_Hans --- .gitmodules | 4 ++++ daprdocs/config.toml | 40 ++++++++++++++++++++++++++++++++++++++++ l18n/docs-zh | 1 + 3 files changed, 45 insertions(+) create mode 160000 l18n/docs-zh diff --git a/.gitmodules b/.gitmodules index be99ad3b7..53189ae90 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,7 @@ [submodule "sdkdocs/dotnet"] path = sdkdocs/dotnet url = https://github.com/dapr/dotnet-sdk.git +[submodule "l18n/docs-zh"] + path = l18n/docs-zh + url = https://github.com/dapr/docs-zh.git + branch = v1.0_content diff --git a/daprdocs/config.toml b/daprdocs/config.toml index 3dccca2e7..7957dd23c 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -10,6 +10,18 @@ enableGitInfo = true # Language Configuration languageCode = "en-us" +[languages] + [languages.en] + title = "English" + weight = 1 + contentDir = "content/en" + languageName = "English" + [languages.zh-hans] + title = "简体中文" + weight = 2 + contentDir = "content/zh-hans" + languageName = "简体中文" + # Disable categories & tags disableKinds = ["taxonomy", "term"] @@ -22,6 +34,7 @@ id = "UA-149338238-3" [[module.mounts]] source = "content/en" target = "content" + lang = "en" [[module.mounts]] source = "static" target = "static" @@ -37,21 +50,48 @@ id = "UA-149338238-3" [[module.mounts]] source = "archetypes" target = "archetypes" + [[module.mounts]] source = "../sdkdocs/python/daprdocs/content/en/python-sdk-docs" target = "content/developing-applications/sdks/python" + lang = "en" [[module.mounts]] source = "../sdkdocs/python/daprdocs/content/en/python-sdk-contributing" target = "content/contributing/" + lang = "en" [[module.mounts]] source = "../sdkdocs/php/daprdocs/content/en/php-sdk-docs" target = "content/developing-applications/sdks/php" + lang = "en" [[module.mounts]] source = "../sdkdocs/dotnet/daprdocs/content/en/dotnet-sdk-docs" target = "content/developing-applications/sdks/dotnet" + lang = "en" [[module.mounts]] source = "../sdkdocs/dotnet/daprdocs/content/en/dotnet-sdk-contributing" target = "content/contributing/" + lang = "en" + + [[module.mounts]] + source = "../l18n/docs-zh/content/zh-hans" + target = "content" + lang = "zh-hans" + [[module.mounts]] + source = "../l18n/docs-zh/content/contributing" + target = "content/contributing/" + lang = "zh-hans" + [[module.mounts]] + source = "../l18n/docs-zh/content/sdks_python" + target = "content/developing-applications/sdks/python" + lang = "zh-hans" + [[module.mounts]] + source = "../l18n/docs-zh/content/sdks_php" + target = "content/developing-applications/sdks/php" + lang = "zh-hans" + [[module.mounts]] + source = "../l18n/docs-zh/content/sdks_dotnet" + target = "content/developing-applications/sdks/dotnet" + lang = "zh-hans" # Markdown Engine - Allow inline html [markup] diff --git a/l18n/docs-zh b/l18n/docs-zh new file mode 160000 index 000000000..e26148b86 --- /dev/null +++ b/l18n/docs-zh @@ -0,0 +1 @@ +Subproject commit e26148b866552f94a148c5ad6fe81e066775b804 From 5ef3bf0d28b6a388f5fc4ede7120b80ccf8aa8e2 Mon Sep 17 00:00:00 2001 From: newbe36524 Date: Fri, 5 Mar 2021 12:09:35 +0800 Subject: [PATCH 2/2] Change name of submodule --- .gitmodules | 4 ++-- daprdocs/config.toml | 14 +++++++------- {l18n => translations}/docs-zh | 0 3 files changed, 9 insertions(+), 9 deletions(-) rename {l18n => translations}/docs-zh (100%) diff --git a/.gitmodules b/.gitmodules index 53189ae90..3d8a47fd8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,7 +10,7 @@ [submodule "sdkdocs/dotnet"] path = sdkdocs/dotnet url = https://github.com/dapr/dotnet-sdk.git -[submodule "l18n/docs-zh"] - path = l18n/docs-zh +[submodule "translations/docs-zh"] + path = translations/docs-zh url = https://github.com/dapr/docs-zh.git branch = v1.0_content diff --git a/daprdocs/config.toml b/daprdocs/config.toml index 7957dd23c..8348915d3 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -12,12 +12,12 @@ languageCode = "en-us" [languages] [languages.en] - title = "English" + title = "Dapr Docs" weight = 1 contentDir = "content/en" languageName = "English" [languages.zh-hans] - title = "简体中文" + title = "Dapr 文档库" weight = 2 contentDir = "content/zh-hans" languageName = "简体中文" @@ -73,23 +73,23 @@ id = "UA-149338238-3" lang = "en" [[module.mounts]] - source = "../l18n/docs-zh/content/zh-hans" + source = "../translations/docs-zh/content/zh-hans" target = "content" lang = "zh-hans" [[module.mounts]] - source = "../l18n/docs-zh/content/contributing" + source = "../translations/docs-zh/content/contributing" target = "content/contributing/" lang = "zh-hans" [[module.mounts]] - source = "../l18n/docs-zh/content/sdks_python" + source = "../translations/docs-zh/content/sdks_python" target = "content/developing-applications/sdks/python" lang = "zh-hans" [[module.mounts]] - source = "../l18n/docs-zh/content/sdks_php" + source = "../translations/docs-zh/content/sdks_php" target = "content/developing-applications/sdks/php" lang = "zh-hans" [[module.mounts]] - source = "../l18n/docs-zh/content/sdks_dotnet" + source = "../translations/docs-zh/content/sdks_dotnet" target = "content/developing-applications/sdks/dotnet" lang = "zh-hans" diff --git a/l18n/docs-zh b/translations/docs-zh similarity index 100% rename from l18n/docs-zh rename to translations/docs-zh