Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

FEATURE: Populate Non-Translated Articles with Default Language; Add "Page Not Translated" Banner #23

Open
pacollins opened this issue Jun 22, 2019 · 3 comments

Comments

@pacollins
Copy link
Owner

pacollins commented Jun 22, 2019

I am reading through the hugo functions and noticed lang.Merge which allows you to populate any non-translated articles with the default language:

--en
|---1.md
|---2.md
|---3.md
--fr
|---1.md.fr
|---2.md.fr
|---3.md <==English article

Any thoughts on this? A site that loses content when you change languages is odd, but so is thinking everything is translated.

@VincentTam
Copy link
Collaborator

Between the two options, I would prefer the having untranslated contents first. Interested users might report them in the issues or, even better, submit a PR. In Beautiful Hugo's UI text for its Staticman integration, the developer who submitted the PR had copied the English UI text into i18n files for some other languages at first. Despite the missing content, the framework has been established. This gives way to my PR https://github.com/halogenica/beautifulhugo/pull/231/files.

@pacollins
Copy link
Owner Author

Another option would be to create something like this at the top of the page (not real syntax here):

{{ if not .Page.Lang .Site.Lang }}
    {{ i18n | "Hello user, this page has yet to be translated into your language." }}
{{ end }}

And maybe allow that to link to make PRs, like you suggest.

@pacollins pacollins changed the title Should multilingual sites populate non-translated content? DISCUSSION: Should multilingual sites populate non-translated content? Aug 22, 2019
@pacollins pacollins changed the title DISCUSSION: Should multilingual sites populate non-translated content? ENHANCEMENT: Populate non-translated articles with default language and add "page not translated" banner. Jan 24, 2021
@VincentTam VincentTam mentioned this issue Mar 8, 2021
2 tasks
@pacollins pacollins changed the title ENHANCEMENT: Populate non-translated articles with default language and add "page not translated" banner. FEATURE: Populate Non-Translated Articles with Default Language; Add "Page Not Translated" Banner May 6, 2021
@quancs
Copy link

quancs commented Dec 4, 2021

Hi, I met the same problem, and need this feature also. Is there any update for this feature now? Or is there anything I can help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants