From 7d1713d40729fa6984ff92c6fd9e41c864915ff2 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 9 Mar 2022 15:04:24 +0000 Subject: [PATCH] refactor(i18n): use lowercase language codes Related with this Hugo issue: https://github.com/gohugoio/hugo/issues/7344 --- exampleSite/config.yaml | 4 ++-- exampleSite/content/{_index.zh-CN.md => _index.zh-cn.md} | 0 i18n/{pt-BR.yaml => pt-br.yaml} | 0 i18n/{zh-CN.yaml => zh-cn.yaml} | 0 i18n/{zh-TW.yaml => zh-tw.yaml} | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename exampleSite/content/{_index.zh-CN.md => _index.zh-cn.md} (100%) rename i18n/{pt-BR.yaml => pt-br.yaml} (100%) rename i18n/{zh-CN.yaml => zh-cn.yaml} (100%) rename i18n/{zh-TW.yaml => zh-tw.yaml} (100%) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index bc07d59..545116d 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -9,7 +9,7 @@ languages: languageName: English title: Example Site weight: 1 - zh-CN: + zh-cn: languageName: 中文 title: 演示站点 weight: 2 @@ -26,7 +26,7 @@ disqusShortname: hugo-theme-stack googleAnalytics: # Theme i18n support -# Available values: en, fr, id, ja, ko, pt-br, zh-CN, zh-TW, es, de, nl, it, th, el, uk, ar +# Available values: en, fr, id, ja, ko, pt-br, zh-cn, zh-tw, es, de, nl, it, th, el, uk, ar DefaultContentLanguage: en # Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] diff --git a/exampleSite/content/_index.zh-CN.md b/exampleSite/content/_index.zh-cn.md similarity index 100% rename from exampleSite/content/_index.zh-CN.md rename to exampleSite/content/_index.zh-cn.md diff --git a/i18n/pt-BR.yaml b/i18n/pt-br.yaml similarity index 100% rename from i18n/pt-BR.yaml rename to i18n/pt-br.yaml diff --git a/i18n/zh-CN.yaml b/i18n/zh-cn.yaml similarity index 100% rename from i18n/zh-CN.yaml rename to i18n/zh-cn.yaml diff --git a/i18n/zh-TW.yaml b/i18n/zh-tw.yaml similarity index 100% rename from i18n/zh-TW.yaml rename to i18n/zh-tw.yaml