-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Milestone
Description
What version of Hugo are you using (hugo version)?
$ hugo version Hugo Static Site Generator v0.78.2 linux/amd64 BuildDate: 2020-11-13T14:14:29Z
Does this issue reproduce with the latest release?
Yes.
Steps to Reproduce
The problem can be reproduced by following the steps below:
-
Copy the current multilingual example to local directory: https://github.com/gohugoio/hugo/tree/b8758de19ec75b4565075314f9578270a092bc6f/examples/multilingual
-
cdinto the local directory and createzhfiles by executing the commands:
cp content/home.en.md content/home.zh.md
cp i18n/en.toml i18n/zh.toml
cp i18n/en.toml i18n/zh-cn.toml-
Modify
i18n/zh.toml, setother=Correct title -
Modify
i18n/zh-cn.toml, setother=Wrong title -
Add the following content into
config.toml
[languages.zh]
weight = 1
title = "Test ZH language"
[[languages.zh.menu.main]]
url = "/zh/home"
name = "ZH Home"
weight = 0
- Execute
hugo server.
Whenhugo serveris executed, a warning message is displayed, indicating something is wrong:
WARN 2020/11/24 10:10:59 Failed to get translated string for language "zh" and ID "head_title": %!s(<nil>)
- Open browser and go to url
HUGO_URL/zh/home. We should expect that the page title isCorrect title. However,Wrong titleis displayed as the page title.
Comments
This is probably related to #7838.
Reactions are currently unavailable