From 7af27035d0688883e9cc3f921ea33a83c0c75912 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Sat, 4 Jan 2020 20:01:48 +0900 Subject: [PATCH 1/2] make last updated date format translatable --- i18n/en.toml | 3 +++ layouts/index.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/i18n/en.toml b/i18n/en.toml index 0fc441bd..86cfb384 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -4,6 +4,9 @@ other = "Improve this page" [lastUpdated] other = "Last updated" +[lastUpdatedDateFormat] +other = "{{ .Format \"January 2, 2006\" }}" + [joinTitle] other = "Join the social media revolution" diff --git a/layouts/index.html b/layouts/index.html index a98ff5a4..b9181ca9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,7 +11,7 @@ {{ .Content }}

- {{ i18n "lastUpdated" }} {{ .Lastmod.Format "January 2, 2006" }}{{ with .File }} · {{ i18n "improvePage" }}{{ end }} + {{ i18n "lastUpdated" }} {{ i18n "lastUpdatedDateFormat" .Lastmod }}{{ with .File }} · {{ i18n "improvePage" }}{{ end }} {{ if .IsTranslated }}
From e097f0df78408eb1ae8e5b0dcbfd210796eb4f87 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Sat, 4 Jan 2020 20:05:26 +0900 Subject: [PATCH 2/2] move format to inside of lastUpdated --- i18n/en.toml | 5 +---- layouts/index.html | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/i18n/en.toml b/i18n/en.toml index 86cfb384..7c277702 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -2,10 +2,7 @@ other = "Improve this page" [lastUpdated] -other = "Last updated" - -[lastUpdatedDateFormat] -other = "{{ .Format \"January 2, 2006\" }}" +other = "Last updated {{ .Format \"January 2, 2006\" }}" [joinTitle] other = "Join the social media revolution" diff --git a/layouts/index.html b/layouts/index.html index b9181ca9..ba32103a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,7 +11,7 @@ {{ .Content }}

- {{ i18n "lastUpdated" }} {{ i18n "lastUpdatedDateFormat" .Lastmod }}{{ with .File }} · {{ i18n "improvePage" }}{{ end }} + {{ i18n "lastUpdated" .Lastmod }}{{ with .File }} · {{ i18n "improvePage" }}{{ end }} {{ if .IsTranslated }}