CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Tool RenPy Translation tool

5.00 star(s) 4 Votes

v01d_08

Member
Modder
Jan 2, 2018
232
307
New version 0.06
1. Major update in application interface. Added Metro style, now main window looks more presentable.
2. Finally added support of Google Translation API, with a Neural Machine Translation flag, so the translation will be performed using a new technology of machine lerning, they say it is much better then the old 'direct' one.

I left the 0.05 version in the first post, in case something does not work, you can still use the old version of the tool.
As always, I'm waiting for your feedback and bug reports, if any. Since this tool is free and will always remain so, your comments and reviews are the best price to pay for my work.
 
Last edited:

v01d_08

Member
Modder
Jan 2, 2018
232
307
DeepL is not free, and I dont have an account there. Maybe in future, if someone provide me an API account for testing. But currently I don't have free time to do it.
 

makunbax

Member
Jun 29, 2019
120
260
Hi, I'm trying to translate this game into Spanish, (with google api) and I get this error, Thank you for such a great tool, and for all your effort.

350407
You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:
  • Like
Reactions: v01d_08

v01d_08

Member
Modder
Jan 2, 2018
232
307
Hello, makunbax, thanks for a bug report. I've tried to translate Mifl City and got the same error. Looks like it occurs in Google library when I try to translate a very large block of text.
First thing I found is Google have a limitation of 30k chars for one request. So I implemented multithreaded solution in my tool, like with Yandex.
The second thing is that Google API have a limit of 100k chars per every 100 seconds. Fortunately it is possible to update this limit up to 10 millions. But now I need to wait full 24 hours to test it, because limits are updated only once per day.
So if everything goes smooth, I will upload a fix in 2 days.
 
Last edited:
  • Like
Reactions: makunbax

makunbax

Member
Jun 29, 2019
120
260
Hello, makunbax, thanks for a bug report. I've tried to translate Mifl City and got the same error. Looks like it occurs in Google library when I try to translate a very large block of text.
First thing I found is Google have a limitation of 30k chars for one request. So I implemented multithreaded solution in my tool, like with Yandex.
The second thing is that Google API have a limit of 100k chars per every 100 seconds. Fortunately it is possible to update this limit up to 10 millions. But now I need to wait full 24 hours to test it, because limits are updated only once per day.
So if everything goes smooth, I will upload a fix in 2 days.
Thank you for your quick response, I will wait for the solution, I translated some games using Yandex, when I finish translating some things manually, I will publish them thanking you on behalf of the Spanish and Hispanic community.
 
  • Like
Reactions: v01d_08

v01d_08

Member
Modder
Jan 2, 2018
232
307
Well, what can I say? The limits in the Google Cloud Console still do not work, although the numbers have changed two days ago. I tried to find a solution on the Internet, and came across dozens of messages from people experiencing the same problem. And some people have paid a subscription, but the limits (number of requests per 100 seconds) still not working for them.

I wrote a letter to the support team, but I received an automatic answer that I am not eligible for free support.

Whether you believe in coincidence or not, later tooday Google sent me an email saying that on July 29th they increase the default limit from 100k to 1M characters for all users:
Hello Google Cloud Translation Customer,
We’re writing to let you know that on July 29, 2019, we are increasing the default content quota limit that applies to per user usage on the Translation API. The content quota limit ‘per 100 seconds per project per user’ will be increased from 100,000 characters to 1,000,000 characters.
Looks like these idiots, instead of solving the problem, just bypassed it. Well, just in time, if they do, I'll just rewrite the tool so that it will translate 1M characters and then wait 100 seconds for the next batch.

Soon I will post a fixed version with the limit of 100k, and on July 29th if they really change the limit, I will update it in this tool as well.
 
  • Like
Reactions: makunbax

wasya2009

Newbie
Dec 13, 2018
78
35
Hi, v01d_08
First: Good instrument, and it work. Big Thanks.
It was a barrel of honey, and now a fly in the ointment :) (russian saying)
View 0.05 in my opinion is familiar to me, but, as with the markers* ... color and taste (another russian joke saying)
Well, I do not like(0.06), faceless, flat, square W8-W10 "Metro" Style of programs, but it's taste. XP style - forever, W7 - may be like... ;)
I choose intuitive working good or rather excellent tool and the cover from his look in the last turn. IMHO

You don't have permission to view the spoiler content. Log in or register now.


Once again, thank you for the tool, and for using it not alone, but shared it with everyone.
And whether there is where in the public access source code. I just some started studying recently .NET and I think if I have the patience to write something like this, or if I do not find a ready-made suitable tool for my tasks. I will use what have.

You don't have permission to view the spoiler content. Log in or register now.
 
  • Like
Reactions: melquisedeque

v01d_08

Member
Modder
Jan 2, 2018
232
307
Hello, wasya2009, thanks a lot for your comments. I appreciate your interest in this tool. Let me respond to your comments.

The program is written in C#; VB or C++ ?
The program is written in C#

Line-by-line file update

This tool does not use the file update line by line. When translating, all dialogs are stored in memory, and only at the end of the translation, regardless of errors, the contents will be written to the file.
As far as the dialog export process is concerned, the necessary files are overwritten as the dialogs are added. I agree that this is not the fastest option, I had the idea of changing it.
But what you wrote about constant overwriting... dude, you don't even have to think about it.

No progress bar

The program window contains statistics that shows the current number of translated dialogs in real time. But if you meant the progress in exporting the dialogs, thank you for the remark, I will add it to the TODO list.

The program does not load the processor completely

The program does not load the entire CPU because several threads are created during translation, and they make network queries. And as long as the web server responds, the processor has nothing to load.
When exporting dialogs the same thing - while your hard drive is writing, the processor is resting.

Parsing files in a folder and continuing

If the program has failed for some reason, as mentioned above, nothing has been written to the file because the dialogs are stored in memory during translation.

Thank you again for your constructive comment.
 
  • Like
Reactions: melquisedeque

v01d_08

Member
Modder
Jan 2, 2018
232
307
Version 0.06 update

Hi, everybody, Google has increased the default limits to 1 million, but still they work very unstable. Don't ask me why, even though the limit is 1 million characters every 100 seconds, their server periodically responds with a error as soon as you exceed the old limit of 100k characters. But today I managed to translate 1 million in a row several times.

I have updated the utility and added these limits to it, now you can set a limit in the program window (by default 1 million), and when it reaches it, the program will wait 110 seconds (for reliability I added another 10 seconds, LOL), after which it will continue to translate.
If Google will send errors during translation, the threads will be interrupted, but the program will save everything it already managed to translate. Pay attention to the fields "Total dialogues" and "Dialogues translated". Just try to press the translation button after a while, perhaps Google will allow you to use its service later.
I also updated the instructions for Google Translate in the file Translate.API.pdf, do not forget to check it out.
 

makunbax

Member
Jun 29, 2019
120
260
Version 0.06 update

Hi, everybody, Google has increased the default limits to 1 million, but still they work very unstable. Don't ask me why, even though the limit is 1 million characters every 100 seconds, their server periodically responds with a error as soon as you exceed the old limit of 100k characters. But today I managed to translate 1 million in a row several times.

I have updated the utility and added these limits to it, now you can set a limit in the program window (by default 1 million), and when it reaches it, the program will wait 110 seconds (for reliability I added another 10 seconds, LOL), after which it will continue to translate.
If Google will send errors during translation, the threads will be interrupted, but the program will save everything it already managed to translate. Pay attention to the fields "Total dialogues" and "Dialogues translated". Just try to press the translation button after a while, perhaps Google will allow you to use its service later.
I also updated the instructions for Google Translate in the file Translate.API.pdf, do not forget to check it out.
It works very well, I just translated chapter 2 of DMD, as you said, just wait for Google want translating, thank you very much for your fantastic tool on behalf of the Spanish/Hispanic community, now I go with Milfy City and see what happens.
 
  • Like
Reactions: RRRoman and v01d_08

wasya2009

Newbie
Dec 13, 2018
78
35
You don't have permission to view the spoiler content. Log in or register now.

v01d_08
Thanks for the answers, but how do you explain it? (attach movie in post)
You don't have permission to view the spoiler content. Log in or register now.

bandicam 2019-08-05 20-42-47-558.jpg
And there is still a noticeable error of the GUI, it is reset. So I wrote earlier, "metro" style is not what this program needs, sorry. Can I use the old program style XP version 0.05?


You don't have permission to view the spoiler content. Log in or register now.
Here I do not agree, because I just go all the load on the hard drive (see the attach video), and not on the RAM and processor or we just don't understand each other.

I haven't tried the latest update yet, but I think the result will be similar. Thanks
 

v01d_08

Member
Modder
Jan 2, 2018
232
307
Here I do not agree, because I just go all the load on the hard drive (see the attach video), and not on the RAM and processor or we just don't understand each other.
I mean, Windows decides how to use CPU time during certain tasks. For my part, I've done multithreading. It is not up to me to decide how busy your CPU will be with the workflow.

Thanks for the video. Yes, because you don't really have a fast computer and all the dialogs are in one big file, you can see that the file is constantly being overwritten. I agree that there is a better algorithm how to export dialogs. When I have more time, I will change that. Thank you for your remarks.
 

wasya2009

Newbie
Dec 13, 2018
78
35
Thanks for the video. Yes, because you don't really have a fast computer and all the dialogs are in one big file, you can see that the file is constantly being overwritten. I agree that there is a better algorithm how to export dialogs. When I have more time, I will change that. Thank you for your remarks.
Eah, it's big file.
It helped me to cut the file into smaller files and feed the program. Im used KeyWordKeeper5. I cut the file 20 000 lines, but the processing was crooked because blocks of code were broken, so if you cut the blocks - the best option.
The translation program worked in about an hour. And then merge the file into one. Notepad++ is also not happy with this size of the text file, and Sublime Text is not so critical to it.
Yes... multithreading opens some borders, but closes others :)
The existing method is also good, and it works. But in my case, it’s more about the power of the computer than the file size, because it processes smaller files in the same way, except for the smallest ~ up to 10,000-15 000 lines.

