https://discord.gg/botpress logo
TranslatorAgent do not translate a word
# 🤝help
c
Is it possible to prevent TranslatorAgent from translating a word in the text? Is there any way to mark or instruct it? E.g. I write about a product in the user's language, but I want the English name to be behind it, because in the webshop, it will only be found under that name: e.g. Centering Blend (Align Oil) Is there a way to make it not translate the one in the end?
p
The translator agent at the moment translates the entire text and doesn't take instructions as input. You're welcome to make a feature request to be able to customize your translation.
n
Make an execute code card before the translator agent to replace that word with a non-sensical hash that the translator agent will assume is a Proper noun and not have a translation for. Then after the translator agent does the job, go ahead and run another execute code card to replace the hash with your original word

https://tenor.com/dq7JXZwiiOV.gif▾

b
insane workaround but i love it lol
n
@bumpy-butcher-41910 bro i am so deep
in a rabbit hole of automations
Here's another good one. Make a table for all the words you want to translate and the hash / fake word you will use. Card 1: Put an autonomous node before the translator agent and give it the instructions to "replace every word in the message found in column A with the word found in column B" and give it a table read card Card 2: translator agent Card 3: copy card 1 and replace B with A and A with B
less code and I am confident the autonomous node will bat 5 or 6 nines accuracy on that
someone at botpress hire me
l
@numerous-knife-25438 the most unique job application I have seen 🫡
n
@limited-pencil-78283 I'm building automations for my customers - which is why i'm so deep in the automations. I'm not convinced Botpress understands haha
I don't think there's a dollar amount in salary that could pull me away from the insane POC's i've been rapid prototyping, tested out BP, then starting to build out all the patterns I need to move clients onto a BP supported service. Ermek / Rodrigo are gonna help me take this to the moon
2 Views