Translating OFS into different languages

I want to share something I’ve been working on recently.
Basically I had this idea in my mind that It would be cool if the OFS interface could be translated into different languages for people who are not fluent in english.
Nobody asked for this but maybe I can create some induced demand. :nerd_face:

So here it is it is localization.csv.
It doesn’t look like much but this was atleast 8 hours of me going through every single string in the source code, giving it a key and putting it into this csv file.
The Key column is the thing I reference in the source code this must not be changed.
The Default column is what I use at compile time and can be used for reference.
The Translation column is where you can put a translation which can be loaded at runtime.

In order to create translation you would copy this csv and update the Translation column with the text you want to be displayed.
Only the interface is being translated log messages are left as is. I think that’s fine.
I tried avoiding it as much as possible but some strings contain c-style formatting sequences such as %s a placeholder for another string or %d a placeholder for a decimal number.
Ideally these formatting sequences should also occur somewhere in the translation text.

This could also be used for non coders to correct my typos (not a native speaker myself).

This is not in a release yet but will be soon™.
Probably a 2.0 release because this update will cause the old configuration files to break.

Hopefully this reaches the right people and maybe we can crowdsource some translations.:handshake:
Either way I’m sure this will benifit someone at some point.

3 Likes

Thank you for putting so much work into an already awesome tool to make it even better :slight_smile:

I could help with a German translation. I just have no idea, where to download this file or what to copy and where to copy it into ^^

There’s this Raw button in the top right which takes you to this page https://raw.githubusercontent.com/OpenFunscripter/OFS/master/localization/localization.csv and there you just right click “save page as…”.
After that you can load the file into you’re favorite spreadsheet tool Microsoft Excel, Google Sheets, etc. :sweat_smile:

I’m thinking about creating a pre-release where I’m not yet updating the main OFS thread. :thinking:

Ok, got it! Thank you.

And when it’s done I just send you the finished spreadsheet?

I’m not sure yet. These translations will obviously need a little updating between releases.
One thing I made sure of is that the translations will work even if they are incomplete OFS will fallback to english if nothing else is provided.

I quickly recorded a little demo.
Ignore the part where “Language” gets replaced with “japanesed” :joy: I did that for test purposes.
You’ll also notice that “Directory” doesn’t change because it’s not in the csv defined.
I don’t speak japanese this is just google translate, but as you can see it’s a satisfying instant swap.
Animation

I added a pre-release for anyone who wants to try this. Windows only.
There’s a new directory %appdata%/OFS/OFS_data/lang/ where you would put the csv file.
I added a new keybinding under Core->Reload current translation which allows you to hot reload the csv with the press of a button.

You definitely need to delete %appdata%/OFS/OFS_data/imgui.ini because the window layout will otherwise be scuffed

This looks pretty cool. You are speaking Japanese?

I will work on the German translation from time to time and will let you know, once it’s done.

1 Like

(╯°□°)╯︵ ┻━┻

1 Like

Sorry, overread that ^^ My eyes are bit tired today.

But from the bit Japanese I can read, it looks pretty good. Google translator actually is good for translating single words and simpler sentences. But it still would take way longer to translate everything with a translator over knowing the language and being able to translate the stuff by heart.

Hello!

I am done with the translation.

There are just a few things I didn’t 100% know, what they mean:

Mouse moved actions - Actions, that are moved with / by the mouse?

Mirrors add/edit/remove action across all loaded scripts. - No idea at all, what this is.

Point timeline - Also, no idea about that.

Commit - To commit smth.? For example: To commit a crime.


I put translations for all them in. There are like a few English terms, that I didn’t translate, because they are used in German as well. For example: frame rate, output, script, …
I also didn’t translate the OSR / SR6 stuff - yaw, pitch, roll and so on. Because it doesn’t make much sense to translate them.

Do you want the file as a .xslx or CSV? I used Google Spreadsheet to put the translations it.

As a CSV. I guess I will ship that then with next release. :eyes:

I know it’s hard to tell in what context the text is displayed.
“Mouse moved actions” is what’s displayed in the undo history window when moving an action while holding shift with the mouse.
“Mirrors add/edit/remove action across all loaded scripts.” is the tooltip for “Mirror mode” which only shows up when you have atleast two script timelines.
“Point timeline” appears in Keys->Modifiers maybe it should be script timeline instead.
“Commit” refers to a git commit in that case it helps to look at the key which I named “GIT_COMMIT”.

Thank you for the clarification.
I updated the translations for that.

Here is the .csv file.

OFS Translation - localization.csv (25.1 KB)

1 Like

I will try to help with a french translation. Please notice I will need time.

1 Like

No rush it’s an up and coming feature :wink: