Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress excessive translation #9947

Open
wants to merge 2 commits into
base: content
Choose a base branch
from

Conversation

proudust
Copy link
Contributor

@proudust proudust commented Apr 2, 2023

I have suppressed excessive translation in the function mas_games.getGameEVByPrompt.
This excessive translation was causing crashes in translation Submods.

@ThePotatoGuy ThePotatoGuy self-requested a review April 2, 2023 08:27
@Booplicate
Copy link
Member

Can you show the error it was causing?

@proudust
Copy link
Contributor Author

proudust commented Apr 3, 2023

I will describe the reproduction procedure below.

  1. Translate the title of the mini game into Japanese before starting MAS.
define config.default_language = "Japanese"
define config.language = "Japanese"

translate Japanese strings:
    old "Pong"
    new "ポン"
  1. Start MAS.
  2. Select "Talk", "I feel...", "...bored." in order.
  3. When you proceed with the conversation, it crashes.

The reason is that at line 411 of zz_games.rpy, it compares the Japanese-translated gamename obtained by renpy.substitute with the prompt that is still in English, causing None to be returned every time. Therefore, this PR suppresses the translation and makes the comparison between two English strings.

traceback.txt at crash
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script-ch30.rpy", line 2141, in script call
  File "game/event-handler.rpy", line 3119, in script call
  File "game/script-moods.rpy", line 647, in script
  File "game/script-moods.rpy", line 657, in <module>
IndexError: list index out of range

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script-ch30.rpy", line 2141, in script call
  File "game/event-handler.rpy", line 3119, in script call
  File "game/script-moods.rpy", line 647, in script
  File "C:\Users\Proudust\Downloads\DDLC-1.1.1-pc\renpy\ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\Proudust\Downloads\DDLC-1.1.1-pc\renpy\python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script-moods.rpy", line 657, in <module>
  File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/random.py", line 275, in choice
IndexError: list index out of range

Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
Monika After Story 0.12.14

@Booplicate
Copy link
Member

Thank you, nice catch. I think the fix makes sense if we want to keep relying on game event prompts (which I think we do).

@Booplicate Booplicate added bug awaiting testing code needs to be tested awaiting code review someone needs to check for syntax/logic/indentation errors labels Apr 3, 2023
@Booplicate Booplicate added this to awaiting review in Bugs via automation Apr 3, 2023
@proudust
Copy link
Contributor Author

Additionally, suppressed excessive translation in the label mas_pick_a_game.
These excessive translations were preventing unlocked minigames from being playable in the translation Submod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting code review someone needs to check for syntax/logic/indentation errors awaiting testing code needs to be tested bug
Projects
Bugs
  
awaiting review
Development

Successfully merging this pull request may close these issues.

None yet

2 participants