|
From: Kevin A. <al...@se...> - 2002-01-22 21:49:07
|
> From: Neil Hodgson
>
> > I'm already inclined to have an
> > 'international' or 'localized' folder where the resource files
> other than
> > the default English, United States file are stored to reduce clutter.
>
> A folder containing ancillary files is reasonable. I read some
> of the OS
> X development documents a few months ago and thought the way it used
> directories to hold applications was very good although I can't
> remember the
> details.
> It'd be sensible to avoid assuming that US English will be the original
> language for all applications.
Actually, the code I added will just use the default resource file
regardless of the default locale setting for language and/or country.
Continuing with the minimal sample, if someone had created minimal.rsrc.py
in German and I ran that on my system (English, United States, en_US) I
would see the German unless I provided a minimal.en_US.rsrc.py or
minimal.en.rsrc.py file to match my locale.
Hmm, I wonder if we could get bit by case-sensitivity on some OS platforms?
Probably not as long as we don't support a country-specific resource file
naming that only specifies the country code, aka minimal.US.rsrc.py
The code does not deal with the case of the user supplying the resource file
name as part of the initialization. For example, here's an alternative
startup in SourceForgeTracker.py
app = model.PythonCardApp(Tracker,
'SourceForgeTracker.original.rsrc.py')
I left the option of overriding the default to simplify having a separate
resource based on OS platform or if you wanted to easily test a variation of
a layout. If we do support platform-specific naming conventions for resource
files, then the resource file name rules will need some tweeking.
Lately, I have been thinking that we should drop the .py file extension
since the resource files are not executable, but then we wouldn't be able to
use import instead of eval(), or would we? Would a .rsrc extension conflict
with an existing extension on Linux, Windows, Mac? If we move to XML
eventually, then the extension should be .xml. Details to decide on another
day.
ka
|