theme icon indicating copy to clipboard operation
theme copied to clipboard

Append the language code to the filename.

Open razonyang opened this issue 2 years ago • 5 comments

  • [ ] _index.md to _index.en.md.
  • [ ] index.md to index.en.md.

razonyang avatar Aug 02 '23 12:08 razonyang

Hello, I have a simple question about the languages in the starter theme, I have created index.es.md, _index.es.md, menus.es.yaml and params.es.yaml where it needs to be, but I have this problem that text in "featured-posts-tab" and "recent-posts-tab" disappear. Screenshot from 2023-12-01 15-51-41 Can you give me a hint? Thanks

VM-137 avatar Dec 01 '23 14:12 VM-137

@VM-137 Hmm, that's weird, it should use en as fallback, do you have a public repo for reproducing the issue?

razonyang avatar Dec 01 '23 15:12 razonyang

@VM-137 Confirmed, it was caused by the missing translations, for now, you can preserve the defaultContentLanguage as en, and configure your langauge in languages.yaml, so that it will fallback to use en translations.

To support es language translations, please see the i18n guide for details.

razonyang avatar Dec 01 '23 16:12 razonyang

@VM-137 Should fixed in modules/sidebar/posts: v0.6.1.

hugo mod get github.com/hbstack/blog/modules/sidebar/[email protected]

It use English as fallback translations, please feel free to change it in https://github.com/hbstack/blog/blob/main/modules/sidebar/posts/i18n/es.toml.

razonyang avatar Dec 03 '23 04:12 razonyang

I will be waiting for the v0.6.1, and collaborate translating the i18n files to "es" , thanks.

@VM-137 Should fixed in modules/sidebar/posts: v0.6.1.

hugo mod get github.com/hbstack/blog/modules/sidebar/[email protected]

It use English as fallback translations, please feel free to change it in https://github.com/hbstack/blog/blob/main/modules/sidebar/posts/i18n/es.toml.

Done.

VM-137 avatar Dec 06 '23 18:12 VM-137