Re: Translations of folder names - two proposals



On Sun, Dec 12, 2004 at 11:23 (-0500), Dan Winship wrote:
> Blah, meant to include this in the previous reply...
> 
> On Sat, 2004-12-11 at 12:07 -0500, Havoc Pennington wrote:
> > The symlink approach violates principles of good design:
> >  - it's not encapsulated; the implementation is leaked out and 
> >    essentially cut-and-pasted (e.g. rules for creating it, etc.
> >    replicated in every script/app)
> 
> The symlink approach may leak implementation details to developers, but
> the gettext approach is constantly in danger of leaking implementation
> details to the users.

Agreed. 

Also, any implementation details could easily be hidden in the same way
we could do for the gconf case, ie. by having a script telling us the
location of the dirs, but based on the symlinks instead of gconf or
gettext. Envvars have their own problems.

So with the symlinks approach:
- works for GNOME-users and could become and FDO standard
- works really simple for shell scripts
- is more flexible than gettext, as it enables you to put the Desktop
anyware you like

Sure, we should not optimize for the shell, but there if we can make the
shell interaction with default dirs easier without it being any
different for desktop users, why not do it? In other words - what is the
disadvantage of using symlinks for shell users?

Now, are there any interesting problems for the symlink approach?
Sure.

- user deletes ~/.gnome_dirs/Desktop (symlink to ~/Bureaublad in
[nl]). Well - we could semi-autorecreate it. This could still suck, but
so would rm -rf ~/.gconf be. We could have nautilus warn us.

- non-GNOME program has ~/Desktop hardcoded, and writes there, which of
course works in the tests on the US computer. This problem will also be
there when using gconf (and more likely to occur there), but not with
the gettext solution. (A dirty hack here might by to name Desktop
something like Desktop-$RANDOM instead :-), and now script writers are
forced to do the Right Thing.)

- FS that don't support symlinks. Hmmm... don't know about this
one. (Well... even FAT can be made to have symlinks with some
evil hackery...). Problem does not seems serious in practise though;
GNOME cared about 8.3 either for example.

In short:
- the gconf-solution works well for GNOME-users, but is hard for anybody
else
- the gettext-solution works well for people who use GNOME or the shell,
but is confusing for people who do both (without changing bash, zsh,
csh,..., which will take a while and is really hard to get right)
- the symlink solution works well for both, and requires no changes to
shells.

Cheers,
Dirk.
 
-- 
/*
 * Dirk-Jan C. Binnema  [djcb]
 *   djcb djcbsoftware nl
 * www.djcbsoftware.nl/ChangeLog
 *     djcb jabber org
 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]