The choice to make a game the author does, and he non asks how much it will be convenient later to work with her in the translation(not every author, has partnered with interpreter), and many people who do not know the author’s language want to play his game.

I don’t know if it’s worth proposing how to cut the file with this case (it’s not convenient for lines, but for blocks of code)
You don't have permission to view the spoiler content. Log in or register now.

If we divide 20 000(in my case, but it is possible less than 10 000 lines for example) lines into 6 lines(which form the standard largest size of the code block), but there are exceptions to this rule*, then we get about 3 000 of such blocks (for my case) or about 2 000 blocks if 10 000 lines, and for the performance of the program to create a new file with the old name and with an annotation to the number file, something like *_1.rpy, *_2.rpy, etc. and after the import program file in game folder, combine the file together.

been:
script.rpy
become:
script_1.rpy
script_2.rpy
script_3.rpy
...

result:

script.rpy

And if it is possible to cut a large file into number of blocks managed through the settings - this will be a bomb. Who has a powerful calculator, he will not cut, and who has a weak machine will set the value at its discretion.

And still, sorry, but with file translate.txt inconvenient to work all I with the same success can open any game file *.rpy and edit it directly, and since I have not yet understood (how this code looks like) how you extract the necessary lines from the files that need to be translated, I will voice my "wishlist", if you do not mind. I'm still in the process of learning the .NET framework, but there's a lot I can't understand and this is for me the difficulty.

You don't have permission to view the spoiler content. Log in or register now.

Wandering around the forum, I came across a Translator++(I have it not started, it is for RPG Maker) would be nice if there is a similar tool for RenPy. Let it be simpler, but it worked stably. I think it would be cool. Or is there already such a tool for RenPy? QSPTool i don't understand, and it seems his working on source game *.rpy files, his not working folder game/tl for multi languages or I don’t understand anything such an incomprehensible program... in addition, it works on Java machine and at a trial run seemed to me a very slow tool.

At the moment, the tool is very strictly limited to two online translators - there is room to grow. But if it will be possible to work with text in other programs (until it is implemented in this program and will there be a question?) and then feed the file back, then this will expand its functionality, there are other online and offline translators, and the limit for processing a large game is quickly selected by the program. For example, with GGGB, for example, you can try to transfer the game once a day and after that wait for the next day or pay. I don’t know how it is in the world, but localization into Russian, for example, is not paid for from the word at all (mentality + few rich people who are ready to sponsor localization - if we talk about indie adult development). In contrast, for example, from English-speaking localization.

I outlined where the program to grow, but the logic and code in there will become complicated at times, I understand.

You don't have permission to view the spoiler content. Log in or register now.
Thanks
 

wasya2009

Newbie
Dec 13, 2018
78
35
v01d_08
Maybe
Can be will find here interesting program solutions

If you are not afraid of the video in Russian with subtitles.
it says about:
Progress-bar
Multithreading-parallelism of work without freezing the application form (Not responding) -effect
the rest probably already know (I had already seen the solution to the program)
...Connecting a file and using data from it. In this particular example, it is *.json
 

v01d_08

Member
Modder
Jan 2, 2018
232
307
Can be will find here interesting program solutions
Thank you for the link, but the person in the video tells how to connect the dll library to the project. I don't think it has anything to do with the topic of this thread. :)
In any case, everything you have described above has already been implemented in this tool - both multi-threading and file management. The only thing I will add later is to generate an export in RAM before writing the data to disk, this will significantly increase the export speed.
If you are just learning c# programming, I recommend you to read about BackgroundWorker, Task.Run and async/await for a better understanding of multi-threading and synchronous/asynchronous operations. Good luck, buddy!
 

wasya2009

Newbie
Dec 13, 2018
78
35
v01d_08
Thanks.
I know. I'm just a little confused by the status of the program - "Не отвечает"\"Not responding" at work.

Damn, not exactly the reference I apparently made a mess of something... These YouTube links are so similar )
ASYNC AWAIT C#


I still decided to stay on VB.NET seems it is easier)), Although all languages mainly distinguished by the syntax in the most part, and a different compilation tool. And so essentially the same.
 

wasya2009

Newbie
Dec 13, 2018
78
35
Erolux
Ты неправильно подготовил файлы на перевод, надо делать перевод с пустыми строками, программа не умеет в обновление перевода.

YandexTranslater
Heu de forma incorrecta preparar els fitxers per a la traducció, és necessari fer la traducció amb les línies buides, el programa no sap com actualitzar la traducció.
 
  • Like
Reactions: Erolux

v01d_08

Member
Modder
Jan 2, 2018
232
307
Me sale este problema
You need to generate empty strings for translation using RenPy.
Read the first post in this thread, and the very first section - Generate RenPy translations. Dont forget to check "generate empty stings for translations" checkbox.
 
  • Like
Reactions: Erolux
5.00 star(s) 4 Votes