-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Use localization friendly links in English main site. #18403
Comments
💯 this To be honest, when I started contributing I saw that there were localizations and I assumed that a mechanism similar to this already existed. I was genuinely surprised when I realized that localization teams needed to manually track this kind of detail. |
/kind feature |
No objections wrt priority. :) |
/priority important-longterm |
This is interesting! How does this workk?
|
Right, if you explicitly provide a |
@tengqm |
I think the modification proposed by tengqm is better. |
@tanjunchen No progress yet. If the proposed approach makes sense, we may need to revise the English site as early as possible. |
done |
Inspired by @tengqm PR #18374 experiment, I have been proposed another PR #18678 for solving this issue. For For these reasons, I think customized shortcode should be better, and PR #18678 is my answer. |
Sort of related: PR #18871. |
How about this issue now ? see #18929 |
@tanjunchen It is not gonna be a trivial change. I'm not a big fan of adding/modifying hugo code in this repo. |
@tengqm Do you have any idea about solving this issue? I think it should be a common issue for multilingual site, and we may need to make a conclusion about how to fix this issue at first, and then try to propose a PR for fixing it, here are some considerations in my mind: We already have multilingual configurations, such as supported languages and their weight, content dir, language alternatives etc, if we could add something for configuring this link convert, for example like adding configuration If it's been set true, we could make hugo adding the language prefix by current dir language and its alternative language, therefore, we didn't need to handle this job by manually anymore... If someone didn't prepare the translation placeholder for the ref, hugo should try to make the ref link fallback to the alternative language, and if it still fails, hugo should panic and throw errors, just like the shortcode What do you think about this solution? Or it's welcome if you have another better and workable solution. If we could make a conclusion, and it needs do some job with hugo upstream, I'm ready to do this. Thanks. |
The |
Yes, I was also wondering about this. I don't have any idea about which is the right way to do this, so I leave a comment on hugo repo, maybe hugo dev could give us some suggestions. |
We SHOULD have used the localization friendly way to do this. +1 |
This attempts to improve intra-site links so that the links can be automatically translated to localized versions. xref: kubernetes#18403 This PR is about the concepts/architecture and concepts/cluster-administration directories.
This attempts to improve intra-site links so that the links can be automatically translated to localized versions. xref: kubernetes#18403 This PR is about the concepts/architecture and concepts/cluster-administration directories.
This attempts to improve intra-site links so that the links can be automatically translated to localized versions. xref: kubernetes#18403 This PR is about the concepts/architecture and concepts/cluster-administration directories.
This attempts to improve intra-site links so that the links can be automatically translated to localized versions. xref: kubernetes#18403 This PR is about the concepts/architecture and concepts/cluster-administration directories.
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
still relevant. |
@tengqm would you like to help us for this issue? I was wondering what else needed besides the config itself. |
My number 1 favorite approach would be for a localization team to write something like: * 进一步了解 [控制器](/docs/concepts/architecture/controller/) and for the generated HTML to link to https://kubernetes.io/zh/docs/concepts/architecture/controller/ (or whatever language code is appropriate. If Hugo can't yet do this, it might even be feasible to look into tweaking Hugo itself. |
/reopen Oops. Misclick. |
@sftim: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This attempts to improve intra-site links so that the links can be automatically translated to localized versions. xref: kubernetes#18403 This PR is about the concepts/architecture and concepts/cluster-administration directories.
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I would like to /reopen this ticket in light of Hugo's ability to render links via https://gohugo.io/render-hooks/links/. This option can be used to implicitly add a language prefix to links. Thus, all valid Markdown links Any advice and suggestions are welcome 🙏 PS. My WIP is here Andygol#160 🚧 |
@sftim 🛎️ ☝️ |
Ack. I've seen the message @Andygol. |
This is a Feature Request
What would you like to be added
The intra-site links in the English documents are currently plain markdown links, as shown below:
When pages containing such links are translated into another language, the localization team has to take extra care to handle them or else the links will be missing or pointing to an incorrect location. For example, in the Chinese localization, the above line has to be revised to something like:
We need to revise this links to one of the following formats so that the links can be automatically converted to the correct target:
For English main site and all localization sites, the above links can be correctly converted.
Why is this needed
Taking care of so many links for so many localization, across so many teams is error-prone and boring. Once we have the links on the English main site refactored. All localization teams can simply skip updating the link target.
As a bonus, if a link target doesn't exist in a particular language, Hugo can detect the missing link and report errors during build. So we can detect missing links as early as possible.
Comments
For related experiments, see #18374
The text was updated successfully, but these errors were encountered: