Create and Fuck your AI Slut -70% OFF
x

Tool Ren'Py Ren'py realtime translator Mod[v0.26.a]

frostkag

New Member
Oct 30, 2017
3
0
203
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00start.rpy", line 279, in script
python:
File "renpy/common/00start.rpy", line 279, in script
python:
File "renpy/common/00start.rpy", line 283, in <module>
renpy.call_in_new_context("_main_menu")
File "game/realtimetrans.rpy", line 189, in process_pending_translations
current_timestamp = int(time.time())
AttributeError: 'int' object has no attribute 'time'

files realtimetrans.rpy transconfig.rpy v0.20.b
 
Jul 28, 2025
159
55
28
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00start.rpy", line 279, in script
python:
File "renpy/common/00start.rpy", line 279, in script
python:
File "renpy/common/00start.rpy", line 283, in <module>
renpy.call_in_new_context("_main_menu")
File "game/realtimetrans.rpy", line 189, in process_pending_translations
current_timestamp = int(time.time())
AttributeError: 'int' object has no attribute 'time'

files realtimetrans.rpy transconfig.rpy v0.20.b
current_timestamp = int(time.time())
is not in v0.20.b or before
It should allways be
current_time = time.time()

could you provide more details?

This might occur when the game itself already using “time” as variable name.
 
Last edited:
Jul 28, 2025
159
55
28
v0.21.a
update:06-10-2025
updated files:realtimetrans.rpy transconfig.rpy
1-Simplified variables. If there is a global variable corresponding to the persistent variable, use the persistent variable directly.
Add a persistent variable

last_saved_cache_size
to solve translation_cache roll back overwritten problem.

2-Change current_time=time.time()
to
current_time=renpy.time.time()
 
Last edited:

frostkag

New Member
Oct 30, 2017
3
0
203
Thank you for your hard work. Excellent translator! I ran into another problem. There is no item in the translation settings menu, in fact, and there is no subsequent translation of the text at all. I am attaching the log file.
v0.21.a
(sorry for my English)
 
Jul 28, 2025
159
55
28
Thank you for your hard work. Excellent translator! I ran into another problem. There is no item in the translation settings menu, in fact, and there is no subsequent translation of the text at all. I am attaching the log file.
v0.21.a
(sorry for my English)
It seems that you missed the file useragentlist.rpy
If that not working, could you provide the game name for me to test?
edit:it is the lust theory ,i'm testing.
 
Jul 28, 2025
159
55
28
Thank you for your hard work. Excellent translator! I ran into another problem. There is no item in the translation settings menu, in fact, and there is no subsequent translation of the text at all. I am attaching the log file.
v0.21.a
(sorry for my English)
OK,i found the reason.
The Lust Theory uses "re" as a ADVcharacter variable name,which is same with python module re.
Replace the realtimetrans.rpy in the attach should work well.
Tested in LustTheory S3V0.80
 

trans1

Newbie
Jan 24, 2023
25
0
124
The real-time translator works very well.
I noticed a few minor errors that could perhaps be fixed.

The translation is not displayed when {w=*} is in the dialog.
Then you first have to switch the “<<<” button off and on again.

Of course, there is a problem with the display when the translation {/i} appears before {i} in the dialog.
Log:
Error in token replacement '/i' closes a text tag that isn't open.

I often get this message in various games:
Log:
Traceback (most recent call last):
File "renpy/exports/platformexports.py", line 105, in run
fn(*args, **kwargs)
File "game/realtimetrans.rpy", line 230, in process_translation_results
save_translation_cache()
File "game/realtimetrans.rpy", line 63, in save_translation_cache
renpy.save_persistent()
File "renpy/exports/persistentexports.py", line 149, in save_persistent
renpy.persistent.update(True)
File "renpy/persistent.py", line 407, in update
need_save = find_changes()
File "renpy/persistent.py", line 186, in find_changes
backup[f] = safe_deepcopy(new)
File "renpy/persistent.py", line 139, in safe_deepcopy
rv = copy.deepcopy(o)
File "lib/python2.7/copy.py", line 163, in deepcopy
File "lib/python2.7/copy.py", line 256, in _deepcopy_dict
RuntimeError: dictionary changed size during iteration
 
Jul 28, 2025
159
55
28
The real-time translator works very well.
I noticed a few minor errors that could perhaps be fixed.

The translation is not displayed when {w=*} is in the dialog.
Then you first have to switch the “<<<” button off and on again.

Of course, there is a problem with the display when the translation {/i} appears before {i} in the dialog.
Log:
Error in token replacement '/i' closes a text tag that isn't open.

