well-known user folders, a proposal
alexl at redhat.com
Thu Feb 22 06:42:36 PST 2007
On Thu, 2007-02-22 at 15:04 +0100, Stanislav Brabec wrote:
> Alexander Larsson wrote:
> > On Thu, 2007-02-22 at 14:07 +0100, Stanislav Brabec wrote:
> > It will make scripts slighly more complicated, yes. But it tried to make
> > it as easy as possible. I think its a small price to pay. At least if we
> > fix all such bugs we'll get a consistently translated system, whereas
> > XDG_DESKTOP_DIR="$HOME/Desktop"
> It implies to use localized name for "Desktop", isn't it? I guess it
> will be not so easy to provide migration from ~/Desktop to say
> "~/Pracovní plocha", if user already has home directory from current
The code special cases ~/Desktop for backwards compat. So, if you
already have it we won't create a localized version but instead use the
old dir. This isn't ideal of course, but automatic migration is fraught
with danger and will never really work well. If you really want to
migrate run the tool manually with --force and it will print out the
directory changes it made.
> And if you will not propose to migrate ~/Desktop, the code for special
> translation has to be kept in GNOME file selector anyways.
No we wont. There is no special code. The directory set for the desktop
dir will just be ~/Desktop, and everything will work.
> > But I see no harm in allowing you to specify some other
> > encoding, then we'd just convert to that before creating the directory.
> What happens if user will migrate later to UTF-8? They will see "bad
> UTF-8". After calling of convmv or utf8ize these directories will loose
> their "special" flag.
All sorts of shit break if you go renaming all the files in a users
homedir. If you're writing a script to do this for all users it should
be easy to update the user config too. If you're doing things manually
you can easily fix things up manually, as you need to fix up all other
stored paths in config files everywhere.
> There are already similar inconsistencies and nobody complains: If you
> use G_FILENAME_ENCODING=, Nautilus tries to show file name in the
> current locale, but you don't have any feedback, which locale is used.
> If you will try to type it in the terminal, you will fail.
Thats not what I mean by consistant. No UI can be consistent with a
non-utf8 filename encoding in the same-encoding sense, because strings
basically *have* to be utf8 in a gui. However, at least the strings will
be in the same language even if some characters might need to be escaped
weirdly in some places.
> The same problem can be found with .desktop files - displayed name is
> different from real name.
Yes, and that is not always ideal. We shouldn't propagate such
> I can imagine a different way using overlay directory somewhere in
> XDG_DATA_DIR and XDG_HOME_DIR with desktop files.
> If will need a small fix of Nautilus (now it complains, that
> Desktop.desktop is not a directory).
> [Desktop Entry]
> This will allow sysadmin to define additional directories, translated to
> custom languages.
How do you upgrade this file for all users when translations change?
This won't work for third party applications.
This won't work in a terminal.
This doesn't let you change the location of the directories.
I've seen all these argument in hundreds of mails in enourmous threads.
I don't want to reenact them all again. I've noted that you are against
translations-on-disk (and I can understand that, it was once my own
standpoint). I don't think we'll ever get 100% agreement on this. But
stalling again doing nothing isn't really an option.
Alexander Larsson Red Hat, Inc
alexl at redhat.com alla at lysator.liu.se
He's a leather-clad dishevelled cowboy with a mysterious suitcase handcuffed
to his arm. She's a mentally unstable renegade socialite on the trail of a
serial killer. They fight crime!
More information about the xdg