Jump to content

The big translations topic (was: Compiling Raine, the easy way?)


Recommended Posts

Thank's again Tux! Downloaded all already :rofl: . I will be posting the development news or any errors i get, so i will be bothering you, sorry in advance.

Greetings again!

Link to comment
Share on other sites

If you are really interested in making a translation, I could make raine to use gettext.

It would allow you to just translate the text in some text files, then you send the text file to me, I convert it, and you get your translation.

Normally gettext works in linux, windows and about everything except dos, but dos used something else anyway.

It's not too hard to do on my part, it's just that I never thought seriously about adding some translated text...


It would allow non programmers to send their translations for inclusion.

I still need to test this in windows, but normally it should work !

  • Like 1
Link to comment
Share on other sites

Yes, if it's good for you, awesome, send me the thingy and i will translate the text, later also if you want, and it's not too much trouble, send me a compiled version of Raine with gettext and the converted translation and i will test it under windows too.

But i will keep trying to compile my own Raine, to get satisfaction :moptop:

Link to comment
Share on other sites

Ok, well I have tested and it works perfectly in windows as promised (and in linux too of course) !

Judging from your profile I guess you want to try to make a spanish translation then...

So you can do it by using a program, it's called poedit there : http://poedit.net/

Or you can edit directly the text file for your language.


Here is the base texts, all in english in case you want to create a new language using poedit : http://raine.1emulation.com/archive/dev/raine.pot

Here is the french translation (unfinished) that I started as an example (it's just started, not done much yet !) : http://raine.1emulation.com/archive/dev/french.po

And here is a file you could use for spanish, nothing done yet inside : http://raine.1emulation.com/archive/dev/es.po


All these files are in ascii, you can either open them in a text editor or handle them using poedit.

Inside you have a header where you can put your information to be contacted in case of future problem (!)

then you have the strings in this format :

# a comment which starts by a # and which shows from which source file the text comes

msgid "the original text in english"

msgstr "the translation"


and so on.

If you leave msgstr empty for a string, then the english text is kept, which allows to test things without finishing completely the tranlsation.


For now I have only put the texts from the gui, so there are not so many texts to translate finally.

I don't think it's a good idea to try to translate dipswitches, or cheats, and even less history (for history you'd better translate their file directly !), nor the game names.

So I think it's good as it is now, but we can always add more texts later if we want.


For info in the end the po file must be converted to the mo format to be used by raine, I am not sure poedit can do that.

Normally I do that from the command line like this for the french file :

msgfmt -c -v -o raine.mo french.po

if you want to try that you can get a windows distribution of gettext there : http://gnuwin32.sourceforge.net/packages/gettext.htm

I guess it works the same way and you would need to use the command line for that (gnu tools love the command line !).

Otherwise I can make the conversion for you.


EDIT : update done, all the 3 files are updated, you'll need either to refresh them manually in your browser or to restart your browser.

Edited by Tux
Link to comment
Share on other sites

Ok, tonight i'm gonna start testing and translating, i will try poedit to see how it goes, but if i find it hard to handle, i will switch to notepad++ wich i know a little bit more.

I was thinking to parcially translate the dispswitch and the cheats section, like Nº of coin chutes/slots Nº of players, and cheats like infinite time, invincibility or infinite lives, but if is too much to translate, like the history.dat file, i will need help from half of Argentina, i'm not saying NO, but, one can dream.

Link to comment
Share on other sites

Hehe, yeah. Well I just finished the french translation. For now still a lot of things are untranslated, I was too optimistic at first.

Like the controls names when customising controls.

But it's a nice start, most of the gui is translated now, which is quite impressive.

I'll probably release a new binary tomorrow so that you can have a look, but I need a break for now (been doing this for at least the last 2 hours, more if you count the time to add gettext functionality !).

Meanwhile I'll update the raine.pot and french.po and es.po files with new text I have added since I last posted them.


For info I did mine with gvim, because I am fast with gvim and I didn't find how the automatic translation worked with poedit (I didn't search for very long).

One of its useful features it to be able to add the new strings to translate when raine.pot is updated.

Well I did the same using gvimdiff, a special mode of the editor where you see what changed, so everybody does as he likes ! I'll edit the previous post when the update is done.

  • Like 1
Link to comment
Share on other sites

Finish the spanish translation, tested with the new release, and work like a charm! :rofl: I did notice that still are some things unstranslated, but as the daddy of superman one time says "in time, they will join you in the sun"...

I attach both files, the .mo and .po files just in case.

  • Like 1
Link to comment
Share on other sites

The poedit it's really easy to use, so i make the translation using it, let me now if i screw up something.

I will continue exploring poedit to see what he could do.

Sleep well and dream with Chun Li and Mai Shiranui making you a proposal that you can not refuse...

Link to comment
Share on other sites

Oah ! Congratulations ! I am impressed !

How did you do to generate the mo file, did you find this in poedit or did you download gettext ?

I didn't find the attachments ! Where ? It's not a pm, it's not in the mails, nor in the forum ? I am lost !


For the untranslated parts, you can make a list.

For now : for the dipswitches it can be done, but I'll have to change the way things work, making _("...") just a dummy function, here just to be able to locate the strings to translate when creating raine.pot. Same thing for inputs.

Something else ?


And thanks for the dream idea ! :wink:


EDIT : just updated the pre-compiled packages, added jpeg.7z, gettext.7z and updated the sdl libraries. Let me know how it works if you try this compilation !

Edited by Tux
  • Like 1
Link to comment
Share on other sites

Thanks to you!

Apparently, Poedit automatic saves a .mo file when you save your progress, because a .mo file with the same name of the .po materialized from thin air in the same directory.


I uploaded the files as a post attachment, i think that the forums in general hates me, because always get errors and things like that, i try to change my profile picture like 10 times now and nothing happens, no matter how that grey guy looks like me, i want other profile pic...

I will try to upload as an attachment again, and in mega:




This is the code for the file if the forum rules make the link go away:




Oh yes, i am making a list for the missing texts, let you know when i complete that. Great news about the dipswitchs and inputs.

There is a few things about the translation, but it's just gramatic, nothing important. But when i was translating, and thinking about the inputs, i got a little new idea: that you could use the graphic used in the command.dat to help configuring the inputs, you know, in the inputs menu at the side of the description i.e. "UP" the up arrow appears, and the same with the buttons, each button appears, accompanied with his respective description, just to make Raine more pretty and be the envy of his brothers and cousins emulators.


Downloading the new pre-compiled packages! Cant make me a little bit of time to start trying to compile Raine :msncry: plus, my cpu it's start to behave funny, i think that the 10 years HDD it's saying good bye...


Greetings, let me know any news!



  • Like 1
Link to comment
Share on other sites

Ok I got the file from mega, and this time the attachment shows in your post, so it's ok !

Good news for the list, yeah I probably forgot some texts here and there.

For the hard drive, smartmontool is a good tool to know where your hard disk is in its life, I don't know if there is a windows version though, I think there is, yeah it's there : https://www.smartmontools.org/wiki/Download

read the doc, but it's rather good.

For the idea of using command.dat, yeah well it would do for the arrows and the buttons when using neogeo, but not even sure they could be used for normal arcade games. Plus the graphics don't really exist in command.dat, it's just an ascii file, I had to draw them myself after looking at a few pictures underscaled, so they are quite far from perfect, but it's better than nothing !

And I didn't add yet the ability for the gui to have nice icons beside the text, but it's probably very easy to do anyway, this gui is extremely extensible and easy to program at least (contrary to the gui of the dos version which was nice to look at, but a nightmare to program !)


And good for the mo file, it probably did the same thing for me but I didn't notice since I already had a mo file... Good for poedit then !



Edited by Tux
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...