Tool Mtool offline sugoi translation

kontol_air

Newbie
Jun 3, 2017
30
0
Download the latest version on github again just in case, and you have to do extract again, you should be getting 85 files extracted files, then you are supposed to use sugoi to translate all 85 files, which will add a file name output of each one, only then can you do convert.
I downloaded the last version on Github, and I still have a error when I do extract like in the picture, only got 1 empty extracted file in the extract folder, and when I trying to do convert the error about str_contains still appeared.
 

james448

Newbie
Aug 13, 2017
65
259
I downloaded the last version on Github, and I still have a error when I do extract like in the picture, only got 1 empty extracted file in the extract folder, and when I trying to do convert the error about str_contains still appeared.
It work on my end, so i am going to list all possible fix that may be related, uninstall xampp and make sure to install the latest php release, like 8.2.12 / PHP 8.2.12, if that still doesn't work, for windows go search for region, at the end additional date,time & regional settings then go click on region again, then to administrative and make sure you system locale is to English united state.
 

kontol_air

Newbie
Jun 3, 2017
30
0
It work on my end, so i am going to list all possible fix that may be related, uninstall xampp and make sure to install the latest php release, like 8.2.12 / PHP 8.2.12, if that still doesn't work, for windows go search for region, at the end additional date,time & regional settings then go click on region again, then to administrative and make sure you system locale is to English united state.
it's works James, I reinstall xampp and now I'm using PHP 8, maybe the problem because my PHP server running on PHP 5.
 

Hallokun

Newbie
Jan 1, 2019
65
76
Send me your whole json_line folder zipped, and I check what wrong.
Here you go. Already reinstalled xammp and apache several times. Also a few months ago everything was working, now I decided to re-download to try to translate with local llm but it doesn't work that way or even with sugoi
 

james448

Newbie
Aug 13, 2017
65
259
Here you go. Already reinstalled xammp and apache several times. Also a few months ago everything was working, now I decided to re-download to try to translate with local llm but it doesn't work that way or even with sugoi
I checked, just so you know your ManualTransFile is kind of troublesome, you have line like "./data/fgimage/chara/7/一日目成功9.png" which should not be translated at all at it is similar to code for example, there are other line <select>...etc that has to be exactly the same as they are literary code, I got a way for the script to work but i don't know what kind of end of result it will give, you are free to try.

Change these line: Extract line 33:

$data = json_decode($json);

to

$data = json_decode($json, true);

In convert at line 4:

$data = json_decode($json);

to

$data = json_decode($json, true);
 

Hallokun

Newbie
Jan 1, 2019
65
76
I checked, just so you know your ManualTransFile is kind of troublesome, you have line like "./data/fgimage/chara/7/一日目成功9.png" which should not be translated at all at it is similar to code for example, there are other line <select>...etc that has to be exactly the same as they are literary code, I got a way for the script to work but i don't know what kind of end of result it will give, you are free to try.

Change these line: Extract line 33:

$data = json_decode($json);

to

$data = json_decode($json, true);

In convert at line 4:

$data = json_decode($json);

to

$data = json_decode($json, true);
Thanks, I should have tried it with another game right away, I'm dumb. I'm trying to make a translation with deepseek, is there any way to ignore the <thinking> tag?
 
Last edited:

james448

Newbie
Aug 13, 2017
65
259
Thanks, I should have tried it with another game right away, I'm dumb. I'm trying to make a translation with deepseek, is there any way to ignore the <thinking> tag?
I don't know what you are using precisely, if you are using open router, you can example blacklist some provider like targon, some provider have the thinking tag and some other don't give it. Maybe there a way to ask on the api for no thinking but I personally don't know. Otherwise, you are going to have to learn regex and have it yourself remove the thinking as part of the response.
 

Hallokun

Newbie
Jan 1, 2019
65
76
I don't know what you are using precisely, if you are using open router, you can example blacklist some provider like targon, some provider have the thinking tag and some other don't give it. Maybe there a way to ask on the api for no thinking but I personally don't know. Otherwise, you are going to have to learn regex and have it yourself remove the thinking as part of the response.
No, i mean just add a setting that will erase everything between <think> </think> in output file. Here is an example of my file with problem.
 

james448

Newbie
Aug 13, 2017
65
259
No, i mean just add a setting that will erase everything between <think> </think> in output file. Here is an example of my file with problem.
I can't test right now and this is only an issue if you use deepseek, anyway if you want here

add after the if end in translate.php at line 116 add these:


$content = preg_replace('/(?<=<think>).*?(?=</think>)/', "", $content);
$content = str_replace("<think>", "", $content);
$content = str_replace("</think>", "", $content);
 
Last edited: