diff --git a/i18n/en.yaml b/i18n/en.yaml new file mode 100644 index 0000000..64c2f7b --- /dev/null +++ b/i18n/en.yaml @@ -0,0 +1,40 @@ +# Content +- id: dateFormat + translation: "January 2, 2006" +- id: postedOnDate + translation: "Posted on {{ .Count }}" +- id: translationsLabel + translation: "Other languages: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Read More" +- id: olderPosts + translation: "Older Posts" +- id: newerPosts + translation: "Newer Posts" +- id: previousPost + translation: "Previous Post" +- id: nextPost + translation: "Next Post" + +# 404 page +- id: pageNotFound + translation: "Whoops, this page doesn't exist. Move along. (404 error)" + +# Footer +- id: poweredBy # Accepts HTML + translation: 'Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' + +# Navigation +- id: toggleNavigation + translation: "Toggle navigation" +- id: languageSwitcherLabel + translation: "Language" +- id: gcseLabelShort + translation: "Search" +- id: gcseLabelLong + translation: "Search {{ .Site.Title }}" +- id: gcseClose + translation: "Close" + diff --git a/i18n/ja.yaml b/i18n/ja.yaml new file mode 100644 index 0000000..c7c77b2 --- /dev/null +++ b/i18n/ja.yaml @@ -0,0 +1,38 @@ +# Content +- id: dateFormat + translation: "2006年1月2日" +- id: postedOnDate + translation: "{{ .Count }}に投稿" +- id: translationsLabel + translation: "翻訳:" +- id: translationsSeparator + translation: "・" +- id: readMore + translation: "続きを読む" +- id: olderPosts + translation: "古いページ" +- id: newerPosts + translation: "新しいページ" +- id: previousPost + translation: "前ページ" +- id: nextPost + translation: "次ページ" + +# 404 page +- id: pageNotFound + translation: "おっと、このページが存在しない。他にあたってください。(404エラー)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '起動力にHugo v{{ .Hugo.Version }}  •  テーマにBeautiful Jekyllに基づいているBeautiful Hugo' + +# Navigation +- id: toggleNavigation + translation: "メニューを切り替え" +- id: gcseLabelShort + translation: "検索" +- id: gcseLabelLong + translation: "{{ .Site.Title }}を検索" +- id: gcseClose + translation: "閉じる" + diff --git a/layouts/404.html b/layouts/404.html index 0ab0d86..39bc12f 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,5 +1,5 @@ - + {{ partial "head.html" . }} @@ -9,8 +9,7 @@
-

Whoops, this page doesn't exist.

-

Move along. (404 error)

+

{{ i18n "pageNotFound" }}


diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a2e2aa4..c5a2913 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,5 @@ - + {{ partial "head.html" . }} @@ -39,12 +39,12 @@

- Posted on {{ .Date.Format (default "January 2, 2006" .Site.Params.dateFormat) }} + {{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}

{{ if .Truncated }} {{ .Summary }} - [Read More] + [{{ i18n "readMore" }}] {{ else }} {{ .Content }} {{ end }} @@ -53,7 +53,7 @@ {{ if .Params.tags }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b5aeb5e..394aa4e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,5 @@ - + {{ partial "head.html" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 8e0d94c..6beff8b 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -1,5 +1,5 @@ - + {{ partial "head.html" . }} @@ -14,7 +14,7 @@
{{ range $key, $value := .Data.Terms.ByCount }} - + {{ $value.Name }}{{ $value.Count }} {{ end }}
diff --git a/layouts/index.html b/layouts/index.html index ab04f68..f7fdd9e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ - + {{ partial "head.html" . }} @@ -30,13 +30,11 @@ {{ end }} - + {{ partial "post_meta.html" . }}
{{ if .Truncated }} {{ .Summary }} - [Read More] + [{{ i18n "readMore" }}] {{ else }} {{ .Content }} {{ end }} @@ -45,7 +43,7 @@ {{ if .Params.tags }} {{ end }} @@ -58,12 +56,12 @@ diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0a4f840..dc9b962 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -17,7 +17,7 @@ {{ end }} {{ if .Site.Params.rss }}
  • - + @@ -33,12 +33,12 @@ {{ if .Site.Title }}  •  - {{ .Site.Title }} + {{ .Site.Title }} {{ end }}

    - Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo + {{ i18n "poweredBy" . | safeHTML }} {{ with .Site.Params.commit }} • [{{ getenv "GIT_COMMIT_SHA_SHORT" }}]{{ end }}

  • @@ -76,4 +76,4 @@ {{ end }} {{ template "_internal/google_analytics.html" . }} -{{- partial "footer_custom.html" . }} \ No newline at end of file +{{- partial "footer_custom.html" . }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a89858d..7d4ef1b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -36,8 +36,8 @@ {{ .Hugo.Generator -}} - - + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 45725fa..a2c6149 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -32,7 +32,7 @@ {{ end }} {{ end }} {{ if eq .Type "post" }} - + {{ partial "post_meta.html" . }} {{ end }}
    @@ -57,7 +57,7 @@ {{ end }} {{ end }} {{ if eq .Type "post" }} - Posted on {{ .Date.Format (default "January 2, 2006" .Site.Params.dateFormat) }} + {{ partial "post_meta.html" . }} {{ end }} @@ -67,4 +67,4 @@ {{ else }}
    -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 3aa4e3c..ab26fcf 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -2,12 +2,12 @@