Add localization support for layouts#13832
Add localization support for layouts#13832k8s-ci-robot merged 1 commit intokubernetes:masterfrom raelga:feature/add-localization-support-for-layouts
Conversation
|
Deploy preview for kubernetes-io-master-staging ready! Built with commit 6f3a9f7 https://deploy-preview-13832--kubernetes-io-master-staging.netlify.com |
|
looks great. |
|
@raelga Looking at the preview page in Spanish, I still see "Tell Your Story" and not "Cuéntanos tu historia". |
|
@tengqm and @zacharysarah, thanks for the review! About the "Tell your story", at this point is an image: https://github.com/kubernetes/website/blob/master/static/images/case_studies/story.png So the translation affects only to the alternative text: <img src="https://d33wubrfki0l68.cloudfront.net/1f25fd3bb7209410ad60613770321deb5959c2e6/e2c98/images/case_studies/story.png"
alt="Cuéntanos tu historia">Any suggestion on how to tackle localized versions of images with Hugo? |
Oh, interesting. That's a great question. @alexcontini 👋 Does "Tell your story" need to be an image? Is there a way to populate with text instead? |
* Add description meta tag to improve SEO results * Fixes * Remove those files from my PR and have those changes in #13832
i18n/es.toml
Outdated
| # layouts > docs > search | ||
|
|
||
| [layouts_docs_search_fetching] | ||
| other = "Fetching results.." |
There was a problem hiding this comment.
This is still in English. Maybe "Obtención de resultados"?
There was a problem hiding this comment.
Thanks! Yes, my bad. Commited before saving the file, fixed in the new squashed commit.
* Add description meta tag to improve SEO results * Fixes * Remove those files from my PR and have those changes in kubernetes#13832
Add layouts/docs/glossary en i18n strings
Add layouts/docs/glossary es i18n strings
Use i18n strings in layouts/docs/glossary
Add layouts/blog/pager en i18n strings
Add layouts/blog/pager es i18n strings
Use i18n strings in layouts/blog/pager
Add layouts/blog/list en i18n strings
Add layouts/blog/list es i18n strings
Use i18n strings in layouts/case-studies/list
Add layouts/docs/search en i18n strings
Add layouts/docs/search es i18n strings
Use i18n strings in layouts/docs/search
Add layouts/partials/feedback en i18n strings
Add layouts/partials/feedback es i18n strings
Use i18n strings in layouts/partials/feedback
Set html lang using "{{ .Language }}"
|
@bene2k1 comment fixed, thanks for spotting it. I probably commited before saving the localized version. @zacharysarah Reviews fixed and commits squashed! |
|
@kubernetes/sig-docs-l10n-admins SummaryThis PR includes upstream changes to the contents of Impact for localization teamsThese changes are non-breaking. These changes enable localization of content that was previously hard-coded in English. |
|
/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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Add description meta tag to improve SEO results * Fixes * Remove those files from my PR and have those changes in kubernetes#13832
Add layouts/docs/glossary en i18n strings
Add layouts/docs/glossary es i18n strings
Use i18n strings in layouts/docs/glossary
Add layouts/blog/pager en i18n strings
Add layouts/blog/pager es i18n strings
Use i18n strings in layouts/blog/pager
Add layouts/blog/list en i18n strings
Add layouts/blog/list es i18n strings
Use i18n strings in layouts/case-studies/list
Add layouts/docs/search en i18n strings
Add layouts/docs/search es i18n strings
Use i18n strings in layouts/docs/search
Add layouts/partials/feedback en i18n strings
Add layouts/partials/feedback es i18n strings
Use i18n strings in layouts/partials/feedback
Set html lang using "{{ .Language }}"
This PR adds support to localized templates by extracting all hardcoded string to i18n strings.
Also sets the
htmllangattribute to the current page language using{{ .Language }}as suggested by @remyleone in #13799 > layouts/docs/baseof.html.cc @kubernetes/sig-docs-l10n-admins @zacharysarah @remyleone