Droog71 / chat_translator

A mod that uses LibreTranslate to translate chat messages in Minetest.
GNU Affero General Public License v3.0
6 stars 1 forks source link

Not working #3

Closed animetrom closed 1 year ago

animetrom commented 1 year ago

Hello! I installed via docker on my Windows 11 to start my server with it, but it didn't work. Does this mod only run on linux normally? Made the tests, but without success. Can you help me, please?

Droog71 commented 1 year ago

Hello! I installed via docker on my Windows 11 to start my server with it, but it didn't work. Does this mod only run on linux normally? Made the tests, but without success. Can you help me, please?

Is LibreTranslate running and available at http://localhost:5000/ ? Has the mod been added to your trusted mods list? Are you getting any errors?

You can search the output or log files for "Chat Translator:". All error messages are prefixed with this. https://github.com/Droog71/chat_translator/blob/7081c3bc04db24698512c852286864b008d1346e/init.lua#L219C33-L219C33

animetrom commented 1 year ago

It opens normally, however, it does not recognize the mod. https://i.imgur.com/WhSyHqV.png url http://localhost:5000/translateIs it normal to look like this when you only open it in the browser? - https://i.imgur.com/emLes8C.png

Droog71 commented 1 year ago

It opens normally, however, it does not recognize the mod. https://i.imgur.com/WhSyHqV.png url http://localhost:5000/translateIs it normal to look like this when you only open it in the browser? - https://i.imgur.com/emLes8C.png

Yes, this is all normal. https://libretranslate.com/translate -> looks the same. You have to pass parameters with the URL to get a response.

Has the mod been added to your trusted mods list? Are you getting any errors?

You can search the output or log files for "Chat Translator:". All error messages are prefixed with this. https://github.com/Droog71/chat_translator/blob/7081c3bc04db24698512c852286864b008d1346e/init.lua#L219C33-L219C33

animetrom commented 1 year ago

Strangely enough, everything is okay in my opinion. It's in the parameters of trusted mods. It only shows an error if I don't start libretranslate, in this case, connection failure errors asking to activate it. Do you know what I could be doing wrong? Note: Using Windows 11. Libretranslate installed via python (pip install libretranslate).

Droog71 commented 1 year ago

Strangely enough, everything is okay in my opinion. It's in the parameters of trusted mods. It only shows an error if I don't start libretranslate, in this case, connection failure errors asking to activate it. Do you know what I could be doing wrong? Note: Using Windows 11. Libretranslate installed via python (pip install libretranslate).

If LibreTranslate is running and there are no errors, everything should be working.

To test the mod, you will need to start your server with the mod enabled, then connect to the server using more than one client with differing languages selected in the settings menu. The language you type with is not detected by the mod. For instance, if you have English selected in the settings menu and type something in Spanish, it will not be translated.

Screenshot at 2023-08-27 17-19-58

animetrom commented 1 year ago

I did the tests. I have two clients, one was in Portuguese and the other in English. Even writing on both appeared unchanged.

Droog71 commented 1 year ago

I did the tests. I have two clients, one was in Portuguese and the other in English. Even writing on both appeared unchanged.

I tested everything in the latest and older versions of Minetest and cannot reproduce the problem.

I am using Linux only, I have never tried any of this with Windows.

I will see if I can get a Minetest server running in a Windows VM at some point and see if Windows could possibly be the cause.

If you want to try debugging yourself, you could add some print statements to init.lua to see what is going on.

There should be error messages if anything failed, so it seems like everything is successfull but the text is not translated.

Have you tried translating something in the web browser at localhost:5000 ?

animetrom commented 1 year ago

Translate something on localhost:5000, I tried yes. It worked normally.

Droog71 commented 1 year ago

Translate something on localhost:5000, I tried yes. It worked normally.

I tested the server and client on Windows 10 and I cannot reproduce this problem. I had the server running on Windows and connected to it with clients running on both Windows and Linux. Everything worked as intended.

Droog71 commented 1 year ago

Closing this as I cannot reproduce the problem.