⚓ Bada Google Translator:
BadaGoogleTranslator translates text for use in an AI art workflow, such as turning a prompt written in one language into text you can pass to another node. It uses Google translation through a shared request service that tries multiple request strategies if an attempt fails. It can also keep text inside supported quotation marks unchanged, which is useful when a prompt contains a name or phrase you do not want translated. The node uses Python’s built-in libraries rather than requiring an additional Python package. If a translation request ultimately fails, it returns the original text so your workflow can continue, though you should check the result before relying on it as a translation.
⚓ Bada Google Translator Input Parameters:
text
The text you want to translate. This is a multiline STRING field, so you can enter a short phrase or a longer prompt; its default is an empty string. No editable minimum or maximum is specified in the interface. The implementation does enforce a maximum length through TRANSLATION_MAX_CHARS, but its numeric value is not provided in the supplied source: text above that limit is returned unchanged. Text above 5,000 characters also produces a warning that translation may take longer or be rejected. Empty text, or text containing only spaces, produces an empty result.
from_lang
The language the node should translate from. The available options are ko (Korean), auto (automatic detection), en (English), ja (Japanese), and zh-CN (Simplified Chinese); the default is ko. Choose the known language of your prompt when possible, or choose auto when you are unsure. If you select the same explicit source and destination language, the node returns the input unchanged without making a translation request. Minimum and maximum values do not apply to this option list.
to_lang
The language you want the result to use. The available options are en (English), ko (Korean), ja (Japanese), and zh-CN (Simplified Chinese); the default is en. For example, select ja when you need a Japanese version of a prompt. Selecting the same language as an explicit from_lang causes the node to return the original text. Minimum and maximum values do not apply to this option list.
preserve_quotes
Controls whether the node protects text enclosed in straight double quotes ("...") or curly double quotes (“...”) from translation. This BOOLEAN option defaults to True; its available values are True and False. With True, the node temporarily replaces each supported quoted passage, translates the remaining text, then restores the quoted passage. Use False when quoted words should be translated along with the rest of the prompt. This protection does not cover single quotes or other quotation-mark styles.
⚓ Bada Google Translator Output Parameters:
text
The node’s only output is a STRING containing the translated text when the request succeeds. If quote preservation is enabled, supported quoted passages are restored to their original wording in that result. The node also decodes HTML entities returned in translated text, such as &. An empty or whitespace-only input produces an empty string; matching explicit source and destination languages, over-limit text, or a failed translation request produce the original input instead. Because unchanged text can indicate several different outcomes, check the node’s warning or error log if you expected a translation but did not get one.
⚓ Bada Google Translator Usage Tips:
- Choose
from_langto match your prompt andto_langto match the language needed by the next node. Keep the defaults for Korean-to-English translation, or chooseautoif you do not know the source language. - Leave
preserve_quotesenabled when a prompt contains a quoted character name, title, or exact phrase that must remain unchanged. Use straight or curly double quotes around that passage; turn the option off when you want the passage translated too. - Keep long prompts focused. Above 5,000 characters, the node warns that translation may take longer or be rejected; above its configured maximum, it returns the text unchanged.
- Inspect the output before sending it to an image-generation node, especially after a network problem. On request failure, the original prompt is returned rather than a translated version.
⚓ Bada Google Translator Common Errors and Solutions:
[ComfyUI-Bada-Utils] Text too long (... chars, max ...). Returning input unchanged.
- Explanation: The input exceeds the implementation’s
TRANSLATION_MAX_CHARSlimit. The supplied source does not show that limit’s numeric value. The node skips the request and returns your text unchanged. - Solution: Shorten the prompt or translate it in smaller sections. Check the warning for the configured maximum and your input’s character count.
[ComfyUI-Bada-Utils] Text exceeds 5,000 characters. Translation may take longer or Google may reject it.
- Explanation: This is a warning, not an automatic failure. The node still attempts the request if the text is within its configured maximum.
- Solution: Remove unnecessary text or split a long prompt into shorter sections if translation is slow or unsuccessful.
[ComfyUI-Bada-Utils] Google Translate request failed: Too many translation requests. Please try again in a moment.
- Explanation: The shared translation service did not accept another request at that moment. The node logs the error and returns your original text.
- Solution: Wait briefly before retrying, and avoid launching many translations at once.
[ComfyUI-Bada-Utils] Google Translate request failed: Translation exceeded the 20-second overall timeout
- Explanation: The request did not finish within the timeout enforced by the node. It returns your original text.
- Solution: Retry with a shorter passage. If the problem persists, check your connection and try again later.
[ComfyUI-Bada-Utils] Google Translate request failed: <error details>
- Explanation: This is the node’s general error message for a translation failure. The details vary with the underlying problem; the node logs the error and returns the original text.
- Solution: Read the details in the log, confirm your connection is working, and retry with a shorter passage. If repeated attempts fail, the external translation service may be temporarily unavailable.
Output is unchanged with no error message
- Explanation: This can be expected when the text is empty, when
from_langandto_langare the same explicit language, or when the source wording needs no visible change. An over-limit input also returns unchanged text, but produces a warning. - Solution: Check the language selections, confirm the input contains text, and look for a length warning. If you chose
auto, review the result to determine whether it meets your needs.
