Skip to content

Conversation

@Twisuki
Copy link

@Twisuki Twisuki commented Jun 28, 2025

Pull Request Check List

Resolves: #issue-number-here

  • Added tests for changed code.
  • Updated documentation for changed code.

Added Chinese Docs translations.

Due to limited time and resources, the Language section has not yet been translated but will be supplemented later.

添加了中文文档翻译。

由于精力有限,Language部分尚未翻译,后续会补充。

@netlify
Copy link

netlify bot commented Jun 28, 2025

Deploy Preview for djlint failed.

Name Link
🔨 Latest commit 8cbccfe
🔍 Latest deploy log https://app.netlify.com/projects/djlint/deploys/6894857f85b7fb000794a9bd

@Twisuki
Copy link
Author

Twisuki commented Jun 29, 2025

The Language section has been supplemented.

Language部分已补充。

@Twisuki
Copy link
Author

Twisuki commented Jun 30, 2025

Is anyone here ?

@Twisuki
Copy link
Author

Twisuki commented Jul 4, 2025

Alright I think if no one care until next Monday, I will close this PR...

@monosans
Copy link
Member

monosans commented Jul 4, 2025

Hey! Thanks for the PR! I will review it when I have free time.

@monosans monosans requested a review from Copilot July 29, 2025 13:30

This comment was marked as outdated.

@monosans monosans requested a review from Copilot July 29, 2025 13:56
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

This PR adds Chinese translation support for the djLint documentation website. The translation provides comprehensive Chinese documentation including getting started guides, configuration options, linter rules, formatter documentation, and language-specific guides for various template engines.

Key Changes

  • Added complete Chinese translation for all documentation pages
  • Integrated Chinese locale into the site's internationalization system
  • Translated configuration options and UI elements
  • Updated package dependencies

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/src/zh/ New directory containing complete Chinese translations for all documentation pages
docs/src/_data/locales.js Added Chinese locale configuration
docs/src/_data/i18n/index.js Added Chinese translations for UI strings and navigation
docs/src/_data/configuration.json Added Chinese descriptions for configuration options
docs/package.json Updated sass dependency version
docs/readme.md Minor formatting change
Comments suppressed due to low confidence (1)

docs/package.json:59

  • The sass package version 1.58.3 appears to be older than the current version 1.60.0. This downgrade from ^1.60.0 to ^1.58.3 may introduce compatibility issues or remove bug fixes. Consider keeping the newer version unless there's a specific reason for the downgrade.
    "sass": "^1.58.3",

@Twisuki
Copy link
Author

Twisuki commented Jul 29, 2025

Thanks for reviewing my PR. The mistakes pointed out by Copilot have been fixed.

Apologies for the careless copy-paste errors in docs/language and the mistakes in docs/linter.

@Twisuki
Copy link
Author

Twisuki commented Jul 29, 2025

Oh my god! what happened...

@Twisuki
Copy link
Author

Twisuki commented Jul 29, 2025

It seems like docs/src/lib/...js was ignored by git, with "lib/" line297 in .gitignore. I refresh my git to change LF to CRLF and it remove this file from my git.

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

Copilot reviewed 25 out of 26 changed files in this pull request and generated 20 comments.


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

```

<div class="box notification is-info is-light">
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This configuration link points to the English docs (/docs/configuration/). For the zh locale it should point to the localized page (e.g. /zh/docs/configuration/, or build it using lang_code_url).

Suggested change
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="{{ 'lang_code_url' | i18n }}/docs/configuration/">配置</a> 章节</div>

Copilot uses AI. Check for mistakes.
```

<div class="box notification is-info is-light">
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This configuration link points to the English docs (/docs/configuration/). For the zh locale it should point to the localized page (e.g. /zh/docs/configuration/, or build it using lang_code_url).

Suggested change
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/zh/docs/configuration/">配置</a> 章节</div>

Copilot uses AI. Check for mistakes.
```

<div class="box notification is-info is-light">
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This configuration link points to the English docs (/docs/configuration/). For the zh locale it should point to the localized page (e.g. /zh/docs/configuration/, or build it using lang_code_url).

Suggested change
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/zh/docs/configuration/">配置</a> 章节</div>

Copilot uses AI. Check for mistakes.
```

<div class="box notification is-info is-light">
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This configuration link points to the English docs (/docs/configuration/). For the zh locale it should point to the localized page (e.g. /zh/docs/configuration/, or build it using lang_code_url).

Suggested change
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="{{ lang_code_url }}/docs/configuration/">配置</a> 章节</div>

Copilot uses AI. Check for mistakes.
```

<div class="box notification is-info is-light">
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This configuration link points to the English docs (/docs/configuration/). For the zh locale it should point to the localized page (e.g. /zh/docs/configuration/, or build it using lang_code_url).

Suggested change
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/zh/docs/configuration/">配置</a> 章节</div>

Copilot uses AI. Check for mistakes.
```

<div class="box notification is-info is-light">
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This configuration link points to the English docs (/docs/configuration/). For the zh locale it should point to the localized page (e.g. /zh/docs/configuration/, or build it using lang_code_url).

Suggested change
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/zh/docs/configuration/">配置</a> 章节</div>

Copilot uses AI. Check for mistakes.
```

<div class="box notification is-info is-light">
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This configuration link points to the English docs (/docs/configuration/). For the zh locale it should point to the localized page (e.g. /zh/docs/configuration/, or build it using lang_code_url).

Suggested change
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/docs/configuration/">配置</a> 章节</div>
<span class="icon is-large"><i class="fas fa-2x fa-circle-arrow-right"></i></span><div class="my-auto ml-3 is-inline-block">详情请参考 <a href="/zh/docs/configuration/">配置</a> 章节</div>

Copilot uses AI. Check for mistakes.
"postcss-nested": "7.0.2",
"prismjs": "1.30.0",
"sass": "^1.60.0",
"sass": "^1.58.3",
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The PR description is about adding Chinese docs, but this change downgrades the sass devDependency. If this is intentional, please explain why and update the repo’s lockfile(s) accordingly (e.g., docs/package-lock.json still references sass: ^1.60.0, which will be out of sync with package.json). If unintentional, revert this dependency change.

Copilot uses AI. Check for mistakes.
"en-US": "Add a badge to your projects",
ru: "Добавьте значок к своим проектам",
fr: "Ajoutez un badge à vos projets",
zh: "在你项目中添加一个badge - ",
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The Chinese index_add_badge string has an extra trailing "-" which will render in the UI.

Suggested change
zh: "在你项目中添加一个badge - ",
zh: "在你项目中添加一个badge",

Copilot uses AI. Check for mistakes.

{% endraw %}

不推荐使用一下模式:
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

Typo: “不推荐使用一下模式” should be “不推荐使用以下模式”.

Suggested change
不推荐使用一下模式
不推荐使用以下模式

Copilot uses AI. Check for mistakes.
@Twisuki
Copy link
Author

Twisuki commented Feb 9, 2026

Oh sorry, its midnight here. I'll update it soon.

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.

3 participants