The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 06, 2022, 12:12:04 am
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  Star Control 2 Localization
« previous next »
Pages: [1] 2 3 Print
Author Topic: Star Control 2 Localization  (Read 13729 times)
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Star Control 2 Localization
« on: November 12, 2004, 06:05:48 pm »

Hello!

I know you guys don't want to make any serious modifications to UQM until the 1.0 release, but I and my friends just can't wait Smiley and the potential gain (IMHO) from the proposed changes is very noticeable, while the changes themselves are very simple. So I thought it would be good to ask your opinion on this.

My daughter likes the game alot, but alas he doesn't know English Smiley Also some of my frends that even know English to some extent won't play the game because they have to think hard on every phrase, and this is not fun at all; at the same time they like the game as a whole.

So I thought a little localization for the game would help spread the word about the game, and - who knows - bring new developers to help.

---

Now about the actual implementation. I thought it wouldn't be too intrusive to make it possible to translate at least the most important parts of the game to other languages. In general, the main part that matters most is the text of the dialogs. And since dialogs are separated into text files, and also every letter is separated into a .png file, it is possible to just create subdirectories like en/ de/ fi/ and so on under the same directory where text and font files are placed, and put the additional font characters and localized text files there. Something like this (I don't have the source tree at hand, so I may misspell some file names here):

065.png (letter 'A')
066.png (letter 'B')
mycoon.txt

ru/mycoon.txt (russian dialogs)
ru/128.png (cyrillic letter 'A')
ru/129.png (another cyrillic letter)

de/mycoon.txt (German dialogs)
de/155.png (some german letter)
de/159.png (perhaps another german letter)

The code will have to be modified just a little:

First there should be a command-line argument to switch to a specific language (--lang=ru), also it would be good to have some platform-specific function like GetUserLanguage() to fetch current language from environment (LANG), registry and so on. The default implementation can just return "en".

Then the dialog loader will have to be modified so that it first looks under the $LANG/ directory for the respective text file, and if it is not found, load the default (English) file. Same about the font loader - it will have to load all characters that are in main directory and additional characters that possibly are under the $LANG/ subdirectory.

These simple modifications already will allow translators work to begin. What do you think of the idea?
Logged

Greetings,
   Andrew
PRH
*Many bubbles*
***
Offline Offline

Gender: Male
Posts: 209



View Profile
Re: Star Control 2 Localization
« Reply #1 on: November 13, 2004, 02:44:20 am »

There was a Russian translation project for UQM before. I don't know how does it fare now, but I have decided to participate in it once, and translated some conversations for the Ur-Quan, but abandoned it very soon. Maybe I'll return to it later though. Smiley
« Last Edit: November 13, 2004, 02:48:36 am by PRH » Logged
tfwo
Zebranky food
*
Offline Offline

Posts: 8



View Profile
Re: Star Control 2 Localization
« Reply #2 on: November 13, 2004, 11:09:09 am »

I think the .png "fonts" are a serious problem. How can one bind specific symbols to png-letters? Then there's a whole charset mess...

I think the best approach would be to give some truetype love for the dialog engine (looking there right now), then we can simply translate the messages with help of unicode and put all different fonts and nice utf-8 encoded messages into language-packs. Umm, Utopia...
Logged
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Re: Star Control 2 Localization
« Reply #3 on: November 13, 2004, 09:06:57 pm »

There's no need to get involved in that TrueType madness... Its a lot simpler than that.

The character images are called like 42.png, 64.png and so on. You just have to provide your characters with the names corresponding to the code of the character, and ensure all text in one language is written using same encoding, thats all. The code 128 may mean one letter in a language, and a totally different letter in a different language - it's not a problem at all, since the letter images will be placed under ru/, de/, fi/ and so on directories.

Forget Unicode, TTF and all other buzzwords - they will take a lot of time and pay nothing.
Logged

Greetings,
   Andrew
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Re: Star Control 2 Localization
« Reply #4 on: November 13, 2004, 09:23:03 pm »

Just read that old thread about translation and have some comments.

First, it is a bad thing that the XML translation is put as a obstacle for the translators. If the XML translation will be eventually automated, it's not a problem to translate several sets of files instead of one.

