Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix: fix i18n bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Aug 24, 2019
1 parent 4ce4029 commit ca6d543
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ other = "min"

[second]
other = "sec"

[return]
other = "return"
# === posts/single.html ===

# === 404.html ===
Expand Down
3 changes: 3 additions & 0 deletions i18n/zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ other = "分"

[second]
other = ""

[return]
other = "返回"
# === posts/single.html ===

# === 404.html ===
Expand Down
3 changes: 3 additions & 0 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ <h2 class="post-toc-title">{{ T "toc" }}</h2>
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<sup>\[return\]</sup>` }}
{{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
{{ $content = replaceRE $REin $REout $content }}
{{ $REin = `<(h[23456]) (id=".+?")>` }}
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
{{ $content = replaceRE $REin $REout $content }}
Expand Down

0 comments on commit ca6d543

Please sign in to comment.