Vega Strike Translation Tool

Discussion and planning of required developer support for multiple languages, and design and commentary on tools and techniques to assist with the automation of generating language specific structures.
Post Reply
dergringo
Star Pilot
Star Pilot
Posts: 7
Joined: Wed Oct 15, 2008 5:23 pm

Vega Strike Translation Tool

Post by dergringo »

Hello everybody

I'm new to this community and have offered to translate Vega Strike into German.
While disucussing this (see here) I was made clear that you have to edit some source files to change the language. That led to the idea of creating a translation tool (let's call it Babel Strike / BS for now) that is able to change Vega Strike into the language of your choice.
Planned features on first release:
  • Written in Python
  • Run on any platform on which VS runs
  • Definition files that contain the information where and which strings are rpelaced
  • Language files that contain the strings which will replace the original ones
  • Quick and dirty user interface
  • Free like in Freedom (propapbly GPL)
If you have any suggestions or may like to help let me know. Let's get this great open source game translated together!
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: Vega Strike Translation Tool

Post by chuck_starchaser »

Sounds very ambitious. Is it even possible? Translation software is usually pretty lame;
at least when it comes to Spanish, automated translations are usually disastrous.
dergringo
Star Pilot
Star Pilot
Posts: 7
Joined: Wed Oct 15, 2008 5:23 pm

Re: Vega Strike Translation Tool

Post by dergringo »

Sorry if I mispresented the tool.
The idea behind it is to work with user created language files.
It does not make use of automated translation services.

Just have a package with several languages included and the user can then translate vs into one of those languages and back to english.
Last edited by dergringo on Tue Oct 21, 2008 2:31 pm, edited 1 time in total.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: Vega Strike Translation Tool

Post by ace123 »

Sounds like a great idea.
The main difficulty that people have had in the past is how to replace all strings in the code. And also how to separate out the important strings from the unimportant ones.
In python for example you may need to add a wrapper function like _("something") around each translatable string (ones that get displayed to the user).
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Re: Vega Strike Translation Tool

Post by charlieg »

Don't forget that this is a very common problem and there are several established ways to integrate translations into a game. Don't reinvent the wheel.
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Vega Strike Translation Tool

Post by loki1950 »

Been thought of but all the methods available would need a major reorganization of the engine code and all the python scripts data side so the verdict was just too much work for minimal gain.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
dergringo
Star Pilot
Star Pilot
Posts: 7
Joined: Wed Oct 15, 2008 5:23 pm

Re: Vega Strike Translation Tool

Post by dergringo »

ace123 wrote:Sounds like a great idea.
The main difficulty that people have had in the past is how to replace all strings in the code. And also how to separate out the important strings from the unimportant ones.
In python for example you may need to add a wrapper function like _("something") around each translatable string (ones that get displayed to the user).
Thanks for the tip. Well this is why I've implemented definition files (done only for 0.5 yet) that contain the information where to replace the strings (file and string/line number) so no changes are required by the vs devs. Just include a new definition file while the language files have a version compatibility var. So you have a language file for each language and for each version. So far the plan.

f.e.

french_0-5-0
french_0-6-0
german_0-5-0
german_0-6-0


This does not include mods but could be easy extended to work with em.

I hope to get a 0.1 release ready next week.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: Vega Strike Translation Tool

Post by chuck_starchaser »

If it includes mods, we could use it for PU. I could make a Spanish translation in no time.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: Vega Strike Translation Tool

Post by ace123 »

File and string number sounds dangerous.

What if we edit one of the python files and add a string to the top like even a debug statement, or even drastically change this?

I don't want your work to go to waste because the line numbers changed and suddenly when 0.5.1 is released, everything is incompatible.
dergringo
Star Pilot
Star Pilot
Posts: 7
Joined: Wed Oct 15, 2008 5:23 pm

Re: Vega Strike Translation Tool

Post by dergringo »

ace123 wrote:File and string number sounds dangerous.

What if we edit one of the python files and add a string to the top like even a debug statement, or even drastically change this?

I don't want your work to go to waste because the line numbers changed and suddenly when 0.5.1 is released, everything is incompatible.
Good point! I added the abilitiy to use pattern files. Here you can see an example of vegastrike_0-5-0.py

Code: Select all

pattern = {
   "bases/bartender.py": [
        {"id":"babar0","ln": 5, "re": "\"\""},
        {"id":"babar1","ln": 6, "re": "\"\""}
    ]
}
Where id is the string used in the language file. ln is the line number and re the regex pattern.

And the example in the language file vegastrike_0-5-0_english.ini

Code: Select all

[description]
# The English language string
language: english

# The same string translated
language2: english

# Make sure a pattern file for the following mod/version combinition  is given

# If this file is for a specific mod then add the string here. If it's for Vega Strike leave it empty or write 'vegastrike' NOT IMPLEMENTED YET!
# mod: vegastrike

# The version which can be translated using this file
version: 0.5.0

[translation]
# The ids have to match the ones in the pattern file.

# bases/bartender.py
babar0: Hey, pal. What'll it be?
babar1: Bottoms up for ye olde bartender, eh?
This combination of pattern and language files makes it easy to modify the app for mods and newer versions. It also adds the ability to translate older versions (in a special case where this may be required).

I have an open ear for any better solution. This is just my idea to keep it as flexible as possible. Please let me hear your suggestions!
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: Vega Strike Translation Tool

Post by ace123 »

I am still a bit confused about this:
{"id":"babar0","ln": 5, "re": "\"\""},
I was expecting something more along the lines of traditional translation systems where it's just {"string": "translated string", ...} and every time it sees "string" it replaces it with "translated string".

Maybe it is worthwhile also including the original string as one of the fields in your pattern file. Redundant information is better than too little information as far as I'm concerned (probably even worth the expense of possibly another megabyte of extra data).
Even if you don't use the original string now, this field can do some error checking to ensure that you don't replace the wrong string (and print out a message if they do not match). In addition, in the future if the translation system is to be updated/changed then it will be easy to do without having to look at the diff between versions and have a complicated parser.
MC707
Venturer
Venturer
Posts: 555
Joined: Sun Jan 18, 2009 5:18 am
Location: Quito, Ecuador.
Contact:

Re: Vega Strike Translation Tool

Post by MC707 »

sorry I come a little late, but is this translation tool done...? (yes I know it is highly unlikely)
My Machine: OS: Ubuntu 8.10 (intrepid) 64 bit in a 500GB Maxtor HD @ 7200 RPM, Windows Vista PsyChoses Edition 2009 32 bit in a 500GB Samsung HD @ 7200 RPM CPU: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GPU: nVidia GeForce 9400 GT @ 1024 MB RAM: 3891 MB
Earthlings|The End of the Internet?|FreeWebsite
Obu
Merchant
Merchant
Posts: 34
Joined: Thu Dec 22, 2005 9:30 am

Re: Vega Strike Translation Tool

Post by Obu »

And I'm coming even later...

As I seen no news on this topic from now 4 years, I guess it is off, right ?

I'm currently trying to translate for french players and this project presented here just sounds very nicely ! The incursions I made in the files and folders made me afraid as I fell alone on this translation... and when I see all the files and the way the text to modify is spread through out so big and numerous txt, dat, py and other stuff, I hope not to give up to fastly :lol:

Here is the discussion for french translation I found and I follow for this : http://forums.vega-strike.org/viewtopic ... 57#p134257. So if there is any news here, I'll be happy to hear about :)
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Vega Strike Translation Tool

Post by TBeholder »

What's wrong with gettext? It's pretty much standard. All the framework is there long ago, including Python libraries.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Vega Strike Translation Tool

Post by klauss »

TBeholder wrote:What's wrong with gettext? It's pretty much standard. All the framework is there long ago, including Python libraries.
We just don't use it. It *would* need some love getting it to work consistently across all the data files we've got, but it might be worthwhile. Just need some patches ;)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Hekaton
Star Pilot
Star Pilot
Posts: 5
Joined: Sun Jul 06, 2014 1:28 pm
Location: Graz, Styria, Austria

Re: Vega Strike Translation Tool

Post by Hekaton »

Greetings!

The spring has gone and we are sweating (at least here in europe) and so it´s later again. ;-)
Is there anyone who has some experience with gettext, some pros, some contras?
I think it would be realy good if there was VS at least in spanish, french and german (and of course maybe some new records of voices, the accent of "In death alone is there room for your kind" sounds unwillingly funny, but that´s rather a task for the native speakers, isn´t it?
If there´s need for some accent(s) though I could "decorate" the german version with any kind of austrian dialect. ;-)
Unfortunately I don´t know much programming at all so I could only translate texts, not code.
So, anybody outthere needing help with translating into german?

So far, CU!
greendreamer
Trader
Trader
Posts: 29
Joined: Tue Nov 06, 2012 11:10 pm
Location: North of France

Re: Vega Strike Translation Tool

Post by greendreamer »

Hello Hekaton,

In the french forum, we have begun internationalization with gettext :
http://forums.vega-strike.org/viewtopic ... 50#p136341
You can see our way of doing on the wiki :
http://wiki.vega-strike.org/Development:Translations
and the results on Costalfy's github repository :
https://github.com/costalfy/Vega-Strike

We (ezee, VsObu, costalfy and I) have begun to add gettext tags around all in-game texts in the code (on the github version). Costalfy has extracted it in a .po file, and we are translating all these texts in french with poedit.
I think you could ask for an access to the Github to Costalfy, and then begin a german translation (we have now 1392 strings to translate from english to other langages). We could help you implement the new translation if you need.

Currently, our main problem is to add internalization in the C++ code.
ezee had found how to add and manage it in the game, but his post is (I hope temporarily) lost probably because of an encoding problem, as a lot of french ones.
We have not worked on this project for about one month, but I'll see if we could reactivate it.

See you soon.
Greendreamer
greendreamer
Trader
Trader
Posts: 29
Joined: Tue Nov 06, 2012 11:10 pm
Location: North of France

Re: Vega Strike Translation Tool

Post by greendreamer »

Hi all,
The Vega Strike internationalization project is almost stopped, now.
ezee and Costalfly seem to be gone elsewhere. We will continue translations with Obu, but neither he nor I are C++ developers.
And we need one to create a language menu in the homepage, and test what we've already done.
If someone with C++ skills, time and enthusiasm passes here, it will be a great pleasure to work with him/her.
For now, I'll continue to traduce the .po file, and begin to include the code at the beginning of Python and C++ modules, to call gettext in these files (it should be in my reach. ;-P ).

Hekaton, if you (or another German player) passe here one day soon, I've created a german .po file in the github repository.
https://github.com/costalfy/Vega-Strike
You only have to
- download and install poedit,
- open the .po file (in /data/i18n/de/LC_MESSAGES/),
- select an english text and...
- translate it at the bottom of the screen.
(and save, and push your modifications on the online repositoriy, of course! ;-) ).

See you soon!
Greendreamer
Obu
Merchant
Merchant
Posts: 34
Joined: Thu Dec 22, 2005 9:30 am

Re: Vega Strike Translation Tool

Post by Obu »

Hi Green (and the others !)

thanks for these informations, as you noticed I'm not present at the moment to help on this project... but I'm always ok to participate, just need to find some time for myself.

I'll have to have a look in the progress you made in the translation, it makes some time now...

Bests ;)

OBu
greendreamer
Trader
Trader
Posts: 29
Joined: Tue Nov 06, 2012 11:10 pm
Location: North of France

Re: Vega Strike Translation Tool

Post by greendreamer »

Hi Obu,

It's cool that you're still motivated. :D
You can work on the translation when you have the opportunity. There's no need to hurry.
I'll see what I can do with python files to include gettext.
When you're ready, don't hesitate to ask for help if needed.

All the best.
Greendreamer
Post Reply