From 7d1713d40729fa6984ff92c6fd9e41c864915ff2 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 9 Mar 2022 15:04:24 +0000 Subject: 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 | 8 ----- exampleSite/content/_index.zh-cn.md | 8 +++++ i18n/pt-BR.yaml | 64 ------------------------------------- i18n/pt-br.yaml | 64 +++++++++++++++++++++++++++++++++++++ i18n/zh-CN.yaml | 60 ---------------------------------- i18n/zh-TW.yaml | 49 ---------------------------- i18n/zh-cn.yaml | 60 ++++++++++++++++++++++++++++++++++ i18n/zh-tw.yaml | 49 ++++++++++++++++++++++++++++ 9 files changed, 183 insertions(+), 183 deletions(-) delete mode 100644 exampleSite/content/_index.zh-CN.md create mode 100644 exampleSite/content/_index.zh-cn.md delete mode 100644 i18n/pt-BR.yaml create mode 100644 i18n/pt-br.yaml delete mode 100644 i18n/zh-CN.yaml delete mode 100644 i18n/zh-TW.yaml create mode 100644 i18n/zh-cn.yaml create mode 100644 i18n/zh-tw.yaml 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 deleted file mode 100644 index e4b59a8..0000000 --- a/exampleSite/content/_index.zh-CN.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -menu: - main: - name: 主页 - weight: -100 - params: - icon: home ---- \ No newline at end of file diff --git a/exampleSite/content/_index.zh-cn.md b/exampleSite/content/_index.zh-cn.md new file mode 100644 index 0000000..e4b59a8 --- /dev/null +++ b/exampleSite/content/_index.zh-cn.md @@ -0,0 +1,8 @@ +--- +menu: + main: + name: 主页 + weight: -100 + params: + icon: home +--- \ No newline at end of file diff --git a/i18n/pt-BR.yaml b/i18n/pt-BR.yaml deleted file mode 100644 index ffdbe41..0000000 --- a/i18n/pt-BR.yaml +++ /dev/null @@ -1,64 +0,0 @@ -toggleMenu: - other: Alternar Menu - -darkMode: - other: Modo Escuro - -list: - page: - one: "{{ .Count }} página" - other: "{{ .Count }} páginas" - - section: - other: Seção - - subsection: - one: Subseção - other: Subseções - -article: - back: - other: Voltar - - tableOfContents: - other: Índice - - relatedContents: - other: Conteúdo relacionado - - lastUpdatedOn: - other: Última atualização em - - readingTime: - one: "{{ .Count }} minuto de leitura" - other: "{{ .Count }} minutos de leitura" - -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/pt-br.yaml b/i18n/pt-br.yaml new file mode 100644 index 0000000..ffdbe41 --- /dev/null +++ b/i18n/pt-br.yaml @@ -0,0 +1,64 @@ +toggleMenu: + other: Alternar Menu + +darkMode: + other: Modo Escuro + +list: + page: + one: "{{ .Count }} página" + other: "{{ .Count }} páginas" + + section: + other: Seção + + subsection: + one: Subseção + other: Subseções + +article: + back: + other: Voltar + + tableOfContents: + other: Índice + + relatedContents: + other: Conteúdo relacionado + + lastUpdatedOn: + other: Última atualização em + + readingTime: + one: "{{ .Count }} minuto de leitura" + other: "{{ .Count }} minutos de leitura" + +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.yaml b/i18n/zh-CN.yaml deleted file mode 100644 index 3579945..0000000 --- a/i18n/zh-CN.yaml +++ /dev/null @@ -1,60 +0,0 @@ -toggleMenu: - other: 切换菜单 - -darkMode: - other: 暗色模式 - -article: - back: - other: 返回 - - tableOfContents: - other: 目录 - - relatedContents: - other: 相关文章 - - lastUpdatedOn: - other: 最后更新于 - - readingTime: - other: "阅读时长: {{ .Count }} 分钟" - -notFound: - title: - other: 404 错误 - subtitle: - other: 页面不存在 - -widget: - archives: - title: - other: 归档 - - more: - other: 更多 - - tagCloud: - title: - other: 标签云 - - categoriesCloud: - title: - other: 分类 - -search: - title: - other: 搜索 - - placeholder: - other: 输入关键词... - - resultTitle: - other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)" - -footer: - builtWith: - other: Built with {{ .Generator }} - - designedBy: - other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计 diff --git a/i18n/zh-TW.yaml b/i18n/zh-TW.yaml deleted file mode 100644 index 871d937..0000000 --- a/i18n/zh-TW.yaml +++ /dev/null @@ -1,49 +0,0 @@ -toggleMenu: - other: 切換選單 - -darkMode: - other: 夜晚模式 - -article: - back: - other: 返回 - - tableOfContents: - other: 目錄 - - relatedContents: - other: 相關文章 - - lastUpdatedOn: - other: 最後更新 - - readingTime: - other: "閱讀時間: {{ .Count }} 分鐘" - -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/i18n/zh-cn.yaml b/i18n/zh-cn.yaml new file mode 100644 index 0000000..3579945 --- /dev/null +++ b/i18n/zh-cn.yaml @@ -0,0 +1,60 @@ +toggleMenu: + other: 切换菜单 + +darkMode: + other: 暗色模式 + +article: + back: + other: 返回 + + tableOfContents: + other: 目录 + + relatedContents: + other: 相关文章 + + lastUpdatedOn: + other: 最后更新于 + + readingTime: + other: "阅读时长: {{ .Count }} 分钟" + +notFound: + title: + other: 404 错误 + subtitle: + other: 页面不存在 + +widget: + archives: + title: + other: 归档 + + more: + other: 更多 + + tagCloud: + title: + other: 标签云 + + categoriesCloud: + title: + other: 分类 + +search: + title: + other: 搜索 + + placeholder: + other: 输入关键词... + + resultTitle: + other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)" + +footer: + builtWith: + other: Built with {{ .Generator }} + + designedBy: + other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计 diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml new file mode 100644 index 0000000..871d937 --- /dev/null +++ b/i18n/zh-tw.yaml @@ -0,0 +1,49 @@ +toggleMenu: + other: 切換選單 + +darkMode: + other: 夜晚模式 + +article: + back: + other: 返回 + + tableOfContents: + other: 目錄 + + relatedContents: + other: 相關文章 + + lastUpdatedOn: + other: 最後更新 + + readingTime: + other: "閱讀時間: {{ .Count }} 分鐘" + +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 秒)" -- cgit v1.2.3