XUnity.AutoTranslator icon indicating copy to clipboard operation
XUnity.AutoTranslator copied to clipboard

Why isn't it translating?

Open ranislel opened this issue 1 year ago • 6 comments
trafficstars

What can I do to translate? All sentences that begin with this color are not translated imagem_2023-11-25_205427984

ranislel avatar Nov 25 '23 23:11 ranislel

image I managed to solve it, but it remained like this

ranislel avatar Nov 26 '23 21:11 ranislel

I have a node js application based on google translation services Since I had similar problems with html tags, I wrote software that, using a special algorithm, removes tags during translation and after the translation it returns to its place, this option works for me this software also caches the translation pi when you request similar translations again, the translation will be loaded from the cache If you are interested, I can share some software on node js yes you will need to install node js to run the software

Atamg1994 avatar Nov 27 '23 09:11 Atamg1994

I have a node js application based on google translation services Since I had similar problems with html tags, I wrote software that, using a special algorithm, removes tags during translation and after the translation it returns to its place, this option works for me this software also caches the translation pi when you request similar translations again, the translation will be loaded from the cache If you are interested, I can share some software on node js yes you will need to install node js to run the software

I would like, pls. Please send me

ranislel avatar Nov 27 '23 11:11 ranislel

I can't do it, I'm very new to the subject. If you can help me I would appreciate it

ranislel avatar Nov 27 '23 13:11 ranislel

Same issue here, the it stopped translating the potion of UI after translated some msgs with html elements , something like this

some not colored msg ,<color\=#ff7070> some colored msg</color>

I checked the translation cache of the game (_AutoGeneratedTranslations.txt), found that text after the 'html elements' are not showed in there(might imply that AutoTranslatorhad problem reading out (and translate) the msgs after encounter a html element), and the translation on other UI is still fine. I tried Atamg1994 's nodejs-GoogleTranslator-server, for other part of the game , it still worked as using google translator , but still not translating after translated msg with html elements

But I do found something interesting when I was checking the input of nodejs-GoogleTranslator-server: It seems that ,after translated a msg with html element, AutoTranslator stopped parsing the UI sended the msg and not sended the text to translator Endpoint (I don't know how AutoTranslator works , can anyone explain how does this part of AutoTranslator work? )

I modified the server.js of nodejs-GoogleTranslator-server,console log the texts to be translated ,to check if Autotranslater had read out the game content. some thing like this

// XUnity.AutoTranslator api for custom CustomTranslateBanch.dll
app.all('/translate_batch_app', (req, res) => {
    const from = req?.query?.from || req?.body?.from || 'auto';
    const to = req?.query?.to || req?.body?.to || 'en';
    let texts = req?.query?.text || req?.body?.text || '';
    if (!texts) {
        console.log([from,to,texts])
        res.status(400).send('Bad Request');
        return;
    }
    const banch_poc = new banch_parses(utils.build_translate_array_reqest(texts), to, Chache);
  
/* the code I added ->  */ console.log(texts)

a9615161 avatar Nov 29 '23 13:11 a9615161

and I was just about to write instructions... how to install... So my application does not solve the problem? then please tell me what kind of game this is, give me a download link, if there is one, when I have time, I’ll see what I can do

Atamg1994 avatar Nov 29 '23 17:11 Atamg1994