Localize logo title in page header#18318
Conversation
The Kubernetes logo links to the top-of-site for the current localization, so localize the title attribute.
017e31b to
16cb128
Compare
|
/priority backlog |
|
/lgtm |
|
|
||
| <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> |
There was a problem hiding this comment.
@sftim, changes seem okay. Is there any value in using { site.Params.description } instead of {{ site.Home.Title }}?
There was a problem hiding this comment.
I don't know Hugo well enough to tell which is better. You recommend title="{{ site.Params.description }} - {{ site.Params.title }}"?
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
It makes sense to use the site variable as long as the localization teams know to translate the title field in their home page.
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The Kubernetes logo links to the top-of-site for the current localization, so localize the title attribute.
The Kubernetes logo links to the top-of-site for the current localization, so localize the
titleattribute of that hyperlink.Some previews: