[freespace2] support for polish version of freespace 2

Taylor Richards mtrs at bellsouth.net
Mon Mar 3 16:45:30 EST 2003


On Mon, 2003-03-03 at 14:02, Bradley Bell wrote:
> Quoting Taylor Richards <mtrs at bellsouth.net>:
> 
> > On Mon, 2003-03-03 at 05:31, rraptorr wrote:
> > > On 3 Mar 2003, Taylor Richards wrote:
> > > 
> > > > You can put a POLISH_BUILD in the Makefile just like the GERMAN_BUILD
> > > > and set the default Language to Polish in localize.cpp to avoid editing
> > > > the ini file by hand.  A few extra lines of code and another build
> > > > option but otherwise it might end up having to be added to the FAQ if
> > > > people start complaining.
> > > 
> > > Yes, I know this, but polish players still have to do something more than
> > > ./configure;make. Most people do this without thinking or reading docs.
> > > And with POLISH_BUILD they would have to recompile source.
> > 
> > Yeah, but they are going to have to read the docs anyway to figure out
> > why it crashes unless they add Language=Polish.  A build option would
> > help those who would do a quick look at the Makefile and skip the docs. 
> > A build option would also help anyone doing an installer since there are
> > no further steps to get the game running after installation.  I think
> > that for non-doc-readers it's going to suck either way.
> > 
> > For those using a pre-built binary they still have the option of editing
> > the ini file.  POLISH_BUILD is only going to set the preference of
> > language if not already specified rather that prevent changing it.  This
> > is just one of those cases where a launcher would come in handy since
> > you could just select the language from a list.
> 
> Why exactly does it crash?  I'm guessing because the data files themselves are
> different?  If they're different enough to cause a crash, surely there is a way
> to autodetect the language at runtime.

It's when it tries to parse the strings.tbl in localize.cpp (had this
problem with FS1 at one time) it looks for the particular language.  It
will search for the default (English/default) which may not exist in
this particular table and will crash if the language is not specifically
set in the ini file.  The German version will use German as default if
the option does not exist.  Without looking at the table I'm guessing
that it's layout is to blame.

You could pass a language to lcl_init() but you still have to set it
somewhere.  I suppose a command line option could be used to set the
language with lcl_init() but I don't know.  I looked (briefly) at
auto-detection with the German build, since I wanted to get rid of the
build option, but I didn't see a definite way to detect which version it
is in a way that is consistent.  GERMAN_BUILD does other things than
just set the language though which the Polish version may not need.


Taylor

-- 
Taylor Richards <mtrs at bellsouth.net>




More information about the freespace2 mailing list