NaveenKrishnanC
Member
- Jul 28, 2025
- 160
- 56
- 28
I accidentally uploaded the v0.17 file.Are you sure you have uploaded the correct file? Winmerge shows no difference to v0.17
It's correct now.
I accidentally uploaded the v0.17 file.Are you sure you have uploaded the correct file? Winmerge shows no difference to v0.17
Developers can use $ as the start of a python code line in menu.Ok, game with Ren'Py 7.3.5.606 is running again, thanks.
I also noticed that if there is a $ character in the text, the following text is not translated.
I removed the line r'\$.*?(?=\n|$)' from PROTECT_PATTERNS. After that it worked.
However, I don't know whether the $ character is used for other things in Renpy.
Error in text to comhtml conversion: expected string or bytes-like object
Traceback (most recent call last):
File "C:\Prog\Games\ChasingSunsets-1.10-pc\renpy\exports.py", line 3766, in run
fn(*args, **kwargs)
File "game/realtimetrans.rpy", line 189, in process_translation_results
translated = html_unescape(translated)
File "game/realtimetrans.rpy", line 629, in html_unescape
text = re.sub(r'&#(\d+);', lambda m: chr(int(m.group(1))), text)
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/re.py", line 210, in sub
TypeError: expected string or bytes-like object
It would probably be easier if the translator script checked whether it was a name (game characters whose names should not be translated) or text to be translated.What bothers me is that if something has been translated incorrectly, for example with names: "Bill" becomes "Rechnung", I would like to change this immediately in translation_cache.json.
But this is not possible while the game is running.
Would it be possible to switch off the writing of the translation_cache with a key combination or button and switch it on again after the change?
Then you don't always have to quit, change and restart the game.
It is translation api 's job for nlp.It would probably be easier if the translator script checked whether it was a name (game characters whose names should not be translated) or text to be translated.
Translation cachec.json is only read once in the init of game.What bothers me is that if something has been translated incorrectly, for example with names: "Bill" becomes "Rechnung", I would like to change this immediately in translation_cache.json.
But this is not possible while the game is running.
Would it be possible to switch off the writing of the translation_cache with a key combination or button and switch it on again after the change?
Then you don't always have to quit, change and restart the game.
Anyway, a common english name(having no other meanings) list is possible.It is translation api 's job for nlp.
If the mod itself needs to do that,
We will finally apply local llm .
I think llm api translation is here for you if you need better translation quality.
I think that's a good solution.I think i can change the Enable_Translation toggle button action,
when it switches to False,save_translate_cache is called
and when it switches to True, translation cache should read.json again.
change the Enable_Translation toggle button action,
when it switches to False,save_translate_cache is called
and when it switches to True, translation cache should read.json again.
Nice toggle, didn't know this works too.DISPLAY_TRANSLATION = not DISPLAY_TRANSLATION
I have to warn that DISPLAY_TRANSLATION only controls the translation display,Somehow, it's not working quite as I had imagined.
Only after I inserted the following in “def toggle_translation():” did it work as intended:
def toggle_translation():
global DISPLAY_TRANSLATION
DISPLAY_TRANSLATION = not DISPLAY_TRANSLATION
#trans1 begin
if DISPLAY_TRANSLATION:
load_translation_cache()
else:
save_translation_cache()
#trans1 end
renpy.call_in_new_context("_force_redraw")
return
trans1's code applied#trans1 begin
if DISPLAY_TRANSLATION:
load_translation_cache()
else:
save_translation_cache()
#trans1 end
Like ScaredText ,the objects are displayed through multi Text objects which is not supported.The translation is not displayed if {bt=3} {/bt} is included in the dialog.
However, it is translated, see:
"\"{bt=3}Step-brotherrr{/bt}...I'm making sandwiches!\"": "\"{bt=3}Stiefbruder{/bt}...ich mache Sandwiches!\"",
The log shows:
Error in token replacement <store.BounceText object at 0x0000000054cbf430>
Error in token replacement <store.BounceText object at 0x0000000053fcb520>
Error in token replacement <store.BounceText object at 0x0000000054c2abe0>
Error in token replacement <store.BounceText object at 0x0000000054c723d0>