Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TOC header #168

Merged
merged 1 commit into from
Mar 26, 2019
Merged

Fix TOC header #168

merged 1 commit into from
Mar 26, 2019

Conversation

kwk
Copy link
Contributor

@kwk kwk commented Mar 26, 2019

In English, the translation that is supposed to be shown on top of the table of contents looks like this:

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

When it is invoked, I think that something is wrong in the calling code: {{ i18n "whatsInThis" humanize .Type }}.

This should be called {{ i18n "whatsInThis" . } instead because then the i18n can access the .Type; otherwise you get a <no value> output.

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.
@budparr
Copy link
Member

budparr commented Mar 26, 2019

Thanks!

@budparr budparr merged commit e956994 into theNewDynamic:master Mar 26, 2019
@kwk kwk deleted the patch-2 branch March 27, 2019 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants