Skip to content

Commit 08651f0

Browse files
Prompt improvements
1 parent d2b7d45 commit 08651f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

AndroidResourceTranslator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@
2727
This translation is for an Android application's UI. Use concise, clear language consistent with standard Android UI conventions. Do not alter the intended meaning of the text.
2828
2929
**Formatting & Structure:**
30-
- Preserve all placeholders exactly as they appear (e.g., %d, %s, %1$s).
30+
- Keep all placeholders (e.g., %d, %s, %1$s) exactly as in the source. If the target language requires reordering, ensure that the same placeholders appear and are correctly positioned according to the language's syntax.
3131
- Maintain the integrity of HTML, CDATA, or XML structures; translate only the textual content.
3232
- Preserve all whitespace, line breaks, and XML formatting exactly as in the source.
3333
- Escape apostrophes with a backslash (\\') as required by Android.
3434
3535
**System Terms:**
36-
Do not translate system state words (e.g., WARNING, FAILED, SUCCESS, PAUSED, RUNNING). They must remain in English and in uppercase.
36+
Do not translate system state words (e.g., WARNING, FAILED, SUCCESS) or any technical and branded terms. Always leave these in their original English, uppercase form.
3737
3838
**Terminology & Natural Expressions:**
39-
Use natural, context-appropriate phrasing and avoid literal translations that sound awkward or unnatural.
40-
When a technical term (e.g., "upload", "server") or a proper noun, feature name, or trademarked term is more natural in English, keep it in English.
39+
Translate in a natural, concise style that matches standard Android UI conventions.
40+
Avoid overly literal translations that may sound awkward. When a technical term or proper noun is more recognizable in English for that language, keep it in English.
4141
4242
**Examples (Portuguese of Portugal):**
4343
- "Day Limit" → ✅ "Limite diário" (❌ "Limite do dia")
@@ -76,7 +76,7 @@
7676
"""
7777

7878
TRANSLATE_FINAL_TEXT = """\
79-
Translate the following resource for an Android app provided after the dashed line to the following values-{target_language}/string.xml for the language: {target_language}
79+
Translate the following string resource provided after the dashed line to the values-{target_language}/string.xml file for the language: {target_language}
8080
----------
8181
"""
8282

0 commit comments

Comments
 (0)