From ca6d54387869403aede9db44bc316fd0b06375d9 Mon Sep 17 00:00:00 2001 From: Dillon Date: Sun, 25 Aug 2019 01:15:06 +0800 Subject: [PATCH] fix: fix i18n bug --- i18n/en.toml | 3 +++ i18n/zh.toml | 3 +++ layouts/posts/single.html | 3 +++ 3 files changed, 9 insertions(+) diff --git a/i18n/en.toml b/i18n/en.toml index 232a2a7..9d1d044 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -84,6 +84,9 @@ other = "min" [second] other = "sec" + +[return] +other = "return" # === posts/single.html === # === 404.html === diff --git a/i18n/zh.toml b/i18n/zh.toml index 9befe34..b013145 100644 --- a/i18n/zh.toml +++ b/i18n/zh.toml @@ -87,6 +87,9 @@ other = "εˆ†" [second] other = "η§’" + +[return] +other = "θΏ”ε›ž" # === posts/single.html === # === 404.html === diff --git a/layouts/posts/single.html b/layouts/posts/single.html index fe76de3..e434f39 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -77,6 +77,9 @@ {{ $REin = `\[(.+?)\]\^\((.+?)\)` }} {{ $REout = `$1$2` }} {{ $content = replaceRE $REin $REout $content }} + {{ $REin = `\[return\]` }} + {{ $REout = printf "[%s]" (T "return") }} + {{ $content = replaceRE $REin $REout $content }} {{ $REin = `<(h[23456]) (id=".+?")>` }} {{ $REout = `<$1>` }} {{ $content = replaceRE $REin $REout $content }}