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
14 changes: 7 additions & 7 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const locales = {
fr: { label: 'Français', lang: 'fr' },
it: { label: 'Italiano', lang: 'it' },
id: { label: 'Bahasa Indonesia', lang: 'id' },
zh: { label: '简体中文', lang: 'zh' },
'zh-cn': { label: '简体中文', lang: 'zh-CN' },
'pt-br': { label: 'Português do Brasil', lang: 'pt-BR' },
ko: { label: '한국어', lang: 'ko' },
};
Expand Down Expand Up @@ -63,7 +63,7 @@ export default defineConfig({
fr: 'Commencez ici',
it: 'Inizia qui',
id: 'Mulai dari sini',
zh: '从这里开始',
'zh-CN': '从这里开始',
'pt-BR': 'Comece Aqui',
ko: '여기서부터',
},
Expand All @@ -78,7 +78,7 @@ export default defineConfig({
fr: 'Mise en route',
it: 'Iniziamo',
id: 'Memulai',
zh: '开始使用',
'zh-CN': '开始使用',
'pt-BR': 'Introdução',
ko: '시작하기',
},
Expand All @@ -93,7 +93,7 @@ export default defineConfig({
fr: 'Installation manuelle',
// it: 'Manual Setup',
id: 'Instalasi Manual',
zh: '手动配置',
'zh-CN': '手动配置',
'pt-BR': 'Instalação Manual',
ko: '수동으로 설정하기',
},
Expand All @@ -108,7 +108,7 @@ export default defineConfig({
fr: 'Impact environnemental',
it: 'Impatto ambientale',
id: 'Dampak terhadap lingkungan',
zh: '环境影响',
'zh-CN': '环境影响',
'pt-BR': 'Impacto Ambiental',
ko: '환경적 영향',
},
Expand Down Expand Up @@ -137,7 +137,7 @@ export default defineConfig({
fr: 'Guides',
it: 'Guide',
id: 'Petunjuk Penggunaan',
zh: '指南',
'zh-CN': '指南',
'pt-BR': 'Guias',
ko: '가이드',
},
Expand All @@ -152,7 +152,7 @@ export default defineConfig({
fr: 'Référence',
it: 'Riferimenti',
id: 'Referensi',
zh: '参考',
'zh-CN': '参考',
'pt-BR': 'Referência',
ko: '참조',
},
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.0.1",
"scripts": {
"test": "start-server-and-test 'pnpm preview' http://localhost:4321 'pnpm pa11y'",
"pa11y": "pa11y-ci --sitemap 'http://localhost:4321/sitemap-0.xml' --sitemap-find 'https://starlight.astro.build' --sitemap-replace 'http://localhost:4321' --sitemap-exclude '/(de|zh|fr|es|pt-br|it|id|ko)/.*'",
"pa11y": "pa11y-ci --sitemap 'http://localhost:4321/sitemap-0.xml' --sitemap-find 'https://starlight.astro.build' --sitemap-replace 'http://localhost:4321' --sitemap-exclude '/(de|zh-cn|fr|es|pt-br|it|id|ko)/.*'",
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
Expand Down
1 change: 1 addition & 0 deletions docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/ph/* https://astro-houston-ph.pages.dev/ph/:splat 200
/:lang/* /:lang/404/ 404
/zh/* /zh-cn/:splat 200
4 changes: 2 additions & 2 deletions docs/src/content/docs/de/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ export default defineConfig({
en: {
label: 'English',
},
// Chinesische Seiten in `src/content/docs/zh/`
zh: {
// Chinesische Seiten in `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/docs/es/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Starlight proporciona soporte incorporado para sitios multilingües, incluidas l
en: {
label: 'English',
},
// Chino simplificado en `src/content/docs/zh/`
zh: {
// Chino simplificado en `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -55,7 +55,7 @@ Starlight proporciona soporte incorporado para sitios multilingües, incluidas l
- docs/
- ar/
- en/
- zh/
- zh-cn/

</FileTree>

Expand Down Expand Up @@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // lang es obligatorio para los locales raíz
},
zh: {
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -102,7 +102,7 @@ Cuando uses una `root` locale, mantén las páginas para ese idioma directamente
- content/
- docs/
- **index.md**
- zh/
- zh-cn/
- **index.md**

</FileTree>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/es/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ export default defineConfig({
en: {
label: 'English',
},
// Los documentos en chino simplificado en `src/content/docs/zh/`
zh: {
// Los documentos en chino simplificado en `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/es/reference/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ La dirección de escritura de la página.

**Tipo:** `string`

Etiqueta de idioma BCP-47 para la configuración regional de esta página, por ejemplo, `en`, `zh` o `pt-BR`.
Etiqueta de idioma BCP-47 para la configuración regional de esta página, por ejemplo, `en`, `zh-CN` o `pt-BR`.

#### `locale`

Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/docs/fr/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Starlight offre une prise en charge intégrée des sites multilingues, y compris
en: {
label: 'English',
},
// Docs en chinois simplifié dans `src/content/docs/zh/`
zh: {
// Docs en chinois simplifié dans `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -55,7 +55,7 @@ Starlight offre une prise en charge intégrée des sites multilingues, y compris
- docs/
- ar/
- en/
- zh/
- zh-cn/

</FileTree>

Expand Down Expand Up @@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // lang est nécessaire pour les locales de la racine
},
zh: {
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -102,7 +102,7 @@ Lorsque vous utilisez une locale `root`, gardez les pages pour cette langue dire
- content/
- docs/
- **index.md**
- zh/
- zh-cn/
- **index.md**

</FileTree>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/fr/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ export default defineConfig({
en: {
label: 'English',
},
// Documentations en Chinois simplifié se trouve dans `src/content/docs/zh/`
zh: {
// Documentations en Chinois simplifié se trouve dans `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/docs/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Starlight provides built-in support for multilingual sites, including routing, f
en: {
label: 'English',
},
// Simplified Chinese docs in `src/content/docs/zh/`
zh: {
// Simplified Chinese docs in `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -55,7 +55,7 @@ Starlight provides built-in support for multilingual sites, including routing, f
- docs/
- ar/
- en/
- zh/
- zh-cn/

</FileTree>

Expand Down Expand Up @@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // lang is required for root locales
},
zh: {
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -102,7 +102,7 @@ When using a `root` locale, keep pages for that language directly in `src/conten
- content/
- docs/
- **index.md**
- zh/
- zh-cn/
- **index.md**

</FileTree>
Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/docs/it/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Starlight offre il supporto per siti multilingua, compreso di indirizzamento, co
en: {
label: 'English',
},
// La documentazione in cinese semplificato si trova in `src/content/docs/zh/`
zh: {
// La documentazione in cinese semplificato si trova in `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -55,7 +55,7 @@ Starlight offre il supporto per siti multilingua, compreso di indirizzamento, co
- docs/
- ar/
- en/
- zh/
- zh-cn/

</FileTree>

Expand Down Expand Up @@ -84,7 +84,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // necessario per root
},
zh: {
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -102,7 +102,7 @@ Quando si usa una lingua `root`, metti le pagine direttamente in `src/content/do
- content/
- docs/
- **index.md**
- zh/
- zh-cn/
- **index.md**

</FileTree>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/it/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ export default defineConfig({
en: {
label: 'English',
},
// La documentazione in cinese semplificato si trova in `src/content/docs/zh/`
zh: {
// La documentazione in cinese semplificato si trova in `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/docs/ja/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Starlightは、ルーティング、フォールバックコンテンツ、右
en: {
label: 'English',
},
// 簡体字中国語のドキュメントは`src/content/docs/zh/`に置きます。
zh: {
// 簡体字中国語のドキュメントは`src/content/docs/zh-cn/`に置きます。
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -54,7 +54,7 @@ Starlightは、ルーティング、フォールバックコンテンツ、右
- docs/
- ar/
- en/
- zh/
- zh-cn/

</FileTree>

Expand Down Expand Up @@ -83,7 +83,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // langはルートロケールに必要です
},
zh: {
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -101,7 +101,7 @@ export default defineConfig({
- content/
- docs/
- **index.md**
- zh/
- zh-cn/
- **index.md**

</FileTree>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/ja/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ export default defineConfig({
en: {
label: 'English',
},
// 簡体字中国語のドキュメントは`src/content/docs/zh/`にあります。
zh: {
// 簡体字中国語のドキュメントは`src/content/docs/zh-cn/`にあります。
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/docs/ko/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Starlight는 라우팅, 대체 콘텐츠 및 전체 RTL(오른쪽에서 왼쪽
en: {
label: 'English',
},
// 중국어 간체 문서는 `src/content/docs/zh/`에 있습니다.
zh: {
// 중국어 간체 문서는 `src/content/docs/zh-cn/`에 있습니다.
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -54,7 +54,7 @@ Starlight는 라우팅, 대체 콘텐츠 및 전체 RTL(오른쪽에서 왼쪽
- docs/
- ar/
- en/
- zh/
- zh-cn/

</FileTree>

Expand Down Expand Up @@ -83,7 +83,7 @@ export default defineConfig({
label: 'English',
lang: 'en', // 루트 로케일은 lang이 반드시 필요합니다.
},
zh: {
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand All @@ -101,7 +101,7 @@ export default defineConfig({
- content/
- docs/
- **index.md**
- zh/
- zh-cn/
- **index.md**

</FileTree>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/ko/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ export default defineConfig({
label: 'English',
lang: 'en',
},
// 중국어 간체 문서는 `src/content/docs/zh/`에 있습니다.
zh: {
// 중국어 간체 문서는 `src/content/docs/zh-cn/`에 있습니다.
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/ko/reference/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Starlight는 사용자 정의 컴포넌트에 다음 속성들을 전달합니

**타입:** `string`

이 페이지의 로케일에 대한 BCP-47 언어 태그입니다. 예: `en`, `zh` 또는 `pt-BR`
이 페이지의 로케일에 대한 BCP-47 언어 태그입니다. 예: `en`, `zh-CN` 또는 `pt-BR`

#### `locale`

Expand Down
Loading