refactor(i18n): translation key renaming (#68)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/63
This commit is contained in:
parent
e9c1abac93
commit
d205753323
41
i18n/en.toml
41
i18n/en.toml
@ -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 }}"
|
42
i18n/en.yaml
Normal file
42
i18n/en.yaml
Normal file
@ -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 }}
|
38
i18n/fr.toml
38
i18n/fr.toml
@ -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 }}"
|
38
i18n/fr.yaml
Normal file
38
i18n/fr.yaml
Normal file
@ -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 }}
|
38
i18n/id.toml
38
i18n/id.toml
@ -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 }}"
|
38
i18n/id.yaml
Normal file
38
i18n/id.yaml
Normal file
@ -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 }}
|
23
i18n/ja.toml
23
i18n/ja.toml
@ -1,23 +0,0 @@
|
||||
[toggleMenu]
|
||||
other = "メニューを開く・閉じる"
|
||||
|
||||
[relatedContents]
|
||||
other = "関連するコンテンツ"
|
||||
|
||||
[lastUpdatedOn]
|
||||
other = "最終更新"
|
||||
|
||||
[widgetArchivesTitle]
|
||||
other = "アーカイブ"
|
||||
|
||||
[widgetArchivesMore]
|
||||
other = "さらに見る"
|
||||
|
||||
[widgetTagCloudTitle]
|
||||
other = "タグ"
|
||||
|
||||
[notFoundTitle]
|
||||
other = "404 Not Found"
|
||||
|
||||
[notFoundSubtitle]
|
||||
other = "指定されたページは存在しません。"
|
24
i18n/ja.yaml
Normal file
24
i18n/ja.yaml
Normal file
@ -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: タグ
|
38
i18n/ko.toml
38
i18n/ko.toml
@ -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 }} 테마 사용 중"
|
38
i18n/ko.yaml
Normal file
38
i18n/ko.yaml
Normal file
@ -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 }} 테마 사용 중"
|
@ -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 }}"
|
42
i18n/pt-BR.yaml
Normal file
42
i18n/pt-BR.yaml
Normal file
@ -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 }}
|
@ -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 秒)"
|
36
i18n/zh-CN.yaml
Normal file
36
i18n/zh-CN.yaml
Normal file
@ -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 秒)"
|
@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div class="not-found-card">
|
||||
<h1 class="article-title">{{ T "notFoundTitle" }}</h1>
|
||||
<h2 class="article-subtitle">{{ T "notFoundSubtitle" }}</h2>
|
||||
<h1 class="article-title">{{ T "notFound.title" }}</h1>
|
||||
<h2 class="article-subtitle">{{ T "notFound.subtitle" }}</h2>
|
||||
</div>
|
||||
{{ partialCached "footer/footer" . }}
|
||||
{{ end }}
|
@ -2,7 +2,7 @@
|
||||
{{ define "main" }}
|
||||
{{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
|
||||
{{ if $categories }}
|
||||
<h2 class="section-title">{{ T "categoriesTitle" }}</h2>
|
||||
<h2 class="section-title">{{ T "archives.categories" }}</h2>
|
||||
<div class="category-list">
|
||||
<div class="article-list--tile">
|
||||
{{ range $categories }}
|
||||
|
@ -7,8 +7,8 @@
|
||||
{{ define "main" }}
|
||||
<form action="{{ .Permalink }}" class="search-form"{{ with .OutputFormats.Get "json" -}} data-json="{{ .Permalink }}"{{- end }}>
|
||||
<p>
|
||||
<label>{{ T "searchTitle" }}</label>
|
||||
<input name="keyword" placeholder="{{ T `searchPlaceholder` }}" />
|
||||
<label>{{ T "search.title" }}</label>
|
||||
<input name="keyword" placeholder="{{ T `search.placeholder` }}" />
|
||||
</p>
|
||||
|
||||
<button title="Search">
|
||||
@ -20,7 +20,7 @@
|
||||
<div class="search-result--list article-list--compact"></div>
|
||||
|
||||
<script>
|
||||
window.searchResultTitleTemplate = "{{ T `searchResultTitle` }}"
|
||||
window.searchResultTitleTemplate = "{{ T `search.resultTitle` }}"
|
||||
</script>
|
||||
|
||||
{{- $opts := dict "minify" hugo.IsProduction "JSXFactory" "createElement" -}}
|
||||
|
@ -12,7 +12,7 @@
|
||||
<section class="article-time">
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<span class="article-time--modified">
|
||||
{{ T "lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||
</span>
|
||||
</section>
|
||||
{{- end -}}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<aside class="related-contents--wrapper">
|
||||
{{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }}
|
||||
{{ with $related }}
|
||||
<h2 class="section-title">{{ T "relatedContents" }}</h2>
|
||||
<h2 class="section-title">{{ T "article.relatedContents" }}</h2>
|
||||
<div class="related-contents">
|
||||
<div class="flex article-list--tile">
|
||||
{{ range . }}
|
||||
|
@ -6,7 +6,7 @@
|
||||
{{- $Theme := printf `<b><a href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener" data-version="%s">Stack</a></b>` $ThemeVersion -}}
|
||||
{{- $DesignedBy := `<a href="https://jimmycai.com" target="_blank" rel="noopener">Jimmy</a>` -}}
|
||||
|
||||
{{ T "footerBuiltWith" (dict "Generator" $Generator) | safeHTML }} <br />
|
||||
{{ T "footerDesignedBy" (dict "Theme" $Theme "DesignedBy" $DesignedBy) | safeHTML }}
|
||||
{{ T "footer.builtWith" (dict "Generator" $Generator) | safeHTML }} <br />
|
||||
{{ T "footer.designedBy" (dict "Theme" $Theme "DesignedBy" $DesignedBy) | safeHTML }}
|
||||
</section>
|
||||
</footer>
|
@ -2,7 +2,7 @@
|
||||
<div class="widget-icon">
|
||||
{{ partial "helper/icon" "infinity" }}
|
||||
</div>
|
||||
<h2 class="widget-title section-title">{{ T "widgetArchivesTitle" }}</h2>
|
||||
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
|
||||
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
@ -15,7 +15,7 @@
|
||||
<div class="archives-year">
|
||||
<a href="{{ $.Site.Params.widgets.archives.path | relLangURL }}#{{ $id }}">
|
||||
{{ if eq $index $.Site.Params.widgets.archives.limit }}
|
||||
<span class="year">{{ T "widgetArchivesMore" }}</span>
|
||||
<span class="year">{{ T "widget.archives.more" }}</span>
|
||||
{{ else }}
|
||||
<span class="year">{{ .Key }}</span>
|
||||
<span class="count">{{ len $item.Pages }}</span>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<form action="/search" class="search-form widget" {{ with .OutputFormats.Get "json" -}}data-json="{{ .Permalink }}" {{- end }}>
|
||||
<p>
|
||||
<label>{{ T "searchTitle" }}</label>
|
||||
<input name="keyword" required placeholder="{{ T `searchPlaceholder` }}" />
|
||||
<label>{{ T "search.title" }}</label>
|
||||
<input name="keyword" required placeholder="{{ T `search.placeholder` }}" />
|
||||
|
||||
<button title="Search">
|
||||
{{ partial "helper/icon" "search" }}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="widget-icon">
|
||||
{{ partial "helper/icon" "tag" }}
|
||||
</div>
|
||||
<h2 class="widget-title section-title">{{ T "widgetTagCloudTitle" }}</h2>
|
||||
<h2 class="widget-title section-title">{{ T "widget.tagCloud.title" }}</h2>
|
||||
|
||||
<div class="tagCloud-tags">
|
||||
{{ range first .Site.Params.widgets.tagCloud.limit .Site.Taxonomies.tags.ByCount }}
|
||||
|
Loading…
Reference in New Issue
Block a user