Skip to content

docs: en translation#86

Merged
pandadtdyy merged 8 commits intodocsfrom
translate
Mar 27, 2026
Merged

docs: en translation#86
pandadtdyy merged 8 commits intodocsfrom
translate

Conversation

@undefined-moe
Copy link
Member

No description provided.

@gitguardian
Copy link

gitguardian bot commented Mar 13, 2026

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
28577675 Triggered SMTP credentials 849a262 content/docs/Hydro/install/smtp.en.md View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds English-language documentation and introduces locale-aware routing/UI configuration for the Fumadocs-powered Next.js docs site.

Changes:

  • Introduce i18n config and wire it into the Fumadocs source + layouts.
  • Add [lang]-scoped layouts/pages and redirects to make /zh the default entry point while enabling /en.
  • Add a large set of *.en.* docs pages and meta.en.json navigation files.

Reviewed changes

Copilot reviewed 68 out of 70 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
lib/source.ts Injects i18n into the Fumadocs source loader.
lib/layout.shared.tsx Defines shared layout options and i18n UI strings.
lib/i18n.ts Declares supported languages and default language.
content/index.en.md Adds English landing content (frontmatter-based).
content/docs/Tools/meta.en.json Adds English nav metadata for Tools section.
content/docs/Tools/index.en.mdx Adds English Tools documentation page.
content/docs/Hydro/user/testdata.en.mdx Adds English “Test Data Format” page.
content/docs/Hydro/user/problem.en.mdx Adds English “Problem” page.
content/docs/Hydro/user/problem-format.en.md Adds English “Hydro Problem Format” page.
content/docs/Hydro/user/problem-create.en.md Adds English “Problem Create” guide page.
content/docs/Hydro/user/permission.en.md Adds English “Permission System” page.
content/docs/Hydro/user/meta.en.json Adds English nav metadata for User guide section.
content/docs/Hydro/user/index.en.md Adds English User documentation landing page.
content/docs/Hydro/user/domain.en.mdx Adds English “Domain” page.
content/docs/Hydro/user/copy-problem.en.md Adds English “Copy Problem” page.
content/docs/Hydro/system/onsite-contest.en.md Adds English system guide for onsite contests.
content/docs/Hydro/system/meta.en.json Adds English nav metadata for System docs.
content/docs/Hydro/system/maintain.en.md Adds English maintenance guide.
content/docs/Hydro/system/import-user.en.mdx Adds English “Import Users” guide.
content/docs/Hydro/system/frontend-modify.en.mdx Adds English “Frontend Modification” guide.
content/docs/Hydro/system/database.en.mdx Adds English DB backup/restore guide.
content/docs/Hydro/system/cli.en.mdx Adds English CLI guide.
content/docs/Hydro/system/cdn.en.mdx Adds English CDN guide.
content/docs/Hydro/plugins/vjudge.en.mdx Adds English VJudge plugin page.
content/docs/Hydro/plugins/sonic.en.md Adds English Sonic plugin page.
content/docs/Hydro/plugins/recaptcha.en.mdx Adds English reCAPTCHA plugin page.
content/docs/Hydro/plugins/migrate.en.mdx Adds English migrate plugin page.
content/docs/Hydro/plugins/meta.en.json Adds English nav metadata for Plugins section.
content/docs/Hydro/plugins/index.en.mdx Adds English Plugins landing/list page.
content/docs/Hydro/plugins/hydrojudge.en.mdx Adds English hydrojudge plugin page.
content/docs/Hydro/plugins/geoip.en.md Adds English GeoIP plugin page.
content/docs/Hydro/plugins/fps-importer.en.md Adds English fps-importer plugin page.
content/docs/Hydro/plugins/extra.en.md Adds English “Other/Premium” plugins page.
content/docs/Hydro/plugins/elastic.en.mdx Adds English Elastic Search plugin page.
content/docs/Hydro/meta.en.json Adds English nav metadata for Hydro section.
content/docs/Hydro/install/smtp.en.md Adds English SMTP install guide.
content/docs/Hydro/install/s3.en.mdx Adds English storage (S3) guide.
content/docs/Hydro/install/riscv.en.mdx Adds English RISC-V installation guide.
content/docs/Hydro/install/proxy.en.mdx Adds English reverse proxy/SSL guide.
content/docs/Hydro/install/meta.en.json Adds English nav metadata for Install section.
content/docs/Hydro/install/index.en.mdx Adds English “Deploy Hydro” guide.
content/docs/Hydro/install/compiler.en.mdx Adds English compilers/languages guide.
content/docs/Hydro/index.en.mdx Adds English Hydro introduction page.
content/docs/Hydro/dev/typescript.en.md Adds English TypeScript plugin-dev guide.
content/docs/Hydro/dev/third-party-auth.en.md Adds English third-party auth integration guide.
content/docs/Hydro/dev/naming.en.md Adds English naming conventions guide.
content/docs/Hydro/dev/meta.en.json Adds English nav metadata for Dev section.
content/docs/Hydro/dev/index.en.mdx Adds English dev environment setup guide.
content/docs/Hydro/dev/hook.en.md Adds English hooks guide.
content/docs/Hydro/dev/frontend-modify.en.md Adds English dev frontend modification pointer page.
content/docs/Hydro/dev/db-layout.en.md Adds English DB layout guide.
content/docs/Hydro/dev/PERM_PRIV.en.md Adds English PERM/PRIV guide.
content/docs/Hydro/api/judge.en.md Adds English judge protocol documentation.
content/docs/Hydro/FAQ/upgrade.en.md Adds English upgrade guide.
content/docs/Hydro/FAQ/meta.en.json Adds English nav metadata for FAQ section.
content/docs/Hydro/FAQ/index.en.mdx Adds English FAQ landing/collection page.
content/docs/Hydro/FAQ/debug.en.md Adds English debugging guide.
app/page.tsx Redirects / to /zh.
app/layout.tsx Adjusts root layout structure and removes RootProvider from the root.
app/layout.config.tsx Removes old shared layout config (replaced by lib/layout.shared.tsx).
app/docs/[[...slug]]/page.tsx Converts legacy /docs/* route into a redirect to /zh/docs/*.
app/api/search/route.ts Makes search config locale-aware (zh tokenizer + en language).
app/[lang]/layout.tsx Adds locale-scoped RootProvider wrapper and static params for languages.
app/[lang]/docs/[[...slug]]/page.tsx Adds locale-aware docs page rendering.
app/[lang]/docs/[[...slug]]/layout.tsx Switches docs layout tree/options to be locale-specific.
app/[lang]/(home)/page.tsx Localizes the marketing home page content based on [lang].
app/[lang]/(home)/layout.tsx Locale-aware HomeLayout wrapper using shared base options.
app/[lang]/(home)/images.tsx Adds a client-side image carousel component.
app/[lang]/(home)/FeatureCard.tsx Adds a reusable feature card component.
app/(home)/layout.tsx Removes old non-i18n home layout.
Comments suppressed due to low confidence (1)

content/docs/Hydro/user/testdata.en.mdx:107

  • There is an extra opening Markdown code fence (``` on its own) that is never closed, which will render the rest of the page as a code block. It also duplicates the following sentence. Please remove the stray fence and keep a single copy of the sentence/link.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +28
`problem_zh.md` This file is the problem content, i.e., problem statement, in markdown format.
`probelm.yaml` file. This is the problem configuration information, such as title and tags.
`testdata` subdirectory, corresponding to files in the test data section on the website.
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Typo in the filename: probelm.yaml should be problem.yaml (this is also a real file name users will likely copy/paste).

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +41
Assume all problem statements use the markdown document below:

# 要求

输入两个整数,输出他们的和

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This section of the "*.en.md" page still contains Chinese content (e.g., the sample statement headings and text). If this page is meant to be the English translation, please translate these example blocks (or mark them clearly as untranslated) so English readers aren’t blocked.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +7
<Callout>
You can quickly install a standalone judge machine with the one-click installation script. For details, see [Deploy Hydro](../install/#部署).
</Callout>
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The link uses a Chinese heading anchor (#部署) in an English page, which likely won’t match the generated anchor IDs and will break navigation. Please update it to point to the English heading anchor (or link to the page without an anchor).

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +37

For a comprehensive suite of contest tools, see the [XCPC-Tools](/docs/Tools) documentation.

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This absolute link (/docs/Tools) will go through the legacy redirect and end up on the default (zh) locale. In an English doc, prefer a locale-preserving relative link (e.g., to the sibling top-level Tools section) so readers stay in the same language.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to 13
<html lang="zh" className={inter.className} suppressHydrationWarning>
<head>
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The root tag is hardcoded to lang="zh", so English routes (e.g. /en/...) will still announce the document as Chinese, which hurts accessibility/SEO and can affect screen reader pronunciation. Please make the lang attribute reflect the active locale (or restructure layouts so the lang segment can control it).

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +12
```
喵? tree
.
├── 任意文件名的文件夹
│ ├── problem.yaml
│ ├── problem_zh.md
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This English page includes Chinese/informal text in the example (e.g., "喵? tree", "任意文件名的文件夹", and Chinese YAML values). If this is intended as an English translation, please translate these parts or replace them with English equivalents to keep the locale consistent.

Copilot uses AI. Check for mistakes.
@pandadtdyy pandadtdyy merged commit 3cb8595 into docs Mar 27, 2026
1 check passed
@pandadtdyy pandadtdyy deleted the translate branch March 27, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants