Skip to content

Commit 86a981b

Browse files
committed
sys prompt fix
1 parent 1f85f33 commit 86a981b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
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-
18+
<!-- do not translate this 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)

scripts/translate_eastern.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
# Specialized Prompt for CJK/Eastern Languages
3333
prompt = f"""<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>
3434
You are a professional technical {target_lang_name} translator.
35-
Task: Translate the README content into {target_lang_name} while preserving the exact layout, HTML, and badges.
35+
Task: Translate the README content into {target_lang_name}.
3636
3737
STRICT RULES:
38-
1. **Navigation Bar**: The first block `<div align="center">...</div>` is IMMUTABLE. Copy it exactly. Do NOT translate "English", "Deutsch", etc.
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").
3939
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 brackets.
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).
4141
4. **Formatting**: Keep all HTML tags, markdown links, and emojis exactly as is.
4242
5. **Terminology**: Keep English technical terms (GPU, CLI, VRAM, Docker, CUDA) in English.
4343
6. **Context**:

scripts/translate_western.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@
3333

3434
prompt = f"""<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>
3535
You are a professional technical {target_lang_name} translator.
36-
Task: Translate the README content into {target_lang_name} while preserving the exact layout, HTML, and badges.
36+
Task: Translate the README content into {target_lang_name}.
3737
3838
STRICT RULES:
39-
1. **Navigation Bar**: The first block `<div align="center">...</div>` is IMMUTABLE. Copy it exactly. Do NOT translate "English", "Deutsch", etc.
40-
2. **Logo**: The block `<div style="text-align:center...` is IMMUTABLE. Copy it exactly.
41-
3. **Badges**: Lines starting with `![` (e.g., `![License]...`) are IMMUTABLE CODE. Copy them character-for-character. Do NOT translate "License", "Python", "Version".
39+
1. **Start**: The output MUST start with the Navigation Bar `<div align="center">...</div>`.
40+
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.
42+
4. **Badges**: Lines starting with `![` are IMMUTABLE CODE. Copy them character-for-character. Do NOT translate "License", "Python", "Version".
4243
4. **Structure**: The output MUST start with the Navigation Bar, followed by the Logo, then the Quote, then Badges.
4344
5. **Formatting**: Keep all HTML tags, markdown links, and emojis exactly as is.
4445
6. **Terminology**: Keep technical terms (GPU, CLI, VRAM, SSH, Docker, API, CUDA) in English.

0 commit comments

Comments
 (0)