From ca22e81514e31482baf4aea5d7ef47773d942a35 Mon Sep 17 00:00:00 2001 From: Sayak Mukhopadhyay Date: Wed, 5 Feb 2025 00:45:48 +0530 Subject: [PATCH] feat: use hugo mounts to mount the per folder i18n translations --- data/i18n/OWNERS | 11 ----- hugo.toml | 73 +++++++++++++++++++++++++++- i18n/OWNERS | 13 ++++- i18n/bn.toml | 1 - {data/i18n => i18n}/bn/OWNERS | 0 {data/i18n => i18n}/bn/bn.toml | 0 i18n/de.toml | 1 - {data/i18n => i18n}/de/OWNERS | 0 {data/i18n => i18n}/de/de.toml | 0 i18n/en.toml | 1 - {data/i18n => i18n}/en/OWNERS | 0 {data/i18n => i18n}/en/en.toml | 0 i18n/es.toml | 1 - {data/i18n => i18n}/es/OWNERS | 0 {data/i18n => i18n}/es/es.toml | 0 i18n/fr.toml | 1 - {data/i18n => i18n}/fr/OWNERS | 0 {data/i18n => i18n}/fr/fr.toml | 0 i18n/hi.toml | 1 - {data/i18n => i18n}/hi/OWNERS | 0 {data/i18n => i18n}/hi/hi.toml | 0 i18n/id.toml | 1 - {data/i18n => i18n}/id/OWNERS | 0 {data/i18n => i18n}/id/id.toml | 0 i18n/it.toml | 1 - {data/i18n => i18n}/it/OWNERS | 0 {data/i18n => i18n}/it/it.toml | 0 i18n/ja.toml | 1 - {data/i18n => i18n}/ja/OWNERS | 0 {data/i18n => i18n}/ja/ja.toml | 0 i18n/ko.toml | 1 - {data/i18n => i18n}/ko/OWNERS | 0 {data/i18n => i18n}/ko/ko.toml | 0 i18n/nl.toml | 1 - {data/i18n => i18n}/nl/nl.toml | 0 i18n/no.toml | 1 - {data/i18n => i18n}/no/no.toml | 0 i18n/pl.toml | 1 - {data/i18n => i18n}/pl/OWNERS | 0 {data/i18n => i18n}/pl/pl.toml | 0 i18n/pt-br.toml | 1 - {data/i18n => i18n}/pt-br/OWNERS | 0 {data/i18n => i18n}/pt-br/pt-br.toml | 0 i18n/ru.toml | 1 - {data/i18n => i18n}/ru/OWNERS | 0 {data/i18n => i18n}/ru/ru.toml | 0 i18n/uk.toml | 1 - {data/i18n => i18n}/uk/OWNERS | 0 {data/i18n => i18n}/uk/uk.toml | 0 i18n/vi.toml | 1 - {data/i18n => i18n}/vi/OWNERS | 0 {data/i18n => i18n}/vi/vi.toml | 0 i18n/zh-cn.toml | 1 - {data/i18n => i18n}/zh-cn/OWNERS | 0 {data/i18n => i18n}/zh-cn/zh-cn.toml | 0 55 files changed, 83 insertions(+), 32 deletions(-) delete mode 100644 data/i18n/OWNERS delete mode 120000 i18n/bn.toml rename {data/i18n => i18n}/bn/OWNERS (100%) rename {data/i18n => i18n}/bn/bn.toml (100%) delete mode 120000 i18n/de.toml rename {data/i18n => i18n}/de/OWNERS (100%) rename {data/i18n => i18n}/de/de.toml (100%) delete mode 120000 i18n/en.toml rename {data/i18n => i18n}/en/OWNERS (100%) rename {data/i18n => i18n}/en/en.toml (100%) delete mode 120000 i18n/es.toml rename {data/i18n => i18n}/es/OWNERS (100%) rename {data/i18n => i18n}/es/es.toml (100%) delete mode 120000 i18n/fr.toml rename {data/i18n => i18n}/fr/OWNERS (100%) rename {data/i18n => i18n}/fr/fr.toml (100%) delete mode 120000 i18n/hi.toml rename {data/i18n => i18n}/hi/OWNERS (100%) rename {data/i18n => i18n}/hi/hi.toml (100%) delete mode 120000 i18n/id.toml rename {data/i18n => i18n}/id/OWNERS (100%) rename {data/i18n => i18n}/id/id.toml (100%) delete mode 120000 i18n/it.toml rename {data/i18n => i18n}/it/OWNERS (100%) rename {data/i18n => i18n}/it/it.toml (100%) delete mode 120000 i18n/ja.toml rename {data/i18n => i18n}/ja/OWNERS (100%) rename {data/i18n => i18n}/ja/ja.toml (100%) delete mode 120000 i18n/ko.toml rename {data/i18n => i18n}/ko/OWNERS (100%) rename {data/i18n => i18n}/ko/ko.toml (100%) delete mode 120000 i18n/nl.toml rename {data/i18n => i18n}/nl/nl.toml (100%) delete mode 120000 i18n/no.toml rename {data/i18n => i18n}/no/no.toml (100%) delete mode 120000 i18n/pl.toml rename {data/i18n => i18n}/pl/OWNERS (100%) rename {data/i18n => i18n}/pl/pl.toml (100%) delete mode 120000 i18n/pt-br.toml rename {data/i18n => i18n}/pt-br/OWNERS (100%) rename {data/i18n => i18n}/pt-br/pt-br.toml (100%) delete mode 120000 i18n/ru.toml rename {data/i18n => i18n}/ru/OWNERS (100%) rename {data/i18n => i18n}/ru/ru.toml (100%) delete mode 120000 i18n/uk.toml rename {data/i18n => i18n}/uk/OWNERS (100%) rename {data/i18n => i18n}/uk/uk.toml (100%) delete mode 120000 i18n/vi.toml rename {data/i18n => i18n}/vi/OWNERS (100%) rename {data/i18n => i18n}/vi/vi.toml (100%) delete mode 120000 i18n/zh-cn.toml rename {data/i18n => i18n}/zh-cn/OWNERS (100%) rename {data/i18n => i18n}/zh-cn/zh-cn.toml (100%) diff --git a/data/i18n/OWNERS b/data/i18n/OWNERS deleted file mode 100644 index 07352032a8..0000000000 --- a/data/i18n/OWNERS +++ /dev/null @@ -1,11 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -# This is the directory for all source content. -# Teams and members are visible at https://github.com/orgs/kubernetes/teams. - -reviewers: -- sig-docs-localization-reviewers - -approvers: -- sig-docs-localization-owners -- sig-docs-website-owners diff --git a/hugo.toml b/hugo.toml index e95a6b2fce..fdf901fc97 100644 --- a/hugo.toml +++ b/hugo.toml @@ -293,7 +293,6 @@ languageName = "English" # Weight used for sorting. weight = 1 languagedirection = "ltr" -i18nDir = "./data/i18n" [languages.en.params] description = "Production-Grade Container Orchestration" @@ -517,3 +516,75 @@ languagedirection = "ltr" languageNameLatinScript = "Tiếng Việt" description = "Giải pháp điều phối container trong môi trường production" +# Ensure that the correct file names are in the correct directory. For e.g. i18n/en should contain en.toml and never de.toml +[[module.mounts]] +source = "i18n/bn" +target = "i18n" + +[[module.mounts]] +source = "i18n/de" +target = "i18n" + +[[module.mounts]] +source = "i18n/en" +target = "i18n" + +[[module.mounts]] +source = "i18n/es" +target = "i18n" + +[[module.mounts]] +source = "i18n/fr" +target = "i18n" + +[[module.mounts]] +source = "i18n/hi" +target = "i18n" + +[[module.mounts]] +source = "i18n/id" +target = "i18n" + +[[module.mounts]] +source = "i18n/it" +target = "i18n" + +[[module.mounts]] +source = "i18n/ja" +target = "i18n" + +[[module.mounts]] +source = "i18n/ko" +target = "i18n" + +[[module.mounts]] +source = "i18n/nl" +target = "i18n" + +[[module.mounts]] +source = "i18n/no" +target = "i18n" + +[[module.mounts]] +source = "i18n/pl" +target = "i18n" + +[[module.mounts]] +source = "i18n/pt-br" +target = "i18n" + +[[module.mounts]] +source = "i18n/ru" +target = "i18n" + +[[module.mounts]] +source = "i18n/uk" +target = "i18n" + +[[module.mounts]] +source = "i18n/vi" +target = "i18n" + +[[module.mounts]] +source = "i18n/zh-cn" +target = "i18n" diff --git a/i18n/OWNERS b/i18n/OWNERS index 83c9158cd2..07352032a8 100644 --- a/i18n/OWNERS +++ b/i18n/OWNERS @@ -1,2 +1,11 @@ -# No owner overrides here -# See data/i18n/*/OWNERS instead +# See the OWNERS docs at https://go.k8s.io/owners + +# This is the directory for all source content. +# Teams and members are visible at https://github.com/orgs/kubernetes/teams. + +reviewers: +- sig-docs-localization-reviewers + +approvers: +- sig-docs-localization-owners +- sig-docs-website-owners diff --git a/i18n/bn.toml b/i18n/bn.toml deleted file mode 120000 index 8fa2e4ddc5..0000000000 --- a/i18n/bn.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/bn/bn.toml \ No newline at end of file diff --git a/data/i18n/bn/OWNERS b/i18n/bn/OWNERS similarity index 100% rename from data/i18n/bn/OWNERS rename to i18n/bn/OWNERS diff --git a/data/i18n/bn/bn.toml b/i18n/bn/bn.toml similarity index 100% rename from data/i18n/bn/bn.toml rename to i18n/bn/bn.toml diff --git a/i18n/de.toml b/i18n/de.toml deleted file mode 120000 index 4435a0f16c..0000000000 --- a/i18n/de.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/de/de.toml \ No newline at end of file diff --git a/data/i18n/de/OWNERS b/i18n/de/OWNERS similarity index 100% rename from data/i18n/de/OWNERS rename to i18n/de/OWNERS diff --git a/data/i18n/de/de.toml b/i18n/de/de.toml similarity index 100% rename from data/i18n/de/de.toml rename to i18n/de/de.toml diff --git a/i18n/en.toml b/i18n/en.toml deleted file mode 120000 index a13dbc01ce..0000000000 --- a/i18n/en.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/en/en.toml \ No newline at end of file diff --git a/data/i18n/en/OWNERS b/i18n/en/OWNERS similarity index 100% rename from data/i18n/en/OWNERS rename to i18n/en/OWNERS diff --git a/data/i18n/en/en.toml b/i18n/en/en.toml similarity index 100% rename from data/i18n/en/en.toml rename to i18n/en/en.toml diff --git a/i18n/es.toml b/i18n/es.toml deleted file mode 120000 index 8bbbc64bd6..0000000000 --- a/i18n/es.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/es/es.toml \ No newline at end of file diff --git a/data/i18n/es/OWNERS b/i18n/es/OWNERS similarity index 100% rename from data/i18n/es/OWNERS rename to i18n/es/OWNERS diff --git a/data/i18n/es/es.toml b/i18n/es/es.toml similarity index 100% rename from data/i18n/es/es.toml rename to i18n/es/es.toml diff --git a/i18n/fr.toml b/i18n/fr.toml deleted file mode 120000 index 1bb0befdcb..0000000000 --- a/i18n/fr.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/fr/fr.toml \ No newline at end of file diff --git a/data/i18n/fr/OWNERS b/i18n/fr/OWNERS similarity index 100% rename from data/i18n/fr/OWNERS rename to i18n/fr/OWNERS diff --git a/data/i18n/fr/fr.toml b/i18n/fr/fr.toml similarity index 100% rename from data/i18n/fr/fr.toml rename to i18n/fr/fr.toml diff --git a/i18n/hi.toml b/i18n/hi.toml deleted file mode 120000 index 36d4a3bf76..0000000000 --- a/i18n/hi.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/hi/hi.toml \ No newline at end of file diff --git a/data/i18n/hi/OWNERS b/i18n/hi/OWNERS similarity index 100% rename from data/i18n/hi/OWNERS rename to i18n/hi/OWNERS diff --git a/data/i18n/hi/hi.toml b/i18n/hi/hi.toml similarity index 100% rename from data/i18n/hi/hi.toml rename to i18n/hi/hi.toml diff --git a/i18n/id.toml b/i18n/id.toml deleted file mode 120000 index 250debab53..0000000000 --- a/i18n/id.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/id/id.toml \ No newline at end of file diff --git a/data/i18n/id/OWNERS b/i18n/id/OWNERS similarity index 100% rename from data/i18n/id/OWNERS rename to i18n/id/OWNERS diff --git a/data/i18n/id/id.toml b/i18n/id/id.toml similarity index 100% rename from data/i18n/id/id.toml rename to i18n/id/id.toml diff --git a/i18n/it.toml b/i18n/it.toml deleted file mode 120000 index bf4e0e004c..0000000000 --- a/i18n/it.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/it/it.toml \ No newline at end of file diff --git a/data/i18n/it/OWNERS b/i18n/it/OWNERS similarity index 100% rename from data/i18n/it/OWNERS rename to i18n/it/OWNERS diff --git a/data/i18n/it/it.toml b/i18n/it/it.toml similarity index 100% rename from data/i18n/it/it.toml rename to i18n/it/it.toml diff --git a/i18n/ja.toml b/i18n/ja.toml deleted file mode 120000 index 6b08e1f22f..0000000000 --- a/i18n/ja.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/ja/ja.toml \ No newline at end of file diff --git a/data/i18n/ja/OWNERS b/i18n/ja/OWNERS similarity index 100% rename from data/i18n/ja/OWNERS rename to i18n/ja/OWNERS diff --git a/data/i18n/ja/ja.toml b/i18n/ja/ja.toml similarity index 100% rename from data/i18n/ja/ja.toml rename to i18n/ja/ja.toml diff --git a/i18n/ko.toml b/i18n/ko.toml deleted file mode 120000 index 093839dd5d..0000000000 --- a/i18n/ko.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/ko/ko.toml \ No newline at end of file diff --git a/data/i18n/ko/OWNERS b/i18n/ko/OWNERS similarity index 100% rename from data/i18n/ko/OWNERS rename to i18n/ko/OWNERS diff --git a/data/i18n/ko/ko.toml b/i18n/ko/ko.toml similarity index 100% rename from data/i18n/ko/ko.toml rename to i18n/ko/ko.toml diff --git a/i18n/nl.toml b/i18n/nl.toml deleted file mode 120000 index 181ed9aedb..0000000000 --- a/i18n/nl.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/nl/nl.toml \ No newline at end of file diff --git a/data/i18n/nl/nl.toml b/i18n/nl/nl.toml similarity index 100% rename from data/i18n/nl/nl.toml rename to i18n/nl/nl.toml diff --git a/i18n/no.toml b/i18n/no.toml deleted file mode 120000 index d27b699464..0000000000 --- a/i18n/no.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/no/no.toml \ No newline at end of file diff --git a/data/i18n/no/no.toml b/i18n/no/no.toml similarity index 100% rename from data/i18n/no/no.toml rename to i18n/no/no.toml diff --git a/i18n/pl.toml b/i18n/pl.toml deleted file mode 120000 index e4ecf8192e..0000000000 --- a/i18n/pl.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/pl/pl.toml \ No newline at end of file diff --git a/data/i18n/pl/OWNERS b/i18n/pl/OWNERS similarity index 100% rename from data/i18n/pl/OWNERS rename to i18n/pl/OWNERS diff --git a/data/i18n/pl/pl.toml b/i18n/pl/pl.toml similarity index 100% rename from data/i18n/pl/pl.toml rename to i18n/pl/pl.toml diff --git a/i18n/pt-br.toml b/i18n/pt-br.toml deleted file mode 120000 index 289fc2f06e..0000000000 --- a/i18n/pt-br.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/pt-br/pt-br.toml \ No newline at end of file diff --git a/data/i18n/pt-br/OWNERS b/i18n/pt-br/OWNERS similarity index 100% rename from data/i18n/pt-br/OWNERS rename to i18n/pt-br/OWNERS diff --git a/data/i18n/pt-br/pt-br.toml b/i18n/pt-br/pt-br.toml similarity index 100% rename from data/i18n/pt-br/pt-br.toml rename to i18n/pt-br/pt-br.toml diff --git a/i18n/ru.toml b/i18n/ru.toml deleted file mode 120000 index 4e9327662b..0000000000 --- a/i18n/ru.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/ru/ru.toml \ No newline at end of file diff --git a/data/i18n/ru/OWNERS b/i18n/ru/OWNERS similarity index 100% rename from data/i18n/ru/OWNERS rename to i18n/ru/OWNERS diff --git a/data/i18n/ru/ru.toml b/i18n/ru/ru.toml similarity index 100% rename from data/i18n/ru/ru.toml rename to i18n/ru/ru.toml diff --git a/i18n/uk.toml b/i18n/uk.toml deleted file mode 120000 index 7066896b8c..0000000000 --- a/i18n/uk.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/uk/uk.toml \ No newline at end of file diff --git a/data/i18n/uk/OWNERS b/i18n/uk/OWNERS similarity index 100% rename from data/i18n/uk/OWNERS rename to i18n/uk/OWNERS diff --git a/data/i18n/uk/uk.toml b/i18n/uk/uk.toml similarity index 100% rename from data/i18n/uk/uk.toml rename to i18n/uk/uk.toml diff --git a/i18n/vi.toml b/i18n/vi.toml deleted file mode 120000 index cc26ca1c86..0000000000 --- a/i18n/vi.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/vi/vi.toml \ No newline at end of file diff --git a/data/i18n/vi/OWNERS b/i18n/vi/OWNERS similarity index 100% rename from data/i18n/vi/OWNERS rename to i18n/vi/OWNERS diff --git a/data/i18n/vi/vi.toml b/i18n/vi/vi.toml similarity index 100% rename from data/i18n/vi/vi.toml rename to i18n/vi/vi.toml diff --git a/i18n/zh-cn.toml b/i18n/zh-cn.toml deleted file mode 120000 index 6c092af81a..0000000000 --- a/i18n/zh-cn.toml +++ /dev/null @@ -1 +0,0 @@ -../data/i18n/zh-cn/zh-cn.toml \ No newline at end of file diff --git a/data/i18n/zh-cn/OWNERS b/i18n/zh-cn/OWNERS similarity index 100% rename from data/i18n/zh-cn/OWNERS rename to i18n/zh-cn/OWNERS diff --git a/data/i18n/zh-cn/zh-cn.toml b/i18n/zh-cn/zh-cn.toml similarity index 100% rename from data/i18n/zh-cn/zh-cn.toml rename to i18n/zh-cn/zh-cn.toml