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.

Vega Strike Translation Tool

Postby dergringo » Thu Oct 16, 2008 11:03 am

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!
dergringo
Star Pilot
Star Pilot
 
Posts: 7
Topics: 2
Joined: Wed Oct 15, 2008 10:23 am

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: Vega Strike Translation Tool

Postby chuck_starchaser » Sun Oct 19, 2008 7:04 pm

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.
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal

Re: Vega Strike Translation Tool

Postby dergringo » Mon Oct 20, 2008 11:31 am

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 7:31 am, edited 1 time in total.
dergringo
Star Pilot
Star Pilot
 
Posts: 7
Topics: 2
Joined: Wed Oct 15, 2008 10:23 am

Re: Vega Strike Translation Tool

Postby ace123 » Mon Oct 20, 2008 4:23 pm

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).
ace123
Lead Network Developer
Lead Network Developer
 
Posts: 2560
Topics: 32
Joined: Sun Jan 12, 2003 2:13 am
Location: Palo Alto CA

Re: Vega Strike Translation Tool

Postby charlieg » Mon Oct 20, 2008 5:05 pm

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
User avatar
charlieg
Elite Mercenary
Elite Mercenary
 
Posts: 1328
Topics: 56
Joined: Thu Mar 27, 2003 4:51 pm
Location: Manchester, UK

Re: Vega Strike Translation Tool

Postby loki1950 » Mon Oct 20, 2008 5:35 pm

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 18/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 DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5723
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: Vega Strike Translation Tool

Postby dergringo » Tue Oct 21, 2008 5:29 am

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.
dergringo
Star Pilot
Star Pilot
 
Posts: 7
Topics: 2
Joined: Wed Oct 15, 2008 10:23 am

Re: Vega Strike Translation Tool

Postby chuck_starchaser » Tue Oct 21, 2008 8:37 am

If it includes mods, we could use it for PU. I could make a Spanish translation in no time.
User avatar
chuck_starchaser
Elite
Elite
 
Posts: 8014
Topics: 195
Joined: Thu Sep 04, 2003 9:03 pm
Location: Montreal

Re: Vega Strike Translation Tool

Postby ace123 » Fri Oct 24, 2008 2:25 am

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.
ace123
Lead Network Developer
Lead Network Developer
 
Posts: 2560
Topics: 32
Joined: Sun Jan 12, 2003 2:13 am
Location: Palo Alto CA

Re: Vega Strike Translation Tool

Postby dergringo » Fri Oct 24, 2008 7:38 am

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!
dergringo
Star Pilot
Star Pilot
 
Posts: 7
Topics: 2
Joined: Wed Oct 15, 2008 10:23 am

Re: Vega Strike Translation Tool

Postby ace123 » Mon Oct 27, 2008 3:00 am

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.
ace123
Lead Network Developer
Lead Network Developer
 
Posts: 2560
Topics: 32
Joined: Sun Jan 12, 2003 2:13 am
Location: Palo Alto CA

Re: Vega Strike Translation Tool

Postby MC707 » Thu Feb 05, 2009 11:15 pm

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
User avatar
MC707
Venturer
Venturer
 
Posts: 555
Topics: 14
Joined: Sat Jan 17, 2009 10:18 pm
Location: Quito, Ecuador.

Re: Vega Strike Translation Tool

Postby Obu » Wed Jan 08, 2014 4:13 pm

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 : viewtopic.php?f=17&t=2644&p=134257#p134257. So if there is any news here, I'll be happy to hear about :)
Obu
Merchant
Merchant
 
Posts: 34
Topics: 3
Joined: Thu Dec 22, 2005 2:30 am

Re: Vega Strike Translation Tool

Postby TBeholder » Sat Jan 18, 2014 12:22 am

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
User avatar
TBeholder
Elite Venturer
Elite Venturer
 
Posts: 747
Topics: 38
Joined: Fri Apr 14, 2006 7:40 pm
Location: chthonic safety

Re: Vega Strike Translation Tool

Postby klauss » Mon Feb 03, 2014 10:58 pm

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
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: Vega Strike Translation Tool

Postby Hekaton » Mon Jul 07, 2014 2:57 pm

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!
User avatar
Hekaton
Star Pilot
Star Pilot
 
Posts: 5
Joined: Sun Jul 06, 2014 6:28 am
Location: Graz, Styria, Austria

Re: Vega Strike Translation Tool

Postby greendreamer » Wed Jul 16, 2014 2:28 pm

Hello Hekaton,

In the french forum, we have begun internationalization with gettext :
viewtopic.php?f=17&t=2644&start=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
User avatar
greendreamer
Trader
Trader
 
Posts: 29
Topics: 2
Joined: Tue Nov 06, 2012 4:10 pm
Location: North of France

Re: Vega Strike Translation Tool

Postby greendreamer » Fri Oct 10, 2014 11:20 am

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
User avatar
greendreamer
Trader
Trader
 
Posts: 29
Topics: 2
Joined: Tue Nov 06, 2012 4:10 pm
Location: North of France

Re: Vega Strike Translation Tool

Postby Obu » Fri Oct 10, 2014 4:07 pm

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
Obu
Merchant
Merchant
 
Posts: 34
Topics: 3
Joined: Thu Dec 22, 2005 2:30 am

Re: Vega Strike Translation Tool

Postby greendreamer » Tue Oct 14, 2014 4:41 am

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
User avatar
greendreamer
Trader
Trader
 
Posts: 29
Topics: 2
Joined: Tue Nov 06, 2012 4:10 pm
Location: North of France



Return to Translation Support Infrastructure

Who is online

Users browsing this forum: No registered users and 2 guests

cron