Second, the game can just have zero knowledge about Unicode, UTF-8 and so on. Every language can choose an appropiate (single-byte) encoding, and draw the appropiate character PNGs with appropiate filenames (which are derivates of the character code). Also, if input will be desirable, the appropiate keyboard mapping will have to be done somewhere (not a priority task though).

For languages with more than 255 characters it is possible to use something simple to decode like UTF-8. Then we'll have just more characters to load, thats all.

Right-to-left scripting is something totally unknown to me, but I presume this also can be defined as a per-language attribute, and the text renderer will have to be slightly modified to account for that. Not a top priority task (for me, at least) though.

Okay, I'll try to start doing something this evening and see what problems will pop up.
Logged

Greetings,
   Andrew
tfwo
Zebranky food
*
Offline Offline

Posts: 8



View Profile
Re: Star Control 2 Localization
« Reply #5 on: November 14, 2004, 08:24:55 am »

Yep, looks like trutype will not payoff. Agreed... Still some work is required to draw the per-font per-language letters. In which case, a lang-pack will contain, additional letters for png's, the translated messages and maybe the translated voices (loading of the former two needs implementation?)

Unicode also is out of the ground, because utf-8 and utf-16 are multibyte encodings and I think they're unusable, if a character is picked by it's byte number. This is ok for most european languages though to use iso-* charsets...

Update: looks like the game does not even need to know about lang-packs -- the addon-loader is supposed to _replace_ files from content packages with files from the addons, right? Smiley I think it can replace just anything: fonts, txts, pics (like the ones used in game menu).
« Last Edit: November 14, 2004, 08:57:20 am by tfwo » Logged
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Re: Star Control 2 Localization
« Reply #6 on: November 14, 2004, 03:11:20 pm »

Quote
Unicode also is out of the ground, because utf-8 and utf-16 are multibyte encodings and I think they're unusable, if a character is picked by it's byte number. This is ok for most european languages though to use iso-* charsets...


Well, it's not so straight-ahead as using single-byte encodings but still it's achievable. UTF-8 is an encoding that use bytes, and the upper half of the code table (128-255) are really prefixes, and you can easily decode UTF-8 characters to a code in the range 0 ... 2^31-1.

However, multi-byte character set support is not a stringent need right now, it can be added later if the translation project turns to be viable.

Quote
looks like the game does not even need to know about lang-packs -- the addon-loader is supposed to _replace_ files from content packages with files from the addons, right?  I think it can replace just anything: fonts, txts, pics (like the ones used in game menu).


Yes, looking at uio_mountDir procedure in io.c, it has options to mount a zip file on top of a existing virtual directory, I think that's exactly what we want. And mountContentDir() function actually uses this option, so addons will perfectly suit our needs. So basically the --lang switch will be equivalent to --addon.
« Last Edit: November 14, 2004, 03:13:20 pm by zap » Logged

Greetings,
   Andrew
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Star Control 2 Localization
« Reply #7 on: November 14, 2004, 04:04:18 pm »

Quote
Yes, looking at uio_mountDir procedure in io.c, it has options to mount a zip file on top of a existing virtual directory, I think that's exactly what we want. And mountContentDir() function actually uses this option, so addons will perfectly suit our needs. So basically the --lang switch will be equivalent to --addon.

If you're going to do it this way you don't even need a separate switch. You could use --addon and make a package that works even with the current release.

I'm the one who wrote uio btw.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Re: Star Control 2 Localization
« Reply #8 on: November 14, 2004, 09:00:57 pm »

Ah it looks nice indeed. I wrote once ago a very similar system called VFS (Virtual File System) for the Crystal Space project Smiley

I agree the --lang option could be avoided. I will try to take this route and see if no new problems will pop up..

---

Okay, here's the first problem. The addons are mounted with the uio_MOUNT_BELOW option, which means, addons can't override files from the base content. This is very bad not only from the localization point of view. Any special reasons to use the BELOW option instead of the uio_MOUNT_ABOVE? Also the base content dir is mounted as uio_MOUNT_TOP; I think it would be better to have it mounted as uio_MOUNT_BOTTOM although it shouldnt matter (or TOP/BOTTOM are absolute? or they have effect only at the uio_mountDir time?)
« Last Edit: November 14, 2004, 11:32:58 pm by zap » Logged

Greetings,
   Andrew
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Star Control 2 Localization
« Reply #9 on: November 15, 2004, 01:10:32 am »

Quote
Ah it looks nice indeed. I wrote once ago a very similar system called VFS (Virtual File System) for the Crystal Space project Smiley

Heh. VFS was the first name I thought of using too, as it describes the system best. But I considered that too confusing as it's used in many places, including in the Linux kernel itself.

I have created a page on the Ultronomicon which describes uio from a user's perspective, on http://uqm.stack.nl/wiki/index.php?title=Content_Management.

Quote
Okay, here's the first problem. The addons are mounted with the uio_MOUNT_BELOW option, which means, addons can't override files from the base content.

This is only a problem if you use the content unzipped. If you use zipped content, the .zip files will be in the content/packages dir, which you can override.
It was an intentional design decision. The idea was that people should use the .zip files still zipped, and to use separate files only where you want to override the packages.
But I agree that it can be a problem in some circumstances, like for people who run the game directly from CVS (like myself), or for distributions that for some reason or another extract the .zip files (like Debian).
I have been planning on doing it a bit differently in a future release. Stay tuned.

Quote
Any special reasons to use the BELOW option instead of the uio_MOUNT_ABOVE? Also the base content dir is mounted as uio_MOUNT_TOP; I think it would be better to have it mounted as uio_MOUNT_BOTTOM although it shouldnt matter (or TOP/BOTTOM are absolute? or they have effect only at the uio_mountDir time?)

uio_MOUNT_TOP and uio_MOUNT_BOTTOM are absolute. uio_MOUNT_ABOVE and uio_MOUNT_BELOW specify that the new mount should end up directly above cq. below the mount specified in the 9th argument.
And indeed, this refers to the locations at mount time. If later another directory is mounted below the same location, then it will end up above one that was mounted below that location earlier.
« Last Edit: November 15, 2004, 01:14:02 am by meep-eep » Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Re: Star Control 2 Localization
« Reply #10 on: November 15, 2004, 03:39:58 pm »

Thanks for clarification. I'm indeed running the CVS version, so I did a temporary hack to mount the addon packages with the ABOVE flag, and it works okay now. Waiting to see what solution will you propose in the next version Smiley

After that everything worked as by magic... I just added some dummy character images with codes above 128 under the respective .fon directories, and translated some text to Russian... it worked! The only problem I've encountered so far is that the dialog history (the one that pops instead of the alien when you press Space) for some reason doesn't seem to like characters with codes above 128 (just skips them), although the text that displays above the alien is painted perfectly.

I almost finished a small tool that takes the .fon directory and combines all the characters on a single canvas, and saves it into a .PNG file; also it does the reverse process (e.g. splits one PNG into multiple characters). I hope I did not reinvent the wheel. I'll start painting the Cyrillic character set as soon as time will permit, there are a lot of fonts to draw, luckily some Latin glyphs are same or very similar to some Cyrillic characters... that will simplify my job.

-------------

Okay, so I'm inviting everybody interested in the Russian translation of Star Control to start a discussion on the subject... I'd propose a irc conference, as the forums discussions proceed slow and if we disagree we can never came to a decision. For example, we can meet on irc.freenode.net, channel #uqm, I'll be there everyday from 12:00 to 24:00 Moscow time. If it makes sense, we can set up some dedicated Web page for this.

--------------

Another thing I wanted to ask knowledgeaboe StarCon people what special meaning have the names of some races... for example it was a nice surprise to discover the deciphering of the VUX name... are there any other hidden jokes inside names, etc?

I think race names are the first and one of the most important things to translate correctly. Sure, we can just transliterate, but this is not so good as it can be.
Logged

Greetings,
   Andrew
Art
Guest


Email
Re: Star Control 2 Localization
« Reply #11 on: November 16, 2004, 09:04:34 am »

The VUX aren't actually *named* Very Ugly Xenoforms (in English). That's just what Rand called them, and it's a rather forced joke (you never hear any other extraterrestrials or aliens being called "xenoforms").

The alien names do reference things in English, but most of them are rather obscure, except for Syreen being an obvious takeoff of "siren". (Not counting the ones that are actually supposed to be Greek words: "Mycon" comes from the Greek for "fungus", "Androsynth" "constructed man", "Slylandro" "sky man". See the stuff I've been saying on Ultronomicon about how Humans appear to have a convention of using Greek to name alien things.) "Ilwrath", I remember, comes from a Scottish friend of Paul and Fred whose last name was McIlwraith, "Yehat" seems to come from the Yeehat tribe of Indians in Jack London's Call of the Wild, "Melnorme" comes from singer Mel Torme (seriously), and so on. The references are obscure enough that I wouldn't worry about "translating" them, unless you're a really hardcore Tolkien-style linguist who wants to translate the words into words that "feel" the same way in Russian, which seems to me to be an impossible task. (As in, "Ilwrath" evokes "ill" and "wrath", and "Spathi" invokes "spastic" and "pathetic" and "pathology", and "VUX" invokes "vile" and "yuck" and "suck", so we have to find equivalent made-up words that correspond to the same set of *Russian* words... argh.)

My recommendation would be just to do a straight transliteration. (If you want to find a way to wrangle VUX so that it becomes an acronym in Russian, be my guest, but I'd rather just rewrite that story -- which isn't ever in the game's actual dialogue anyway.)
Logged
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Re: Star Control 2 Localization
« Reply #12 on: November 17, 2004, 07:35:01 pm »

Thanks for your in-depth reply, I'm impressed Smiley

I think I'll mostly go by transliteration, except some slight modifications where I can add a little expression by just adding/moving a letter and such. Sure, it's impossible to translate the feeling and the associative row, I just hope the translated names will have their own associations (and here's where a careful choice would help a little).

So what, are there any volunteers? I'm not in a urgent need, I can finish the whole translation task myself, but if anybody wants to feel himself -- even marginally -- involved in this task, I'll be glad to hear their opinions on #uqm, irc.freenode.net from 12:00 to 24:00 GMT+4 every day Smiley So far only Meep-Eep visited me there, just to tell me there's the #sc2 channel there too where The Real Guys are sleeping online Smiley
Logged

Greetings,
   Andrew
Babelfish
Zebranky food
*
Offline Offline

Gender: Male
Posts: 3



View Profile
Re: Star Control 2 Localization
« Reply #13 on: November 20, 2004, 01:17:22 am »

Hi all,

I was thinking about a spanish translation. I can manage pretty well with the translation itself, but I'm still a rookie in coding and don't know in depth the source of UQM yet.

The spanish case turns to be quite simple -at least compared to cyrilic languages-, as the special characters (á,é,í,ó,ú,ü and the one and only "ñ") are easy to obtain editing regular alphabet PNGs. So I was trying to translate the first dialogue scene -for easier playtesting- between Fwiffo and the Player. Already edited part of the txt file, and added to the spathi.fon folder new PNGs named according to the ASCII codes of the special characters above. However, there's something I'm missing, maybe related to the txt files coding, because the special characters still do not appear.

It may be a silly question, but I'd appreciate some indications on what's going wrong  Huh

Thanks in advance.
Logged
zap
Zebranky food
*
Offline Offline

Gender: Male
Posts: 15



View Profile WWW
Re: Star Control 2 Localization
« Reply #14 on: November 20, 2004, 03:24:57 am »

You can get a tool that I wrote for the purpose of making editing sc2 fonts easier here: http://cs.ozerki.net/zap/sc2-rus/, I've described it above. Also before converting I made a script that copied the glyphs with similar shape to the respective Cyrillic codes, you may try this too.

I already translated about half of the starbas.txt file and it works okay (Cyrillic characters have codes 192-255). The only problem I've encountered is that unpacked files (the whole share/uqm/content directory) has precedence over addons, so you have either to use a zipped main content (for some reason uqm-content-0.3-0.fdr.1.1.noarch.rpm didn't worked for me Sad ) or make a quick hack like me - in options.c line 313 change uio_MOUNT_BELOW to uio_MOUNT_ABOVE, and recompile. This will force addon files have priority over content files.
Logged

Greetings,
   Andrew
Pages: [1] 2 3 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!