Skip to content

Commit f78935f

Browse files
Prompt improvements
1 parent 0e31164 commit f78935f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

AndroidResourceTranslator.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
from lxml import etree
1818

1919
# ------------------------------------------------------------------------------
20-
# Configuration Constants
20+
# Translation Prompt Constants
2121
# ------------------------------------------------------------------------------
22-
2322
TRANSLATION_GUIDELINES = """\
2423
Follow these guidelines carefully.
2524
@@ -40,12 +39,11 @@
4039
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.
4140
4241
**Examples (Portuguese of Portugal):**
43-
- "Day Limit" → ✅ "Limite diário" (❌ "Limite do dia")
44-
- "Network Connection" → ✅ "Ligação de rede" (❌ "Conexão de rede")
45-
- "Start Time" → ✅ "Hora de início" (❌ "Hora de começar")
4642
- "Message Sent" → ✅ "Mensagem enviada" (❌ "Mensagem foi enviada")
4743
- "Upload Speed" → ✅ "Velocidade de upload" (❌ "Velocidade de envio")
4844
45+
Always refer to standard, widely accepted terms for the target language's user interface.
46+
4947
**Dialect and Regional Vocabulary:**
5048
Unless otherwise specified, use always the vocabulary appropriate to the target dialect (e.g., **pt -> Português de Portugal**) and avoid terms from other variants.
5149
@@ -56,6 +54,7 @@
5654
Return ONLY the final translated text as a single plain line, preserving any required formatting from the source.
5755
"""
5856

57+
5958
PLURAL_GUIDELINES_ADDITION = """\
6059
For plural resources, follow these guidelines:
6160

0 commit comments

Comments
 (0)