From d2057533233c480fde3c526d865cfb1276d6b4ef Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sat, 19 Dec 2020 01:41:26 +0100 Subject: [PATCH] refactor(i18n): translation key renaming (#68) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/63 --- i18n/en.toml | 41 ------------------ i18n/en.yaml | 42 +++++++++++++++++++ i18n/fr.toml | 38 ----------------- i18n/fr.yaml | 38 +++++++++++++++++ i18n/id.toml | 38 ----------------- i18n/id.yaml | 38 +++++++++++++++++ i18n/ja.toml | 23 ---------- i18n/ja.yaml | 24 +++++++++++ i18n/ko.toml | 38 ----------------- i18n/ko.yaml | 38 +++++++++++++++++ i18n/pt-BR.toml | 41 ------------------ i18n/pt-BR.yaml | 42 +++++++++++++++++++ i18n/zh-CN.toml | 32 -------------- i18n/zh-CN.yaml | 36 ++++++++++++++++ layouts/404.html | 4 +- layouts/_default/archives.html | 2 +- layouts/page/search.html | 6 +-- .../partials/article/components/footer.html | 2 +- .../article/components/related-contents.html | 2 +- layouts/partials/footer/footer.html | 4 +- layouts/partials/widget/archives.html | 4 +- layouts/partials/widget/search.html | 4 +- layouts/partials/widget/tag-cloud.html | 2 +- 23 files changed, 273 insertions(+), 266 deletions(-) delete mode 100644 i18n/en.toml create mode 100644 i18n/en.yaml delete mode 100644 i18n/fr.toml create mode 100644 i18n/fr.yaml delete mode 100644 i18n/id.toml create mode 100644 i18n/id.yaml delete mode 100644 i18n/ja.toml create mode 100644 i18n/ja.yaml delete mode 100644 i18n/ko.toml create mode 100644 i18n/ko.yaml delete mode 100644 i18n/pt-BR.toml create mode 100644 i18n/pt-BR.yaml delete mode 100644 i18n/zh-CN.toml create mode 100644 i18n/zh-CN.yaml diff --git a/i18n/en.toml b/i18n/en.toml deleted file mode 100644 index 1261a18..0000000 --- a/i18n/en.toml +++ /dev/null @@ -1,41 +0,0 @@ -[toggleMenu] - other = "Toggle Menu" - -[relatedContents] - other = "Related contents" - -[lastUpdatedOn] - other ="Last updated on" - -[widgetArchivesTitle] - other = "Archives" - -[widgetArchivesMore] - other = "More" - -[widgetTagCloudTitle] - other = "Tags" - -[categoriesTitle] - other = "Categories" - -[notFoundTitle] - other = "Not Found" - -[notFoundSubtitle] - other = "This page does not exist." - -[searchTitle] - other = "Search" - -[searchPlaceholder] - other = "Type something..." - -[searchResultTitle] - other = "#PAGES_COUNT pages (#TIME_SECONDS seconds)" - -[footerBuiltWith] - other = "Built with {{ .Generator }}" - -[footerDesignedBy] - other = "Theme {{ .Theme }} designed by {{ .DesignedBy }}" diff --git a/i18n/en.yaml b/i18n/en.yaml new file mode 100644 index 0000000..1c0fdd8 --- /dev/null +++ b/i18n/en.yaml @@ -0,0 +1,42 @@ +toggleMenu: + other: Toggle Menu + +archives: + categories: + other: Categories + +article: + relatedContents: + other: Related contents + lastUpdatedOn: + other: Last updated on + +notFound: + title: + other: Not Found + subtitle: + other: This page does not exist. + +widget: + archives: + title: + other: Archives + more: + other: More + tagCloud: + title: + other: Tags + +search: + title: + other: Search + placeholder: + other: Type something... + resultTitle: + other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" + +footer: + builtWith: + other: Built with {{ .Generator }} + designedBy: + other: Theme {{ .Theme }} designed by {{ .DesignedBy }} diff --git a/i18n/fr.toml b/i18n/fr.toml deleted file mode 100644 index 03c4efa..0000000 --- a/i18n/fr.toml +++ /dev/null @@ -1,38 +0,0 @@ -[toggleMenu] - other = "Afficher le menu" - -[relatedContents] - other = "Contenus liés" - -[lastUpdatedOn] - other = "Dernière mise à jour le" - -[widgetArchivesTitle] - other = "Archives" - -[widgetArchivesMore] - other = "Autres" - -[widgetTagCloudTitle] - other = "Mots clés" - -[notFoundTitle] - other = "Page non trouvée" - -[notFoundSubtitle] - other = "Cette page n'existe pas." - -[searchTitle] - other = "Rechercher" - -[searchPlaceholder] - other = "Cherchez un article, une publication, etc." - -[searchResultTitle] - other = "#PAGES_COUNT pages (#TIME_SECONDS secondes)" - -[footerBuiltWith] - other = "Généré avec {{ .Generator }}" - -[footerDesignedBy] - other = "Thème {{ .Theme }} conçu par {{ .DesignedBy }}" \ No newline at end of file diff --git a/i18n/fr.yaml b/i18n/fr.yaml new file mode 100644 index 0000000..59cc111 --- /dev/null +++ b/i18n/fr.yaml @@ -0,0 +1,38 @@ +toggleMenu: + other: Afficher le menu + +article: + relatedContents: + other: Contenus liés + lastUpdatedOn: + other: Dernière mise à jour le + +notFound: + title: + other: Page non trouvée + subtitle: + other: Cette page n'existe pas. + +widget: + archives: + title: + other: Archives + more: + other: Autres + tagCloud: + title: + other: Mots clés + +search: + title: + other: Rechercher + placeholder: + other: Cherchez un article, une publication, etc. + resultTitle: + other: "#PAGES_COUNT pages (#TIME_SECONDS secondes)" + +footer: + builtWith: + other: Généré avec {{ .Generator }} + designedBy: + other: Thème {{ .Theme }} conçu par {{ .DesignedBy }} diff --git a/i18n/id.toml b/i18n/id.toml deleted file mode 100644 index fa0d8e3..0000000 --- a/i18n/id.toml +++ /dev/null @@ -1,38 +0,0 @@ -[toggleMenu] - other = "Tampilkan Menu" - -[relatedContents] - other = "Konten terkait" - -[lastUpdatedOn] - other = "Terakhir diperbarui pada" - -[widgetArchivesTitle] - other = "Arsip" - -[widgetArchivesMore] - other = "Lebih" - -[widgetTagCloudTitle] - other = "Tag" - -[notFoundTitle] - other = "Not Found" - -[notFoundSubtitle] - other = "Halaman ini tidak ada." - -[searchTitle] - other = "Cari" - -[searchPlaceholder] - other = "Ketik sesuatu..." - -[searchResultTitle] - other = "#PAGES_COUNT halaman (#TIME_SECONDS detik)" - -[footerBuiltWith] - other = "Dibangun dengan {{ .Generator }}" - -[footerDesignedBy] - other = "Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }}" \ No newline at end of file diff --git a/i18n/id.yaml b/i18n/id.yaml new file mode 100644 index 0000000..31cea39 --- /dev/null +++ b/i18n/id.yaml @@ -0,0 +1,38 @@ +toggleMenu: + other: Tampilkan Menu + +article: + relatedContents: + other: Konten terkait + lastUpdatedOn: + other: Terakhir diperbarui pada + +notFound: + title: + other: Not Found + subtitle: + other: Halaman ini tidak ada. + +widget: + archives: + title: + other: Arsip + more: + other: Lebih + tagCloud: + title: + other: Tag + +search: + title: + other: Cari + placeholder: + other: Ketik sesuatu... + resultTitle: + other: "#PAGES_COUNT halaman (#TIME_SECONDS detik)" + +footer: + builtWith: + other: Dibangun dengan {{ .Generator }} + designedBy: + other: Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }} diff --git a/i18n/ja.toml b/i18n/ja.toml deleted file mode 100644 index 0581364..0000000 --- a/i18n/ja.toml +++ /dev/null @@ -1,23 +0,0 @@ -[toggleMenu] - other = "メニューを開く・閉じる" - -[relatedContents] - other = "関連するコンテンツ" - -[lastUpdatedOn] - other = "最終更新" - -[widgetArchivesTitle] - other = "アーカイブ" - -[widgetArchivesMore] - other = "さらに見る" - -[widgetTagCloudTitle] - other = "タグ" - -[notFoundTitle] - other = "404 Not Found" - -[notFoundSubtitle] - other = "指定されたページは存在しません。" \ No newline at end of file diff --git a/i18n/ja.yaml b/i18n/ja.yaml new file mode 100644 index 0000000..e982ce3 --- /dev/null +++ b/i18n/ja.yaml @@ -0,0 +1,24 @@ +toggleMenu: + other: メニューを開く・閉じる + +article: + relatedContents: + other: 関連するコンテンツ + lastUpdatedOn: + other: 最終更新 + +notFound: + title: + other: 404 Not Found + subtitle: + other: 指定されたページは存在しません。 + +widget: + archives: + title: + other: アーカイブ + more: + other: さらに見る + tagCloud: + title: + other: タグ diff --git a/i18n/ko.toml b/i18n/ko.toml deleted file mode 100644 index 099477c..0000000 --- a/i18n/ko.toml +++ /dev/null @@ -1,38 +0,0 @@ -[toggleMenu] - other = "메뉴 여닫기" - -[relatedContents] - other = "관련 글" - -[lastUpdatedOn] - other ="마지막 수정: " - -[widgetArchivesTitle] - other = "보관함" - -[widgetArchivesMore] - other = "더보기" - -[widgetTagCloudTitle] - other = "태그" - -[notFoundTitle] - other = "찾을 수 없음" - -[notFoundSubtitle] - other = "페이지를 찾을 수 없습니다." - -[searchTitle] - other = "검색" - -[searchPlaceholder] - other = "검색어를 입력하세요..." - -[searchResultTitle] - other = "#PAGES_COUNT 페이지 (#TIME_SECONDS 초)" - -[footerBuiltWith] - other = "{{ .Generator }}로 만듦" - -[footerDesignedBy] - other = "{{ .DesignedBy }}의 {{ .Theme }} 테마 사용 중" \ No newline at end of file diff --git a/i18n/ko.yaml b/i18n/ko.yaml new file mode 100644 index 0000000..d9916cd --- /dev/null +++ b/i18n/ko.yaml @@ -0,0 +1,38 @@ +toggleMenu: + other: 메뉴 여닫기 + +article: + relatedContents: + other: 관련 글 + lastUpdatedOn: + other: "마지막 수정: " + +notFound: + title: + other: 찾을 수 없음 + subtitle: + other: 페이지를 찾을 수 없습니다. + +widget: + archives: + title: + other: 보관함 + more: + other: 더보기 + tagCloud: + title: + other: 태그 + +search: + title: + other: 검색 + placeholder: + other: 검색어를 입력하세요... + resultTitle: + other: "#PAGES_COUNT 페이지 (#TIME_SECONDS 초)" + +footer: + builtWith: + other: "{{ .Generator }}로 만듦" + designedBy: + other: "{{ .DesignedBy }}의 {{ .Theme }} 테마 사용 중" diff --git a/i18n/pt-BR.toml b/i18n/pt-BR.toml deleted file mode 100644 index 4f7436f..0000000 --- a/i18n/pt-BR.toml +++ /dev/null @@ -1,41 +0,0 @@ -[toggleMenu] - other = "Alternar Menu" - -[relatedContents] - other = "Conteúdos Relacionados" - -[lastUpdatedOn] - other ="Última atualização em" - -[widgetArchivesTitle] - other = "Arquivos" - -[widgetArchivesMore] - other = "Mais" - -[widgetTagCloudTitle] - other = "Tags" - -[categoriesTitle] - other = "Categorias" - -[notFoundTitle] - other = "Não Encontrado" - -[notFoundSubtitle] - other = "Esta página não existe." - -[searchTitle] - other = "Busca" - -[searchPlaceholder] - other = "Digite algo..." - -[searchResultTitle] - other = "#PAGES_COUNT páginas (#TIME_SECONDS segundos)" - -[footerBuiltWith] - other = "Criado com {{ .Generator }}" - -[footerDesignedBy] - other = "Tema {{ .Theme }} desenvolvido por {{ .DesignedBy }}" \ No newline at end of file diff --git a/i18n/pt-BR.yaml b/i18n/pt-BR.yaml new file mode 100644 index 0000000..5380c68 --- /dev/null +++ b/i18n/pt-BR.yaml @@ -0,0 +1,42 @@ +toggleMenu: + other: Alternar Menu + +archives: + categories: + other: Categorias + +article: + relatedContents: + other: Conteúdos Relacionados + lastUpdatedOn: + other: Última atualização em + +notFound: + title: + other: Não Encontrado + subtitle: + other: Esta página não existe. + +widget: + archives: + title: + other: Arquivos + more: + other: Mais + tagCloud: + title: + other: Tags + +search: + title: + other: Busca + placeholder: + other: Digite algo... + resultTitle: + other: "#PAGES_COUNT páginas (#TIME_SECONDS segundos)" + +footer: + builtWith: + other: Criado com {{ .Generator }} + designedBy: + other: Tema {{ .Theme }} desenvolvido por {{ .DesignedBy }} diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml deleted file mode 100644 index e589330..0000000 --- a/i18n/zh-CN.toml +++ /dev/null @@ -1,32 +0,0 @@ -[toggleMenu] - other = "切换菜单" - -[relatedContents] - other = "相关文章" - -[lastUpdatedOn] - other ="最后更新于" - -[widgetArchivesTitle] - other = "归档" - -[widgetArchivesMore] - other = "更多" - -[widgetTagCloudTitle] - other = "标签云" - -[notFoundTitle] - other = "404 错误" - -[notFoundSubtitle] - other = "页面不存在" - -[searchTitle] - other = "搜索" - -[searchPlaceholder] - other = "输入关键词..." - -[searchResultTitle] - other = "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)" \ No newline at end of file diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml new file mode 100644 index 0000000..78615bf --- /dev/null +++ b/i18n/zh-CN.yaml @@ -0,0 +1,36 @@ +toggleMenu: + other: 切换菜单 + +archives: + categories: + other: 分类 + +article: + relatedContents: + other: 相关文章 + lastUpdatedOn: + other: 最后更新于 + +notFound: + title: + other: 404 错误 + subtitle: + other: 页面不存在 + +widget: + archives: + title: + other: 归档 + more: + other: 更多 + tagCloud: + title: + other: 标签云 + +search: + title: + other: 搜索 + placeholder: + other: 输入关键词... + resultTitle: + other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)" diff --git a/layouts/404.html b/layouts/404.html index dd5e49d..b89d2b6 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,7 +1,7 @@ {{ define "main" }}
-

{{ T "notFoundTitle" }}

-

{{ T "notFoundSubtitle" }}

+

{{ T "notFound.title" }}

+

{{ T "notFound.subtitle" }}

{{ partialCached "footer/footer" . }} {{ end }} \ No newline at end of file diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 0071565..1a681e9 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -2,7 +2,7 @@ {{ define "main" }} {{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }} {{ if $categories }} -

{{ T "categoriesTitle" }}

+

{{ T "archives.categories" }}

{{ range $categories }} diff --git a/layouts/page/search.html b/layouts/page/search.html index 6078ac1..259d398 100644 --- a/layouts/page/search.html +++ b/layouts/page/search.html @@ -7,8 +7,8 @@ {{ define "main" }}

- - + +