Skip to content

Commit 14467dc

Browse files
committed
a-t aya-8b
1 parent efcfae2 commit 14467dc

File tree

4 files changed

+12
-160
lines changed

4 files changed

+12
-160
lines changed

.github/workflows/translate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: AI Readme Translator (Multilingual)
1+
name: Readme Translator (Multilingual)
22

33
on:
44
workflow_dispatch:
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
lang: [de, fr, es, ja, zh] # German, French, Spanish, Japanese, Chinese
18+
lang: [de, fr, es, ja, zh, pt, ko, hi] # German, French, Spanish, Japanese, Chinese, Portuguese, Korean, Hindi
1919
steps:
2020
- name: Checkout Code
2121
uses: actions/checkout@v4

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
<a href="locales/README.fr.md">🇫🇷 Français</a> |
55
<a href="locales/README.es.md">🇪🇸 Español</a> |
66
<a href="locales/README.ja.md">🇯🇵 日本語</a> |
7-
<a href="locales/README.zh.md">🇨🇳 中文</a>
7+
<a href="locales/README.zh.md">🇨🇳 中文</a> |
8+
<a href="locales/README.pt.md">🇵🇹 Português</a> |
9+
<a href="locales/README.ko.md">🇰🇷 한국어</a> |
10+
<a href="locales/README.hi.md">🇮🇳 Hindi</a>
811
</div>
912

1013
<div style="text-align:center; margin:18px 0;">

locales/translated_readme.md

Lines changed: 0 additions & 152 deletions
This file was deleted.

scripts/translate.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
"fr": "French",
1010
"es": "Spanish",
1111
"ja": "Japanese",
12-
"zh": "Chinese (Simplified)",
13-
"ru": "Russian"
12+
"zh": "Simplified Chinese",
13+
"ru": "Russian",
14+
"pt": "Portuguese",
15+
"ko": "Korean",
16+
"hi": "Hindi"
1417
}
1518

1619
parser = argparse.ArgumentParser()
@@ -41,6 +44,7 @@
4144
Perform a strict technical translation of the provided README into professional developer-level {target_lang_name}.
4245
Maintain a formal tone and preserve technical terminology (e.g., GPU, CLI, vCPU).
4346
Keep all Markdown/HTML syntax exactly as is.
47+
IMPORTANT: Do not strip or modify the top-level HTML tags (like <div> or <img>) at the beginning of the file.
4448
ONLY output the translated {target_lang_name} text. No talk, just translation.
4549
Do not add new information, do not summarize, and do not include any conversational filler or "thinking" process.<|END_OF_TURN_TOKEN|>
4650
<|START_OF_TURN_TOKEN|><|USER_TOKEN|>
@@ -58,9 +62,6 @@
5862

5963
translated_content = response['choices'][0]['text'].strip()
6064

61-
# # 0. SAFETY: Remove HTML comments if the LLM wrapped the output in them
62-
# translated_content = re.sub(r'^<!--\s*|(?:\s*)?-->$', '', translated_content).strip()
63-
6465
# 1. CLEANUP: Remove markdown code fences if the LLM included them
6566
if translated_content.startswith("```"):
6667
lines = translated_content.splitlines()

0 commit comments

Comments
 (0)