The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 10, 2024, 01:03:51 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  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 14366 times)
GDP_Spaceman
Zebranky food
*
Offline Offline

Gender: Male
Posts: 23


SC2 for ever!!


View Profile WWW
Re: Star Control 2 Localization
« Reply #30 on: February 08, 2005, 04:48:48 pm »

The project is here:
http://developer.berlios.de/projects/sc2de

The CVS tree is here:
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/sc2de/Sternkontrolle/
Logged

It's time for a german SC2 Smiley
Project page at http://www.gdp-gameware.de
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Star Control 2 Localization
« Reply #31 on: February 08, 2005, 05:31:36 pm »

Which version of UQM does this correspond to?

Also, I noticed this in your README:
Quote

AT LEAST YOU THINK THAT.

However you are looking at the contents of a compromised CVS server.
Audit your source, audit the server, change passwords.

_I_ didn't do anything but put that message here.
 
But you don't know, what _others_ did.
 
FIX THAT HOLE! PLEASE!


Logged

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

Gender: Male
Posts: 23


SC2 for ever!!


View Profile WWW
Re: Star Control 2 Localization
« Reply #32 on: February 09, 2005, 12:43:29 pm »

It's version 0.33, but the last update is two weeks ago...
And there are changes in a couple of files, so it's better you look only
for the text in the source files, the text files (race, lander, etc.), the
menu-png files (there are some png with text) and the font-png files.

But if you give me the structure for the language package or how it must
looks like, then i build the german package for you.
Logged

It's time for a german SC2 Smiley
Project page at http://www.gdp-gameware.de
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Star Control 2 Localization
« Reply #33 on: February 20, 2005, 05:09:33 am »

I've just committed code for unicode support (output is almost complete; still have to start on input).
The game will now interpret all strings as UTF-8. The file names of the font characters should be the (decimal) number of the character in the unicode table (see http://www.unicode.org/charts/.
For German this is the same as latin-1, so no change is needed there. All the .txt files need to be converted though. On unix this can be done with this command (run in the content dir):
Code:
for FILE in `find . -name "*.txt"`; do iconv -f latin1 -t UTF-8 < $FILE > $FILE.tmp && mv $FILE.tmp $FILE; done


As for how I'd like it to be packaged:
I'd like to have two separate .zip files; one for the fonts (which can be shared with other translations), and one for the other content files.
The .zip files should contain only the files that differ from the main branch and have the same structure as the normal content dir (empty directories may be omited), with at the root the files and directories like comm, lbm, etc (so no directory content/ itself).
If you want to replace .ogg files, don't compress them in the .zip file. With unix zip you can do this by supplying '-n .ogg'.
You can then use them as any other addon (make sure to give them a file higher in the alphabet than uqm-0.3-content.zip if you put them in packages).
If you package them like this, I'll add them (unzipped) to the cvs repository, in separate directories.

For the strings that are hardcoded in the game, I can unfortunately do nothing at this time. Eventually almost all will be moved to the content (the exception would be strings that need to be available when no content language can be loaded).

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 #34 on: February 20, 2005, 04:59:10 pm »

That's good but how we will deal with UTF-8 strings in MakeReport (sc2code/planets/report.c). I mean the isgraph() call. It just won't work for UTF-8 characters, and even doing setlocale("ru_RU.UTF-8") (or whatever other language) won't help, because isgraph gets just one character.

Maybe the code could be modified to not depend on the locale in general. In this case the setlocale() code could be removed from InitLanguage() (or just use setlocale (LC_ALL, "") instead of InitLocale().
Logged

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

Posts: 2847



View Profile
Re: Star Control 2 Localization
« Reply #35 on: February 20, 2005, 08:02:32 pm »

I haven't got the time at the moment to fix this, but I'll probably replace this by something like
Code:
wchar_t ch;
do {
   ch = getCharFromString(&pStr);
} while (iswgraph(ch));

There are a few other places that need still need some attention too.

As for the locale: Setting the locale isn't needed for iswgraph() to work correctly. The only effect on UQM of setting the locale, for as far I can think of, would be that system error messages (the output of strerror()) would be in the correct language. But there's something to be said for that if people want that, they can set the locale themselves.
We could also use the already set locale to determine the default language to use.
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 #36 on: February 21, 2005, 07:18:40 pm »

I don't see much sense to make sc2 dependent on a completely new layer here (e.g. of the unicode API). This may harm portability for no apparent reason.

The only reason for using isgraph() there seems to skip spaces, tabs and newline chars. So I'd  propose something alot simpler:

while (*pStr <= ' ')
 pStr++;

This won't affect UTF-8 characters because they are always >= 128.

And about setlocale - yes, I think doing setlocale (LC_ALL, "") would be the right thing to do now. Setting locale to anything different from the current locale (as it is done right now -- reading the locale from locale.txt) may cause wrong strings coming out of strerror etc. If you remember, initialy my patch used LC_CTYPE rather than LC_ALL Smiley

Logged

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

Posts: 2847



View Profile
Re: Star Control 2 Localization
« Reply #37 on: February 21, 2005, 09:52:47 pm »

A start to introducing unicode to UQM was already in the code by the time it was handed off to us (which was disabled, and used wide chars everywhere, while I chose to use UTF-8 so that all the standard string functions could be used). As a consequence I never considered making unicode support optional. Perhaps I should have. I may still do it one day.
But it's pretty portable as it is. You only need wchar_t ('typedef unsigned short wchar_t' will do), and now then perhaps iswgraph() ('static inline int iswgraph(wint_t ch) { return ch > 0x7f || isgraph((int) ch); }' ought to do the trick) if you don't have wchar and iswgraph() natively (I'll add checks).
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
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!