-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hello!
I am trying to use this tool to help me translate some guides in batch, I have some instructions that I wanted the translator to follow, so I created a pyproject.toml file with rules like:
[tool.gpt-po-translator]
default_context = """
Rules:
Preserve all formatting exactly: \n, spacing, punctuation, quotes, variables {}, code blocks, AsciiDoc syntax, placeholders, href, xref attributes, and any HTML entity as in the original document.
Do NOT translate parameter names, variable names, annotations, method names, or code-related identifiers (for example: query parameters, field names, function names).
Links rule:
- If the source has link:https://...[], keep it identical.
- If the source has a bare URL or text without link:, write the translation using correct AsciiDoc format: link:URL[TEXT].
Maintain URLs and link structures exactly.
"""
However, after translating I am finding the HTML entities are transformed and also the xref attributes are removed and replaced with other characters, here one example:
I am using a command like this to perform the translation, using my Anthropic key:
gpt-po-translator --folder /home/davidstevenrojas/gpt-po-translator --fix-fuzzy --no-ai-comment -v --bulk --bulksize 50
Is the default context a proper place for these rules?
Is there a way to control this output in the translation?
It would be great to know if I am off base with attempting to enforce such rules, they have worked great when applying them manually on small pieces of content from po files in an agentic terminal, I wanted to achieve a similar behavior in batch using gpt-po.
Thanks for any insight you can provide.