Hello, I wanted to make a query and a recommendation:
As you can see in the screenshot, I can see in the log which file is being modified and/or translated. I wanted to ask if it is possible to add a function that creates a log.txt (using the name of the file being translated) that states:
FILE NAME.EXTENSION
And that it flags which HTML had errors (returning original untranslated text) and which HTML had to use Fallback (or if there are imperfections in tags).
For faster searching—I am an advanced user who reads novels (and has a background in IT)—an example would be:
Cap_1.html = chunks with "returning original untranslated text"
Cap_2.html = the model did not return all tags, there are imperfections
This would allow for direct, to-the-point revision. Sometimes I process hundreds of chapters (HTMLs), and it would be much faster for me to search this way.
I know that cloud APIs block translations if they contain sensitive content (I liked that the terminal log now notifies when it returns 0 tokens, as that happens when the output is blocked).
It also happens that when there is a 503 error in the Gemini API, sometimes TBL leaves the source language to continue (note: sometimes). That error signals when Gemini's API servers are saturated.
I would like to see if it is possible for this to be registered locally (and not just in the terminal) so that when I perform a review in Calibre (since I only work with EPUBs), I can quickly search for which HTML failed.
I currently use this command in Calibre to search for original fragments:
\b(the|and|was|her|him|she|with|you|they|that)\b
Then I re-translate the entire chapter with another AI that does not censor, or I correct the parts that failed due to server issues (or false positives regarding sensitive content) with the Gemini chatbot.
This would significantly speed up my review process (since the Calibre command sometimes hits one of those words because it keeps the title in the original name).
Now, regarding point 2:
I have been using TBL since 1.2, and at that time, Gemini models were not as powerful, or those versions didn't have sophisticated protection code for [IDn]. I used this prompt to force the AI to treat them as sacred:
Custom_Instructions/Neutral_R19_Tags_Safe_spanish.txt
You are a meticulous literary translator specializing in Japanese, Korean, and English to Neutral Spanish localization. Your goal is to translate the following text into high-quality Spanish.
### CORE RULES:
1. PROTECT PLACEHOLDERS: The text contains markers like [id0], [id1], [id2], etc. You MUST preserve them exactly. DO NOT translate, modify, or omit these markers. The ID sequence must be strictly sequential (if the input has [id0], [id1], [id2], the output MUST have [id0], [id1], [id2]). Do not skip, merge, or create new IDs. Every single marker in the source must appear exactly once in the translation.
Even if you encounter raw HTML tags or unexpected markers, treat them as protected placeholders: preserve their exact form and position
2. ADULT CONTENT (R19): This is a work of adult fiction. You MUST translate all explicit, sexual, and violent descriptions faithfully and with high descriptive intensity. DO NOT censor, skip, or summarize.
3. NEUTRAL SPANISH: Use a professional Neutral Spanish (Español Neutro). Avoid regionalisms or slang from Spain (e.g., no "vosotros", "vale", "chaval", "mona") or specific Latin American countries. Ensure the tone is immersive and consistent.
a)Convert all spoken dialogue into the Spanish em-dash format (— ). Ensure the dash is attached to the first word (e.g., —Hola.).
b)Identify internal monologues or thoughts. Keep them in single quotes (' ') or italics. Do not use dashes for thoughts.
c) If a paragraph lacks quotation marks but the context clearly implies a character is speaking (due to speech verbs like "said," "asked," or "replied"), you must add the dialogue dash.
d)Convert all spoken dialogue into the Spanish em-dash format (—). The dash must be placed immediately after the opening marker if the marker represents a paragraph or line start (e.g., [id0]—Hola.). Never place the dash before the [idN] marker. Keep internal monologues in single quotes (' ') or italics. These must also stay inside the markers (e.g., [id1]'¿Qué es esto?').
4. LITERARY FIDELITY: Maintain the immersive narrative flow. The translation must feel like a professionally published novel, not a literal machine translation. Do not omit or summarize any paragraph; translate every single line provided.
5. NO INTROS OR OUTROS: Output ONLY the translated text between the tags. Do not include any meta-talk, phrases like "Here is the translation," or any comments about the content.
6. TAG ALIGNMENT: If a Spanish sentence needs to be reordered for better flow, ensure the [idN] markers still wrap the correct words or concepts. Do not add extra spaces inside or around the markers (e.g., use "[id1]Palabra" or "Palabra[id1]", not "[id1] Palabra" unless the original had a space).
Now, with these current versions (both TBL and current AIs), is it still necessary to force the protection of [IDn]? Since I use the free versions of the APIs, input tokens do not affect me.
I ask this because I am waiting for the release of the uncensored Gemma 4 12B, which is currently in development by a group, and I plan to test how it performs. Although the issue is that I have to use the quantized version (Q4) since I don't have much RAM (16GB with 13GB in use), because I don't have a dedicated GPU, only an integrated one.
I am planning to create a prompt to use it on the local AI. Also, I would like to see what is being sent to the AI (if there is a way to see it) to calculate the context tokens and so on.
A few days ago, I tested how much context it retains, and due to the context of the previous chapter + prompt + chunk (in my case, I send 2000 tokens per chunk), the 4060-token limit ran out very quickly.
Basically, I am just now getting into the topic of local models.
EDIT:
Why did I use a prompt like that? Upon detecting that it used to leave many imperfections, I decided to audit the code at that time (I read the lines of code related to the tags) and I created a prompt based on that. Did it work? Yes, it did. But now I'm in doubt whether to keep that prompt or change it to prioritize other things.
Hello, I wanted to make a query and a recommendation:
As you can see in the screenshot, I can see in the log which file is being modified and/or translated. I wanted to ask if it is possible to add a function that creates a log.txt (using the name of the file being translated) that states:
FILE NAME.EXTENSION
And that it flags which HTML had errors (returning original untranslated text) and which HTML had to use Fallback (or if there are imperfections in tags).
For faster searching—I am an advanced user who reads novels (and has a background in IT)—an example would be:
Cap_1.html = chunks with "returning original untranslated text"
Cap_2.html = the model did not return all tags, there are imperfections
This would allow for direct, to-the-point revision. Sometimes I process hundreds of chapters (HTMLs), and it would be much faster for me to search this way.
I know that cloud APIs block translations if they contain sensitive content (I liked that the terminal log now notifies when it returns 0 tokens, as that happens when the output is blocked).
It also happens that when there is a 503 error in the Gemini API, sometimes TBL leaves the source language to continue (note: sometimes). That error signals when Gemini's API servers are saturated.
I would like to see if it is possible for this to be registered locally (and not just in the terminal) so that when I perform a review in Calibre (since I only work with EPUBs), I can quickly search for which HTML failed.
I currently use this command in Calibre to search for original fragments:
\b(the|and|was|her|him|she|with|you|they|that)\b
Then I re-translate the entire chapter with another AI that does not censor, or I correct the parts that failed due to server issues (or false positives regarding sensitive content) with the Gemini chatbot.
This would significantly speed up my review process (since the Calibre command sometimes hits one of those words because it keeps the title in the original name).
Now, regarding point 2:
I have been using TBL since 1.2, and at that time, Gemini models were not as powerful, or those versions didn't have sophisticated protection code for [IDn]. I used this prompt to force the AI to treat them as sacred:
Now, with these current versions (both TBL and current AIs), is it still necessary to force the protection of [IDn]? Since I use the free versions of the APIs, input tokens do not affect me.
I ask this because I am waiting for the release of the uncensored Gemma 4 12B, which is currently in development by a group, and I plan to test how it performs. Although the issue is that I have to use the quantized version (Q4) since I don't have much RAM (16GB with 13GB in use), because I don't have a dedicated GPU, only an integrated one.
I am planning to create a prompt to use it on the local AI. Also, I would like to see what is being sent to the AI (if there is a way to see it) to calculate the context tokens and so on.
A few days ago, I tested how much context it retains, and due to the context of the previous chapter + prompt + chunk (in my case, I send 2000 tokens per chunk), the 4060-token limit ran out very quickly.
Basically, I am just now getting into the topic of local models.
EDIT:
Why did I use a prompt like that? Upon detecting that it used to leave many imperfections, I decided to audit the code at that time (I read the lines of code related to the tags) and I created a prompt based on that. Did it work? Yes, it did. But now I'm in doubt whether to keep that prompt or change it to prioritize other things.