Skip to content
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

Update glossary_tooltip.html to include relLangURL for $external_link #46306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Andygol
Copy link
Contributor

@Andygol Andygol commented May 10, 2024

This fine-tuning will help to avoid explicit manual language prefixing for the full_link. This change does not affect already language prefixed full_link (e.g. zh-cn)

@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label May 10, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign divya-mohan0209 for approval. For more information see the Kubernetes Code Review Process.

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

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 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 May 10, 2024
Copy link

netlify bot commented May 10, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 6a75158
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/663dd84a0d29ff00086d972a
😎 Deploy Preview https://deploy-preview-46306--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@Arhell Arhell left a comment

Choose a reason for hiding this comment

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

/area web-development

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label May 11, 2024
@@ -17,7 +17,7 @@

{{- $tooltip := $tooltip | replaceRE "(?s)<a class='glossary-tooltip'.*?>(.*?).*</a>" "$1" | plainify -}}
{{- $tooltip := trim $tooltip " \n" -}}
<a class='glossary-tooltip' title='{{- $tooltip | safeHTML -}}' data-toggle='tooltip' data-placement='top' href='{{ $external_link }}' target='_blank' aria-label='{{ $text }}'>
<a class='glossary-tooltip' title='{{- $tooltip | safeHTML -}}' data-toggle='tooltip' data-placement='top' href='{{ $external_link | relLangURL }}' target='_blank' aria-label='{{ $text }}'>
Copy link
Contributor

Choose a reason for hiding this comment

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

If someone wants to link to an English page explicitly (because there's no localized version of it yet), does that still work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't matter due to the rules upon which the glossary page is built.

Let's take the Polish language as an example, https://deploy-preview-46306--kubernetes-io-main-staging.netlify.app/pl/docs/reference/glossary/?all=true#term-api-group — there is no file content/pl/docs/reference/glossary/api-group.md and English version is incorporated instead.

@sftim
Copy link
Contributor

sftim commented May 13, 2024

/area localization

@k8s-ci-robot k8s-ci-robot added the area/localization General issues or PRs related to localization label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/localization General issues or PRs related to localization area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

None yet

4 participants