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

[i18nIgnore] i18n(zh-cn): Fix Chinese subtag #855

Merged
merged 12 commits into from
Oct 11, 2023

Conversation

liruifengv
Copy link
Member

@liruifengv liruifengv commented Oct 10, 2023

What kind of changes does this PR include?

  • Minor content fixes (broken links, typos, etc.)
  • Changes to Starlight code

Description

  • Fix Chinese subtag
  • Url: zh -> zh-cn
  • Built-in Translations: zh -> zh-CN
  • All link /zh/ -> /zh-cn/
  • Add redirect: /zh/* /zh-cn/:splat

@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2023

⚠️ No Changeset found

Latest commit: 9b1e9f6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 9b1e9f6
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/6526b336e67cd30008872d68
😎 Deploy Preview https://deploy-preview-855--astro-starlight.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.

@github-actions github-actions bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels Oct 10, 2023
@liruifengv
Copy link
Member Author

@Genteure
Copy link
Contributor

Some thoughts:

  • This change would be better to make after existing i18n PRs to docs are merged.
  • Links can be mass search-replaced in the same PR (/zh/ -> /zh-cn/).
  • A changeset is needed as this would be a breaking change.

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts label Oct 11, 2023
docs/public/_redirects Outdated Show resolved Hide resolved
@liruifengv liruifengv changed the title i18n(zh-cn): Fix Chinese subtag [i18nIgnore] i18n(zh-cn): Fix Chinese subtag Oct 11, 2023
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thanks for updating this @liruifengv!

Just one comment on what we do with our built-in translation dictionary.

packages/starlight/translations/index.ts Outdated Show resolved Hide resolved
packages/starlight/translations/index.ts Outdated Show resolved Hide resolved
packages/starlight/translations/zh-CN.json Outdated Show resolved Hide resolved
@Genteure
Copy link
Contributor

@delucis Do you think the changeset is still needed, or it can be removed since this ended up mostly changing starlight's own docs? I suggested adding a changeset because I originally thought this would be a breaking change for existing users with Chinese docs in their project.

@delucis
Copy link
Member

delucis commented Oct 11, 2023

Great point @Genteure. Yes, this is now a 100% transparent change that doesn’t impact Starlight users really, so we can remove the changeset.

@liruifengv
Copy link
Member Author

Great point @Genteure. Yes, this is now a 100% transparent change that doesn’t impact Starlight users really, so we can remove the changeset.

I removed it. It doesn’t impact existing users because we kept the built-in UI as zh

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Great — I think this PR is ready to merge then. Thanks for all the work on this!

@delucis delucis merged commit a26c77e into withastro:main Oct 11, 2023
8 checks passed
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Oct 11, 2023
* main:
  Add missing changeset from withastro#852
  i18n(zh-CN): fix another link to astro main doc (withastro#867)
  i18n(zh-CN): fix link to astro main doc (withastro#866)
  [i18nIgnore] i18n(zh-cn): Fix Chinese subtag (withastro#855)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes i18n Anything to do with internationalization & translation efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants