Page 1 of 1

Too much data in translation variable

Posted: Wed Sep 28, 2016 1:13 pm
by Rinon Ninqueon
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.

Re: Too much data in translation variable

Posted: Wed Sep 28, 2016 1:42 pm
by Ocelot
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" : "開始",
    }

Re: Too much data in translation variable

Posted: Wed Sep 28, 2016 2:12 pm
by Rinon Ninqueon
Oh, thx! It works.
Just didn't guess)