Skip to content

Commit

Permalink
Fix TOC header (#168)
Browse files Browse the repository at this point in the history
In English, the translation that is supposed to be shown on top of the table of contents looks like this:

```toml
[whatsInThis]
other = "What's in this {{.Type }}"
```

When it is invoked, there are two mistakes: `{{ i18n "whatsInThis" humanize .Type }}`.

The first mistake is that you cannot call `humanize` in this context. The more severe one is that if you remove `humanize` it will pass the `.Type` directly to the i18n and that tries to extract `.Type` from it.
  • Loading branch information
kwk authored and Bud Parr committed Mar 26, 2019
1 parent 1754826 commit e956994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/menu-contextual.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{{- if .Params.toc -}}
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
<p class="f5 b mb3">{{ i18n "whatsInThis" humanize .Type }}</p>
<p class="f5 b mb3">{{ i18n "whatsInThis" . }}</p>
{{ .TableOfContents }}
</div>
{{- end -}}
Expand Down

0 comments on commit e956994

Please sign in to comment.