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

i18n:Chinese translation #732

Closed
Xu-Xihe opened this issue Oct 20, 2021 · 7 comments · Fixed by #832
Closed

i18n:Chinese translation #732

Xu-Xihe opened this issue Oct 20, 2021 · 7 comments · Fixed by #832
Labels
i18n Internationalization / Localization

Comments

@Xu-Xihe
Copy link
Contributor

Xu-Xihe commented Oct 20, 2021

For Chinese translation,there are two files,zh.toml and zh-cn.toml.
When I am using zh.toml, hugo will show me this:

hugo v0.88.1-5BC54738+extended linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_read_more": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "footer_all_rights_reserved": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "ui_search": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "post_less_than_a_minute_read": %!s(<nil>)
WARN 2021/10/19 15:52:00 Failed to get translated string for language "zh" and ID "footer_all_rights_reserved": %!s(<nil>)

This is only a part of all the logs.All for about 1000 llines.
But,if I removed the zh-cn.toml everything will be built correctly.
I don't know why.

@Xu-Xihe
Copy link
Contributor Author

Xu-Xihe commented Oct 21, 2021

What's more, if I use zh-cn.toml ,everything is going well.

@LisaFC
Copy link
Collaborator

LisaFC commented Oct 21, 2021

Is this still happening now that I've merged in your update to the Chinese localization files?

@Xu-Xihe
Copy link
Contributor Author

Xu-Xihe commented Oct 23, 2021

现在我已经将您的更新合并到中文本地化文件中,这是否仍然发生?

Yes, the problem is still there. I advise that deleting one of zh.toml or zh-cn.toml, becaus I have run diff between them and it shows that there isn't any difference.

@h1z3y3
Copy link
Contributor

h1z3y3 commented Jan 13, 2022

+1

@LisaFC
Copy link
Collaborator

LisaFC commented Jan 13, 2022

Weird, ok, I'll take a look at the file history and see if we can just remove one. I wonder how we ended up with two identical files?

@h1z3y3
Copy link
Contributor

h1z3y3 commented Jan 13, 2022

I found this PR: #712

It may works in the previous hugo version, my version is hugo v0.89.4

@h1z3y3
Copy link
Contributor

h1z3y3 commented Jan 13, 2022

@LisaFC
I update hugo to the latest version, and there is no problem.
Thanks!

https://github.com/gohugoio/hugo/releases/tag/v0.92.0

Still here... 😢

h1z3y3 added a commit to h1z3y3/docsy that referenced this issue Jan 14, 2022
@Xu-Xihe Xu-Xihe closed this as completed Jan 16, 2022
@deining deining added the i18n Internationalization / Localization label Jan 18, 2022
LisaFC added a commit that referenced this issue Jan 20, 2022
close #732

Co-authored-by: LisaFC <lcarey@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Internationalization / Localization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants