Skip to content

Commit 57f9c6f

Browse files
committed
sys prompt fix
1 parent 86a981b commit 57f9c6f

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616

1717
> *MyGPU: Lightweight GPU Management Utility: a compact `nvidia-smi` wrapper with an elegant web dashboard.*
18-
<!-- do not translate this badge section, keep it as it is -->
18+
<!-- do not translate the folloeing shields.io badge section, keep it as it is -->
1919
![License](https://img.shields.io/badge/license-MIT-blue.svg)
2020
![Python](https://img.shields.io/badge/python-3.10%2B-blue)
2121
![Version](https://img.shields.io/badge/version-1.2.3-blue)
@@ -65,7 +65,7 @@
6565

6666
</details>
6767

68-
### Why use this?
68+
### Why use this?!
6969

7070
- **Lightweight**: Minimal resource footprint.
7171
- **Flexible**: Runs as a CLI tool, or a full-featured Web Dashboard.

scripts/translate_eastern.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@
3131

3232
# Specialized Prompt for CJK/Eastern Languages
3333
prompt = f"""<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>
34-
You are a professional technical {target_lang_name} translator.
35-
Task: Translate the README content into {target_lang_name}.
34+
You are a professional technical {target_lang_name} translator.
35+
Translate the provided GitHub README into {target_lang_name}.
3636
37-
STRICT RULES:
38-
1. **Navigation Bar**: The first block `<div align="center">...</div>` is IMMUTABLE CODE. Copy it exactly. Do NOT translate the language names (e.g., keep "English", "Deutsch").
39-
2. **Logo**: The block `<div style="text-align:center...` is IMMUTABLE. Copy it exactly.
40-
3. **Badges**: Lines starting with `![` are IMMUTABLE CODE. Copy them character-for-character. Do NOT translate text inside `[...]` or `(...)`. Do NOT add spaces inside the URL parentheses (Critical for Hindi).
41-
4. **Formatting**: Keep all HTML tags, markdown links, and emojis exactly as is.
37+
CRITICAL RULES:
38+
1. **Navigation Bar**: The top HTML block (`<div align="center">...</div>`) containing language links MUST remain EXACTLY the same. Do NOT translate the filenames or language names inside it. Do not change anything in it.
39+
2. **Badges**: Do NOT translate the text inside badge links (e.g., `![License]`, `![Python]`). Keep the URLs exactly as is.
40+
3. **Logo**: Keep the logo HTML block (`<div style="text-align:center...`) exactly as is.
41+
4. **Formatting**: Preserve all emojis and HTML/Markdown tags exactly.
4242
5. **Terminology**: Keep English technical terms (GPU, CLI, VRAM, Docker, CUDA) in English.
4343
6. **Context**:
4444
- 'Enforcement' = Policy restriction (e.g., JA: 制限/強制).
4545
- 'Headless' = Server without GUI/display.
4646
- 'Agnostic' = Hardware Independence (JA: 非依存, ZH: 无关性).
47-
7. **Output**: ONLY the translated README. No code fences. No explanations.
47+
7. **Output**: ONLY the translated text. No explanations.
4848
<|END_OF_TURN_TOKEN|>
4949
<|START_OF_TURN_TOKEN|><|USER_TOKEN|>
5050
{text_to_translate}<|END_OF_TURN_TOKEN|>

scripts/translate_western.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
Task: Translate the README content into {target_lang_name}.
3737
3838
STRICT RULES:
39-
1. **Start**: The output MUST start with the Navigation Bar `<div align="center">...</div>`.
39+
1. **Start**: The output MUST start with the Navigation Bar as it is `<div align="center">...</div>`.
4040
2. **Navigation Bar**: This block is IMMUTABLE. Copy it exactly from the source. Do NOT translate "English", "Deutsch", etc.
41-
3. **Logo**: The block `<div style="text-align:center...` is IMMUTABLE. Copy it exactly.
41+
3. **Logo**: The block with logo and image is IMMUTABLE. Copy it exactly.
4242
4. **Badges**: Lines starting with `![` are IMMUTABLE CODE. Copy them character-for-character. Do NOT translate "License", "Python", "Version".
4343
4. **Structure**: The output MUST start with the Navigation Bar, followed by the Logo, then the Quote, then Badges.
4444
5. **Formatting**: Keep all HTML tags, markdown links, and emojis exactly as is.

0 commit comments

Comments
 (0)