Skip to content

Hugo 0.76.* i18n .Count warning message #7822

Closed
@Vimux

Description

@Vimux

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.76.4/extended darwin/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?

Yes.

It works correctly in 0.48.0 – 0.75.1 without any warnings.


Problem

Mainroad demo build log shows the following warning messages since bumping to Hugo 0.76.*:

WARN 2020/10/12 13:40:31 Failed to get translated string for language "en" and ID "authorbox_name": template: :1:9: executing "" at <.Count>: can't evaluate field Count in type string
WARN 2020/10/12 13:40:31 Failed to get translated string for language "en" and ID "authorbox_name": template: :1:9: executing "" at <.Count>: can't evaluate field Count in type string
WARN 2020/10/12 13:40:31 Failed to get translated string for language "en" and ID "authorbox_name": template: :1:9: executing "" at <.Count>: can't evaluate field Count in type string
WARN 2020/10/12 13:40:31 Failed to get translated string for language "en" and ID "authorbox_name": template: :1:9: executing "" at <.Count>: can't evaluate field Count in type string
WARN 2020/10/12 13:40:31 Failed to get translated string for language "en" and ID "authorbox_name": template: :1:9: executing "" at <.Count>: can't evaluate field Count in type string

As a result, i18n string (authorbox_name) does not work as before.

Screenshot

Example

You can see it in action (authorbox block at the bottom of the page):

Demo 0.48.0

Hugo Themes demo (0.76.4)

Steps to reproduce

  1. Clone Mainroad repository and cd in the exampleSite dir

    git clone https://github.com/vimux/mainroad.git
    cd mainroad/exampleSite/
  2. Run Hugo server with the following command:

    hugo server --themesDir ../..
  3. Visit http://localhost:1313/post/hugoisforlovers/ in your browser and scroll to the bottom of the page.


Related parts:
i18n/en.yaml
partials/authorbox.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions