Too much data in translation variable

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
Rinon Ninqueon
Newbie
Posts: 2
Joined: Wed Sep 28, 2016 12:50 pm
Contact:

Too much data in translation variable

#1 Post by Rinon Ninqueon » Wed Sep 28, 2016 1:13 pm

I trying to translate one game, which already has 4 languages. I don't have original sources, only decompiled files.
First, I edited translation.rpy file.
Like this:

Code: Select all

init -1001 python:
    translation = {
        "settings" : {
                "english" : "SETTINGS",
                None : "НАСТРОЙКИ",
                "spanish" : "OPCIONES",
                "italian" : "IMPOSTAZIONI",
                "japanese" : "設定",
                },
#etc...
But there's a problem: too much data. "Overly long logical line" occurs.
So, how can I add data to translation variable? I didn't find method for manipulating RevertableDict object data.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Too much data in translation variable

#2 Post by Ocelot » Wed Sep 28, 2016 1:42 pm

Did you try to fill it sequentially?

Code: Select all

init python:
    translation = {}
    translation["settings"] = {
                "english" : "SETTINGS",
                None : "НАСТРОЙКИ",
                "spanish" : "OPCIONES",
                "italian" : "IMPOSTAZIONI",
                "japanese" : "設定",
    }
    translation["start"] = {
        "english" : "START",
        None : "СТАРТ",
        "spanish" : "COMIENZO",
        "italian" : "INZIO",
        "japanese" : "開始",
    }
< < insert Rick Cook quote here > >

User avatar
Rinon Ninqueon
Newbie
Posts: 2
Joined: Wed Sep 28, 2016 12:50 pm
Contact:

Re: Too much data in translation variable

#3 Post by Rinon Ninqueon » Wed Sep 28, 2016 2:12 pm

Oh, thx! It works.
Just didn't guess)

Post Reply

Who is online

Users browsing this forum: No registered users