Closed btihen closed 4 years ago
Its also odd that the first Uncategorized is there - even without any articles associated with it.
I did find that I can add the translations to the file: themes/academic/i18n/en.yaml instead of i18n/en.yaml and I don't get the translation errors and the publication page works as expected.
That would imply that it's not a bug in Academic. The multilingual system and concept of overriding files is implemented by Hugo. Hence, it would appear to be a Hugo related issue/question - feel free to reach out in the Hugo Forums or chat. Also, Hugo team provide documentation on this process in the Hugo Docs.
Ok - thanks, but maybe that section of the docs needs to be removed - since tose instructions don't work. If I find a better solution I'll make a PR for the working solution.
Custom translations in
i18n/en.yaml
aren't being used or new publication keys - but are read from the file:themes/academic/i18n/en.yaml
- which means I will loose my translations with updates to the academic theme submodule.Describe the bug
Following the instructions on: https://sourcethemes.com/academic/docs/managing-content/#create-a-publication in the section:
Modifying Publication Types
only partially work. The new publication types use the translation:Uncategorized
not the new word.To Reproduce
Steps to reproduce the behavior: 1) create a new publication type list:
2) copy the en language file:
cp themes/academic/i18n/en.yaml i18n/en.yaml
3) add the new publication type translations:
4) delete publication folders (to be sure there are not residual old pages)
5) change the publication page to use the new index in my case 12 (Blog) sed -i '' -e 's/publication_types\:\ [\"0\"]/publication_types\:\ [\"12\"]/g' content/publication/**/index.md
6) generate the updated publication pages:
I did find that I can add the translations to the file:
themes/academic/i18n/en.yaml
instead ofi18n/en.yaml
and I don't get the translation errors and the publication page works as expected.Expected behavior
I expect files in
i18n/en.yaml
to be read instead of only in thethemes/academic/i18n/en.yaml
file. I find it dangerous to have to have my language extensions to be in the submodule I don't control as updates will likely mean redoing these translations and putting the custom translations ini18n/en.yaml
is the instructions on the page:https://sourcethemes.com/academic/docs/managing-content/#create-a-publication
Technical details: