language packs?

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.

language packs?

Postby boeser.wolff » Fri Sep 15, 2006 8:45 am

There are now several translations of Vegastrike underway. The method for now seems to be to translate single files and replace the original ones. Why dont we bundle these replacement files into a language pack for each language for which a translation is available/is being done.
The idea is to move all files that are going to be translated out of the "main" VS-package/data and provide some language packs instead.
This would probably require some branching in SVN, but instead of replacing several files in a VS installation, the user could just pick the language pack of his choice and install that one.
boeser.wolff
Hunter
Hunter
 
Posts: 93
Topics: 20
Joined: Tue Jul 29, 2003 1:05 am

Share On:

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

Postby plueschinger » Fri Sep 15, 2006 8:25 pm

Hello

At the moment the best is, I think to write a little shell script or whatever, which you start before the vegastrike executive (binary), which copies the language dependent files in their
directories, then you don't need to start it again, only if you want to change the language again, that would be my idea, and I like simple solutions, if I have to write them, later other people can make it better.

There is also an expererimental idea from me with the file "/languages/languages.py", who controlls at least the python files, in this stage only the bartender and the missions.
The textstrings are separeted from the original files.
You can download it there:
http://vegastrike.sourceforge.net/forum ... php?t=7118

So in this example you have
/vegastrike/languages/languages.py -> a control file, where you can choose your language
/vegastrike/languages/bartendergerman.py
/vegastrike/languages/bartenderenglish.py
/vegastrike/languages/dynamic_missions_de.py
/vegastrike/languages/dynamic_missions_en.py
/vegastrike/bases/bartender.py -> without textstrings
/vegastrike/modules/dynamic-missions.py -> without textstrings

It works fine on all testing computers, but it's just an experiment

The real problem is, that the translation part of vegastrike is like an abandoned child.

Regards
plueschinger
User avatar
plueschinger
Confed Special Operative
Confed Special Operative
 
Posts: 348
Topics: 28
Joined: Thu Apr 13, 2006 6:41 pm

Postby Zeog » Sat Sep 16, 2006 7:46 am

What is being done at the moment is rather a work-around than a serious attempt to provide i18n. (I think one of my first posts in these forums was a request for a decent i18n infrastructure.) Translating the text strings in the csv and some python files isn't all that needs to be done. There are many text strings hardcoded within the engine in almost every source file, for example for the HUDs.
The way i18n is being done at the moment would then require to go through all the source files, translate strings and a "make vegastrike" from the translated source. With a lot of effort one can do that once, but as the code changes in SVN, I doubt that it is a lot of fun mergin the changes and not losing sync. Then the question arises if it is really a good idea to have the code multiple times for every language. Furthermore, I believe all the translated versions of the master_part_list.csv are already out of sync.

The only reasonable way of handling that, which I can think of at the moment, is by handling this with gettext. What this basically does is this: Every string anywhere in the source is flagged by replacing "foo bar" with _{"foo bar"}. this is easy and quick. Then the gettext utilities extract them and generate a string collection which is then to be translated. There exist tool that help with that process, like Kbabel. From that another utiliy generates "code" which can then be dynamically loaded by the VS engine without the need of recompiling. Translators can then do translating and not digging through code finding strings which is one of the reasons nobody want's to translate things. It's not a pleasant acivity.

A different attempt, like what I think you propose, i.e. recoding everything such that strings are not directly used in the source but loaded from a string library which gets selected dependent on the configuration, would require a tremendous amount of recoding and the support of this method by the ones that do a lot of coding but rarely show up in the forums.

gettext is relatively quick and easy to incorporate at this point of time.
Zeog
ISO Party Member
ISO Party Member
 
Posts: 453
Topics: 13
Joined: Fri Jun 03, 2005 3:30 am
Location: Europe

Postby plueschinger » Sat Sep 16, 2006 4:46 pm

Hello

@Zeog
I know about gettext, and I think you want .po files, but I don't want to translate the starting messages of the game.
masterpart_list.csv translates all the buying and selling cargo, buying and selling ships and
upgrading the ships.
Image

bartender.py translates all the stuff, the bartender talks.

dynamic_missions.py translates all the missions.Image
The left side has to be translated too, it's not a problem, I just wa too lazy until now.
/communications/.....faction/xml translates all the communications between the pilots.
Image
I need a betteer screenshot for the above one, this was just a test to show that you can add german language.

and /dynamic_news.py which is not translated, gives the news.
I add a screenshoot soon.
So I don't see any more real important files for the spoken words, that you see in the game.

O.K you're right in the bar, if you accept a mission, I can't change the bottom from "Yes"
to "Ja", but this are smaller things.
It is really boring to translate 300 sometimes silly answers from a bartender, with bad english, american humour, or a strange funny descriptions of some cargo, so we should be glad that some people did it.

And like I told this is very experimental and like an abandoned child.

Regards
Plueschinger
User avatar
plueschinger
Confed Special Operative
Confed Special Operative
 
Posts: 348
Topics: 28
Joined: Thu Apr 13, 2006 6:41 pm

Postby Zeog » Sun Sep 17, 2006 9:01 am

Yes, one can tackle a big deal of the translation by translating the master_part_list and digging through the python files translating texts there. I bow to you for doing that.
What I was talking of is the big rest, not only texts in graphics ("JUMP") and the buttons ("Load/Dave", "Done"), but for instance "Credits", "Space left: 0 of 100", "Cargo Volume", "Mass", "Active Missions", "Guns", "Missles", "Distance: 0.08 Light Seconds" -- stuff like that.

plueschinger wrote:[...]we should be glad that some people did it.
Yes, indeed, and we should support that by not requiring people to dig through python and c++ code.
Zeog
ISO Party Member
ISO Party Member
 
Posts: 453
Topics: 13
Joined: Fri Jun 03, 2005 3:30 am
Location: Europe



Return to Translation Support Infrastructure

Who is online

Users browsing this forum: No registered users and 1 guest

cron