Common.rpy does not translate

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
Karrion
Regular
Posts: 74
Joined: Fri Jan 18, 2019 8:33 pm
Projects: Murder on the Marine Express
Organization: 1564 Studio
itch: 1564-studio
Contact:

Common.rpy does not translate

#1 Post by Karrion »

So, I tried translating some strings in the common.rpy file to spanish, but for some reason it does not apply to the game. I tried recompiling, deleting persistent, etc, and it didn't work. I tried translating some of the other .rpy's to see if it was a general problem... It wasn't. Everything else translated as normal.

This is the code in the common.rpy:

Code: Select all

# renpy/common/00gui.rpy:376
    old "Are you sure you want to overwrite this save?"
    new "Estás seguro/a de que quieres sobreescribir esta partida?"

    # renpy/common/00gui.rpy:377
    old "Loading will cause all unsaved progress to be lost.\nAre you sure you want to do that?"
    new "Al cargar se perderá todo el progreso sin guardar. \nEstás seguro/a de que quieres hacer esto?"

    # renpy/common/00gui.rpy:378
    old "Are you sure you want to quit?"
    new "Estás seguro/a de que quieres salir?"

    # renpy/common/00gui.rpy:379
    old "Are you sure you want to go back to the main menu?\nAll unsaved progress will be lost."
    new "Estás seguro/a de que quieres volver al menú principal?\nTodo el progreso sin guardar se perderá."
Am I missing something?

Edit: Another strange thing. When I delete persistent, a splashscreen I created appears and asks for language, if I put spanish, the other .rpy's translation works, however, if I enter in the settings menu and change the language and come back to spanish, everything reverts to english and can't change back. :/

The splashscreen is this one:

Code: Select all

label splashscreen:
    if not persistent.my_conf:
        $ persistent.my_conf = "yes"
        jump splashscreen2
    else:
        return
label splashscreen2:
    scene bg fullnegro
    show text "Choose your language:" at top
    menu:
        "{font=fonts/PixelMaster.ttf}Español{/font}":
            $ renpy.change_language("spanish")
        "{font=fonts/PixelMaster.ttf}English{/font}":
            $ renpy.change_language("english")
        "{font=fonts/dougenzaka16.ttf}{size=50}日本語{/size}{/font}":
            $ renpy.change_language("japanese")
    return

And the options in the options menu are like this:

Code: Select all

vbox:
                style_prefix "radio"
                label _("LANGUAGE")
                hbox:
                    xpos -8
                    ypos -21
                    spacing 18
                    textbutton _("ENG") text_font "fonts/PixelMaster.ttf" action Language("english")
                    textbutton _("JAP") text_font "fonts/PixelMaster.ttf" action Language("japanese")
                    textbutton _("ESP") text_font "fonts/PixelMaster.ttf" action Language("spanish")
1564 Studio, an indie studio dedicated to developing mystery VNs!
Follow us on Twitter for updates on our projects!

Image

Check out our current project, just released on PC, Android, Switch, XBox ONE/Series S/X and PS4/5!
Also available in Spanish, English, French and Japanese!

Image

User avatar
RicharDann
Veteran
Posts: 286
Joined: Thu Aug 31, 2017 11:47 am
Contact:

Re: Common.rpy does not translate

#2 Post by RicharDann »

You could try using the already created common.rpy files that comes with Ren'Py, the ones the launcher uses to setup a new project in the language of your choice.

To find it go to your renpy-sdk folder, then in the folder named launcher, game, tl, and there you'll find translation files for every major language, including spanish and japanese. Just copy those folders to your own project's tl folder and it should work (it does for me).

If that works you can then edit the translated lines to your liking.
The most important step is always the next one.

User avatar
Karrion
Regular
Posts: 74
Joined: Fri Jan 18, 2019 8:33 pm
Projects: Murder on the Marine Express
Organization: 1564 Studio
itch: 1564-studio
Contact:

Re: Common.rpy does not translate

#3 Post by Karrion »

Not only did that work, but also fixed the toggling languages problem. Thank you so much!
1564 Studio, an indie studio dedicated to developing mystery VNs!
Follow us on Twitter for updates on our projects!

Image

Check out our current project, just released on PC, Android, Switch, XBox ONE/Series S/X and PS4/5!
Also available in Spanish, English, French and Japanese!

Image

Post Reply

Who is online

Users browsing this forum: No registered users