i18n: update i18n string format (#371)

This commit is contained in:
Dillon
2020-05-18 16:10:24 +08:00
committed by GitHub
parent 36f59a72ee
commit 9c1244490f
35 changed files with 236 additions and 284 deletions

View File

@@ -2,9 +2,9 @@
{{- with .url -}}
{{- $href = . | relLangURL -}}
{{- else -}}
{{- $template := .template | default "%s" -}}
{{- $template := .template | default "%v" -}}
{{- with .prefix -}}
{{- $template = . | strings.TrimSuffix "/" | printf "%s/%%s" -}}
{{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}}
{{- end -}}
{{- $href = printf (string $template) .id -}}
{{- end -}}