refactor(i18n): translation key renaming (#68)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/63
This commit is contained in:
+2
-2
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user