Skip to content

Localize logo title in page header#18318

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
sftim:20191226_localize_logo_title
Jan 15, 2020
Merged

Localize logo title in page header#18318
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
sftim:20191226_localize_logo_title

Conversation

@sftim
Copy link
Copy Markdown
Contributor

@sftim sftim commented Dec 26, 2019

The Kubernetes logo links to the top-of-site for the current localization, so localize the title attribute of that hyperlink.

Some previews:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 26, 2019
The Kubernetes logo links to the top-of-site for the current
localization, so localize the title attribute.
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Dec 26, 2019
@sftim sftim force-pushed the 20191226_localize_logo_title branch from 017e31b to 16cb128 Compare December 26, 2019 16:52
@sftim
Copy link
Copy Markdown
Contributor Author

sftim commented Dec 26, 2019

/priority backlog

@k8s-ci-robot k8s-ci-robot added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Dec 26, 2019
@tengqm
Copy link
Copy Markdown
Contributor

tengqm commented Dec 27, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 27, 2019

<header>
<a href="{{ site.Home.RelPermalink }}" class="logo" title="Production-Grade Container Orchestration - Kubernetes" aria-label="Kubernetes website"></a>
<a href="{{ site.Home.RelPermalink }}" class="logo" title="{{ site.Home.Title }} - {{ site.Params.title }}" aria-label="Kubernetes website"></a>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sftim, changes seem okay. Is there any value in using { site.Params.description } instead of {{ site.Home.Title }}?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know Hugo well enough to tell which is better. You recommend title="{{ site.Params.description }} - {{ site.Params.title }}"?

Copy link
Copy Markdown
Contributor

@kbhawkey kbhawkey Jan 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't which variable is best to set the localized version of the title.
site.Home is used in top-menu.html (layouts/partials/docs/top-menu.html).
I noticed that a number of the localization teams have translated the description param in config.toml.
I think site.Home.Title is the title for the home page,
https://gohugo.io/variables/site/
https://gohugo.io/variables/page/

How is the Korean, French, Portuguese localizations setting the home page title (front matter of _index.html)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to use the site variable as long as the localization teams know to translate the title field in their home page.

@kbhawkey
Copy link
Copy Markdown
Contributor

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kbhawkey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2020
@k8s-ci-robot k8s-ci-robot merged commit 7d424c3 into kubernetes:master Jan 15, 2020
wawa0210 pushed a commit to wawa0210/website that referenced this pull request Mar 2, 2020
The Kubernetes logo links to the top-of-site for the current
localization, so localize the title attribute.
@sftim sftim deleted the 20191226_localize_logo_title branch June 9, 2021 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants