cncf / dot-org-hugo-theme

Hugo theme ideal for Organizations to use. Built initially for the TODO site redesign.
https://dot-org-hugo-theme-demo.netlify.app/
MIT License
43 stars 14 forks source link

Missing translation warnings despite default values provided if no i18n translation exists #29

Closed doolio closed 1 year ago

doolio commented 1 year ago

https://github.com/cncf/dot-org-hugo-theme/blob/a614d0d4fd67ae2365c2d80f0ce93ec99bcab3ef/layouts/partials/blog/byline.html#L13

https://github.com/cncf/dot-org-hugo-theme/blob/a614d0d4fd67ae2365c2d80f0ce93ec99bcab3ef/layouts/partials/footer/social-links.html#L15

image

Despite these warnings I believe the default values are used. Creating a /i18n/en.yaml with these keys (and values) removes the warnings.

Also, why is it only en translations that are missing if this theme can support multiple languages?

doolio commented 1 year ago

Similar to #28 these WARN messages could have their severity lowered to INFO if a /i18n/en.yaml is not provided by default.

doolio commented 1 year ago

I also think that social_link_title should be renamed to social_link_tooltip to better reflect what it is.

thetwopct commented 1 year ago

The strings can be translated if the user wishes. Defaults are set on the strings in the code, no need to add it to the languages.yml. If you wish to change the debug level of the Hugo serve command that’s up to you. A theme has to have an opinion and approach. This is ours.

doolio commented 1 year ago

A theme has to have an opinion and approach. This is ours.

Of course. I was raising what I thought was a potential issue but you have now explained that it is not.