aboutsummaryrefslogtreecommitdiff
path: root/docs/dev-docs/pages/abouts
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev-docs/pages/abouts')
-rw-r--r--docs/dev-docs/pages/abouts/ai-translation-rule.md44
-rw-r--r--docs/dev-docs/pages/abouts/code-verify-system.md28
2 files changed, 36 insertions, 36 deletions
diff --git a/docs/dev-docs/pages/abouts/ai-translation-rule.md b/docs/dev-docs/pages/abouts/ai-translation-rule.md
index e880964..b1f93f6 100644
--- a/docs/dev-docs/pages/abouts/ai-translation-rule.md
+++ b/docs/dev-docs/pages/abouts/ai-translation-rule.md
@@ -59,58 +59,58 @@ This is to keep git diffs friendly _(only modify parts that have truly changed)_
```markdown
# Translation Style Guide
-
+
## 1. Tone & Voice
-
+
### Preserve original tone
-
+
Maintain the author's attitude, formality, and emotional register exactly as in the source.
-
+
### Synonymous substitution
-
+
Use words with close or equivalent meaning where direct translation is awkward or unnatural.
-
+
## 2. Vocabulary & Abbreviation
-
+
### Abbreviation
-
+
Apply standard English abbreviations (e.g., _info_ for information, _dept_ for department)
to avoid overlong words,
but only when clarity is not sacrificed.
-
+
### Concise expression
-
+
Prefer shorter, more common alternatives (e.g., _use_ over _utilize_, _help_ over _facilitate_)
unless the original tone demands formality.
-
+
## 3. Structural Rules
-
+
### Paragraph integrity
-
+
Keep the original paragraph breaks and line spacing.
-
+
### Tag preservation
-
+
Any inline Markdown formatting (bold, italic, code, links, lists) must be replicated exactly in translation.
-
+
### Example
-
+
- Before: “请保持专业语气,但避免使用过长的学术词汇。”
- After: “Keep a prof. tone, but avoid long academic words.”
-
+
### Minimal diff
-
+
When translating or syncing English content against a known Chinese original,
if the Chinese original's meaning is extremely close to the current English meaning,
do not modify the English text.
This is to keep git diffs friendly _(only modify parts that have truly changed)_.
-
+
## 4. Exceptions
-
+
- If a term has no common abbreviation, use the full word.
- If preserving tone requires a longer phrase, prioritize tone over brevity.
```
-
+
<p align="center" style="font-size: 0.85em; color: gray;">
Written by @Weicao-CatilGrass
</p>
diff --git a/docs/dev-docs/pages/abouts/code-verify-system.md b/docs/dev-docs/pages/abouts/code-verify-system.md
index 59b98cb..61b66e8 100644
--- a/docs/dev-docs/pages/abouts/code-verify-system.md
+++ b/docs/dev-docs/pages/abouts/code-verify-system.md
@@ -14,11 +14,11 @@ You can also test a single file via command-line arg:
```sh
./run-tools.sh test-all-markdown-code docs/pages/1-getting-started.md
```
-
+
```powershell
.\run-tools.ps1 test-all-markdown-code docs/pages/1-getting-started.md
```
-
+
## Default Rules
Every verified ` ```rust ` code block gets the following injected automatically at compile time — no need to write them explicitly in the block:
@@ -82,7 +82,7 @@ Each block (or each dedup-hash group) gets its own Cargo project:
└── src/
└── main.rs
```
-
+
### 3. Build Verification
Compiled with `cargo build --release`, stderr inherited to the terminal for real-time progress.
@@ -118,7 +118,7 @@ Marks the block **not to be compiled**. Use for illustrative snippets that can't
// This block is illustrative only, won't be compiled
fn placeholder() {}
```
-
+
### `// BUILD TIME`
Marks the block as a `build.rs` script instead of `src/main.rs`. The block code is wrapped in `fn main() { }` and written to `build.rs`. A stub `fn main() {}` is generated for `src/main.rs`.
@@ -128,7 +128,7 @@ Marks the block as a `build.rs` script instead of `src/main.rs`. The block code
// Features: ["builds", "pathf"]
analyze_and_build_type_mapping().unwrap();
```
-
+
### `// Features: [...]`
Declares the mingling crate features needed by this block, as a JSON string array. These features are written into `Cargo.toml`'s `[dependencies]`.
@@ -136,7 +136,7 @@ Declares the mingling crate features needed by this block, as a JSON string arra
```rust
// Features: ["full", "serde"]
```
-
+
### `// Dependencies:`
Declares external crate deps needed by the block. After `// Dependencies:`, each dep goes on one line: `// crate_name = "version"`.
@@ -146,7 +146,7 @@ Declares external crate deps needed by the block. After `// Dependencies:`, each
// serde = "1"
// clap = "4"
```
-
+
> [!TIP]
>
> **Special handling**:
@@ -172,7 +172,7 @@ This is useful when you want to show only the core logic while keeping the block
@@@// This line is hidden but still compiled
@@@fn setup() { /* hidden boilerplate */ }
```
-
+
### How it works
| Stage | Handling |
@@ -216,23 +216,23 @@ Use `@@@` for:
// Example code ...
```
````
-
+
The above block compiles equivalently to:
```rust
#![allow(dead_code)]
#![allow(unused)]
-
+
#[allow(unused_imports)]
use mingling::prelude::*;
-
+
// Example code ...
-
+
fn main() {}
-
+
mingling::macros::gen_program!();
```
-
+
`Cargo.toml` will contain:
```toml