Save slot text disappearing in translation?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
OddTillTheEnd
Regular
Posts: 43
Joined: Wed Jun 04, 2014 3:45 pm
Completed: Broken Minds (2017), Prison of Lies (2019), Methods (2020), Catalyst Wake (2021)
Projects: JPDE2: Adagio of Darkness (Early access), Blankspace (2020), The Elevator Game with Catgirls
Organization: LockedOn Games
Soundcloud: OddTillTheEnd
itch: lockedon
Contact:

Save slot text disappearing in translation?

#1 Post by OddTillTheEnd » Tue Sep 01, 2020 1:13 pm

Hello, I'm having a strange bug. I'm using a pretty old version of the Ren'Py code, hopefully that isn't an issue.

"% s\n %s" disappears when I switch to the Chinese version of the game. It appears when I switch to English, but it disappears completely in Chinese. I tried changing the font back to the English font in the Chinese version of the string, just in case for some reason that was why — nope!

Code: Select all

## ■██▓▒░ SAVE / LOAD SLOT ░▒▓██████████████████████████████■
## This represents a load/save slot. You should customize this to ensure that the placement of the thumbnail and the slot text are as desired. Positions (x1, y1, x2 and y2) are relative to the x, y parameters, that are passed when the screen is called. To set the screenshot thumbnail size see options.rpy.
init -2 python: #we initialize x and y, so the load_save_slot screen below works at startup
    x=0
    y=0
init -2:
    $ saveorload = "none"



screen load_save_thumb:
    $x1=x+33
    $y1=y+47
    add FileScreenshot(number) xpos x1 ypos y1


screen load_save_slottext:
    $ file_text = _("% s\n  %s") % (FileTime(number, empty="Empty Slot."), FileSaveName(number), )
    $x1=x+33
    $y1=y+47
    $x2=x+266
    $y2=y+47
    text file_text xpos x2 ypos y2 size 20

Here's the generated translation:

Code: Select all

translate chinese strings:

    # game/screens.rpy:587
    old "% s\n  %s"
    new "% s\n  %s"
Any help would be appreciated — I'm close to just leaving it this way, with no date and time in the Chinese version.

Best,

— Odd.

Post Reply

Who is online

Users browsing this forum: Alexis_Royce, Google [Bot], nyeowmi, _ticlock_