I often get this message in various games:
Log:
Traceback (most recent call last):
File "renpy/exports/platformexports.py", line 105, in run
fn(*args, **kwargs)
File "game/realtimetrans.rpy", line 230, in process_translation_results
save_translation_cache()
File "game/realtimetrans.rpy", line 63, in save_translation_cache
renpy.save_persistent()
File "renpy/exports/persistentexports.py", line 149, in save_persistent
renpy.persistent.update(True)
File "renpy/persistent.py", line 407, in update
need_save = find_changes()
File "renpy/persistent.py", line 186, in find_changes
backup[f] = safe_deepcopy(new)
File "renpy/persistent.py", line 139, in safe_deepcopy
rv = copy.deepcopy(o)
File "lib/python2.7/copy.py", line 163, in deepcopy
File "lib/python2.7/copy.py", line 256, in _deepcopy_dict
RuntimeError: dictionary changed size during iteration
v0.22.a
update:22-10-2025
update file:realtimetrans.rpy
Fixed most bugs by
1- Implemented separation of the Text object redrawing and translation result processing threads.
Text object redrawing now occurs at a frequency of 0.2s.
2- Deleted the original_set and translated_set variables and changed the related judgment conditions to rely on the translation_cache. The original purpose was to reduce the time complexity by relying on the O(1) lookup of the set structure, but the translation_cache is an O(1) dictionary lookup, so it is not necessary.
3- Changed TEXT_OBJECTS_TO_REDRAW from a weak reference dictionary to a dictionary + set structure, with the set as the value storing the corresponding text objects to be redrawn.
 
  • Like
Reactions: CAT0X0

trans1

Newbie
Jan 24, 2023
25
0
124
There is still a problem with displaying the translation when “\n” or “\n\n” appears in the dialog.
This problem also existed in earlier versions.

original.PNG übersetzung.PNG

The corresponding line from translation_cache:
"“It’s... nothing, ma’am. I’m sorry!”\n\n“What’s your name?”\n\n“Jolle, ma’am.”\n\n“Tell me why you’re crying.”": "„Es ist … nichts, Ma’am. Es tut mir leid!“ „Wie heißen Sie?“ „Jolle, Ma’am.“ „Sagen Sie mir, warum Sie weinen.“"
 
Jul 28, 2025
159
55
28
There is still a problem with displaying the translation when “\n” or “\n\n” appears in the dialog.
This problem also existed in earlier versions.

View attachment 5366905 View attachment 5366915

The corresponding line from translation_cache:
"“It’s... nothing, ma’am. I’m sorry!”\n\n“What’s your name?”\n\n“Jolle, ma’am.”\n\n“Tell me why you’re crying.”": "„Es ist … nichts, Ma’am. Es tut mir leid!“ „Wie heißen Sie?“ „Jolle, Ma’am.“ „Sagen Sie mir, warum Sie weinen.“"
v0.22.b
update:23-10-2025
update file:realtimetrans.rpy
Fixed the /n bug by replacing it with <br> ,it is a step towards html tags replacement.
 

trans1

Newbie
Jan 24, 2023
25
0
124
Thanks for the quick update. It's better now, but still not perfect.
Somehow, extra blank lines are being inserted.

original1.PNG übersetzung1.PNG

The corresponding line from translation_cache:
"“It’s... nothing, ma’am. I’m sorry!”\n\n“What’s your name?”\n\n“Jolle, ma’am.”\n\n“Tell me why you’re crying.”": "„Es ist … nichts, Ma’am. Es tut mir leid!“\n\n \"Wie heißen Sie?\"\n\n „Jolle, Ma’am.“\n\n „Sag mir, warum du weinst.“",
 
Jul 28, 2025
159
55
28
Thanks for the quick update. It's better now, but still not perfect.
Somehow, extra blank lines are being inserted.

View attachment 5369726 View attachment 5369727

The corresponding line from translation_cache:
"“It’s... nothing, ma’am. I’m sorry!”\n\n“What’s your name?”\n\n“Jolle, ma’am.”\n\n“Tell me why you’re crying.”": "„Es ist … nichts, Ma’am. Es tut mir leid!“\n\n \"Wie heißen Sie?\"\n\n „Jolle, Ma’am.“\n\n „Sag mir, warum du weinst.“",
v0.23.a
update:27-10-2025
update file:realtimetrans.rpy
Fix the bug due to tokens replacement in hook_segment_trans
 

konstant61

Member
May 3, 2017
173
65
240
Is it possible to disable font scaling? It's really annoying...

P.S. It would be best if the translator took the fonts and their settings from the game settings...
 
Last edited: