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 language support to zh #33050

Closed
wants to merge 1 commit into from
Closed

Conversation

tengqm
Copy link
Contributor

@tengqm tengqm commented Apr 20, 2022

Docsy has renamed language 'zh' to 'zh-cn'. This is causing a huge problem for the Chinese localization.
This PR is a first step to fix this problem. Follow up PRs are needed to fix all the relative links.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 20, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from tengqm after the PR has been reviewed.

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 the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Apr 20, 2022
@netlify
Copy link

netlify bot commented Apr 20, 2022

Deploy Preview for kubernetes-io-main-staging ready!

Name Link
🔨 Latest commit 86ff317
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/625f9dc27ee6680008d23424
😎 Deploy Preview https://deploy-preview-33050--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 settings.

Docsy has renamed language 'zh' to 'zh-cn'. This is causing a huge problem for the Chinese localization.
This PR is a first step to fix this problem. Follow up PRs are needed to fix all the relative links.
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 20, 2022
@tengqm
Copy link
Contributor Author

tengqm commented Apr 20, 2022

/hold
Not sure if there is a better workaround for the language rename issue.
It might be a huge task for the 1.24 release.
However, if we don't do this now, after dev-1.24 going live, we will not be able to track changes to be synced for Chinese localization.
So ... I'd prefer to get this done NOW. As for 1.24 release, /content/zh won't be causing many conflicts.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 20, 2022
@tengqm
Copy link
Contributor Author

tengqm commented Apr 20, 2022

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 20, 2022
@jihoon-seo
Copy link
Member

jihoon-seo commented Apr 20, 2022

@sftim
Copy link
Contributor

sftim commented Apr 20, 2022

Oops. The update looked OK to me but I didn't try following links.

We could add a 302 redirect from /zh to /zh-cn/, and remove that redirect eventually (some years from now)?

@@ -300,15 +300,15 @@ languageName ="English"
weight = 1
languagedirection = "ltr"

[languages.zh]
[languages.zh-cn]
title = "Kubernetes"
description = "生产级别的容器编排系统"
languageName = "中文 Chinese"
weight = 2
contentDir = "content/zh"
Copy link
Member

@jihoon-seo jihoon-seo Apr 20, 2022

Choose a reason for hiding this comment

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

Links in the preview of this PR (like here and there) are still pointing /zh/, and I guess that this is because:

Suggested change
contentDir = "content/zh"
contentDir = "content/zh-cn"

But it might be okay, since the PR #33051 is already covering this.

Links in the preview of the PR #33051 looks fine:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cannot change it yet. Because we don't have the content/zh-cn directory yet in this PR.

@tengqm
Copy link
Contributor Author

tengqm commented Apr 20, 2022

We could add a 302 redirect from /zh to /zh-cn/, and remove that redirect eventually (some years from now)?

Yes. Adding a single 302 redirection would be nice.

@tengqm
Copy link
Contributor Author

tengqm commented Apr 21, 2022

/close
This solution is too disruptive.

@k8s-ci-robot
Copy link
Contributor

@tengqm: Closed this PR.

In response to this:

/close
This solution is too disruptive.

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.

@tengqm tengqm deleted the fix-zh-lang branch June 18, 2022 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants