Skip to content

Commit 53f3678

Browse files
committed
rename cn lang to zh
1 parent b24b5a9 commit 53f3678

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

app/[lang]/(home)/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Rocket, Zap, Box, Shield, Puzzle, Github, ArrowRight, Star, ExternalLin
99
import FeatureCard from './FeatureCard';
1010

1111
const translations = {
12-
cn: {
12+
zh: {
1313
tagline: '专注信息学竞赛,提供一站式服务',
1414
hydroOJ: 'Hydro 在线测评系统',
1515
modernOJ: '现代 OJ 系统',
@@ -147,7 +147,7 @@ const itemVariants: Variants = {
147147

148148
export default function HomePage() {
149149
const params = useParams();
150-
const lang = (params.lang === 'en' ? 'en' : 'cn') as keyof typeof translations;
150+
const lang = (params.lang === 'en' ? 'en' : 'zh') as keyof typeof translations;
151151
const t = translations[lang];
152152
return (<>
153153
<section className="relative min-h-screen flex flex-col items-center justify-center overflow-hidden pb-20">

app/api/search/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const mandarinTokenizer = createTokenizer({
1212

1313
export const { staticGET: GET } = createFromSource(source, {
1414
localeMap: {
15-
cn: {
15+
zh: {
1616
tokenizer: mandarinTokenizer,
1717
components: {
1818
tokenizer: mandarinTokenizer,

app/docs/[[...slug]]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ export default async function DocsRedirectPage(props: {
55
params: Promise<{ slug?: string[] }>;
66
}) {
77
const { slug } = await props.params;
8-
const path = slug?.length ? `/cn/docs/${slug.join('/')}` : '/cn/docs';
8+
const path = slug?.length ? `/zh/docs/${slug.join('/')}` : '/zh/docs';
99
redirect(path);
1010
}
1111

1212
export async function generateStaticParams() {
1313
return source.generateParams()
14-
.filter((p) => p.lang === 'cn')
14+
.filter((p) => p.lang === 'zh')
1515
.map(({ slug }) => ({ slug }));
1616
}

app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { redirect } from 'next/navigation';
22

33
export default function RootPage() {
4-
redirect('/cn');
4+
redirect('/zh');
55
}

content/docs/Hydro/plugins/hydrojudge.en.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Run the following on the server to find the runtime directory of hydro-sandbox:
150150
pm2 info hydro-sandbox | grep "exec cwd"
151151
```
152152

153-
Refer to custom mount configuration in [Sandbox filesystem mount documentation](https://docs.goj.ac/cn/mount#自定义挂载), save it in the runtime directory as `mount.yaml`.
153+
Refer to custom mount configuration in [Sandbox filesystem mount documentation](https://docs.goj.ac/mount#customization), save it in the runtime directory as `mount.yaml`.
154154
Modify `size` and `nr_inodes` mount parameters for `work dir` and `tmp dir` to your desired values, save, then restart `hydro-sandbox` to apply.
155155

156156
For users installed after 2022/8/12:

lib/i18n.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineI18n } from 'fumadocs-core/i18n';
22

33
export const i18n = defineI18n({
4-
defaultLanguage: 'cn',
5-
languages: ['cn', 'en'],
4+
defaultLanguage: 'zh',
5+
languages: ['zh', 'en'],
66
});

lib/layout.shared.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Image from 'next/image';
55

66
export const i18nUI = defineI18nUI(i18n, {
77
translations: {
8-
cn: {
8+
zh: {
99
displayName: '中文',
1010
toc: '目录',
1111
search: '搜索文档',

0 commit comments

Comments
 (0)