-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Merge missing translations #10355
Merge missing translations #10355
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit a4c91db https://deploy-preview-10355--kubernetes-io-master-staging.netlify.com |
Deploy preview for kubernetes-io-master-staging ready! Built with commit 4d23e05 https://deploy-preview-10355--kubernetes-io-master-staging.netlify.com |
There seems to be a logical flaw in the blog archive ... I will fix that tomorrow. |
Re. my comment above: I found a bug in Hugo that needs to be resolved for this PR to work 100%. I will get that into a planned released for Monday. |
Deploy preview for kubernetes-io-master-staging ready! Built with commit 02f0ba3 https://deploy-preview-10355--kubernetes-io-master-staging.netlify.com |
Deploy preview for kubernetes-io-master-staging ready! Built with commit 699be41 https://deploy-preview-10355--kubernetes-io-master-staging.netlify.com |
I have bumped the Hugo versions to 0.49 in this PR, which has fixed the "language merge" issue on the blog archive. /cc @zacharysarah |
@bep 👋 Thanks for your work here. Some questions:
To disable the dummy translation, is it sufficient to remove this block from
...or must we also remove file content: I can't think of a good reason to keep the dummy files ☝️ after this PR merges, but am curious as to whether they must be removed entirely for Hugo to be happy or can simply be disabled in |
@zacharysarah No, it's easier than that, see my comment in # This is currently used for testing.
# disableLanguages = ["no"] The above can also be set as an OS environment variable (I will dig up the syntax if you need it), and its main motivation is to use when you're in the process of translating a new language. |
Cool! ✨ From the OP:
I disabled the dummy translation in a separate commit. It works in the preview, so let's go ahead and merge. /cc @lucperkins 👋 You may have to resolve merge conflicts in #10373 and #10381 due to changes in Makefile. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zacharysarah The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is the last batch of "language related changes" from me for now.
Note that before this gets merged, the dummy Norwegian translation needs to be disabled in config.toml.
It's easier to get a grasp of this PR by looking at the content tree for the Norwegian translation:
In summary, this is what's needed for a new language:
In that language configuration, you can specify an ordered list of one or more languages to fill inn missing translations from. In this PR,
no
has this set tolanguage_alternatives = ["en"]
.This language merging has an effect in
language_alternatives
will be shown on front page if not translated. Also, the archive is merged.Links to "foreign language" is marked with its language and opens up in a new window.
There is certainly more to be done in this area (the glossary page contains some untranslated text, and the user journey is only available in English, to mention some examples. But think now at least it makes sense to let other languages in.)
This PR updates Hugo to 0.48. That is built with Go 1.11, which makes the relevant template constructs much simpler.
/cc @zacharysarah @chenopis