[haiku-development] Re: [haiku-i18n] Re: Localization of files and folders

  • From: "Jonas Sundström" <jonas@xxxxxxxxxxx>
  • To: "haiku-i18n@xxxxxxxxxxxxx" <haiku-i18n@xxxxxxxxxxxxx>
  • Date: Thu, 17 Feb 2011 14:43:11 +0100

pulkomandy pulkomandy <pulkomandy@xxxxxxxxxxxxxxxxx> wrote:
> 
> On Thu, 17 Feb 2011 07:02:30 -0600, "Travis D. Reed" <tdreed@xxxxxxxxx>
> wrote:
 ...
> > My point was that I think files should have attributes
 ...
> > Tracker could be modified to display the appropriate attribute
> > for the user's chosen locale. For instance, the folder /home
> > would retain the name /home but have an attribute Title.eo,
> > that would be set to "hejmo" (the Esperanto word for "home").
> > Tracker would check to see which locale I was set to and, finding
> > that I have chosen Esperanto, it would search for the attribute
> > Title.eo. When it found this attribute, it would display it as
> > the name of the file.
> 
> It is already possible to do that. You can remove the 'name' 
> column in the default display and show something else instead.
> I'm worried about storing all these names as attributes. I think
> it adds  weight to files without a real need for it. But I think
> there's no perfect solution :)

What if a single attribute is used. There is always one effective
(primary) locale, always one primary language in use.

One attribute per folder and per app, and the same for both,
called e.g. "sys:trans" and displayed in Tracker as "Translation"
(itself translated of course). One menu item for this, and one
shared column for apps and folders.

This has the benefit that people can see both the translated
name and the "real" name, even at the same time, should they
want to, or need to. Like when working in Terminal or otherwise
needing to be aware of the real or actual filename.

As for implementation:

Apps would store a list of translated names in their own resources
(which are embedded in the executable) and refresh/correct the 
"sys:trans" attribute when they are run.

Folder (and file) translation data could be kept in some shared 
location i.e. in /boot/common, managed and updated by the system,
and be applied to all the respective folders when the user changes
the language setting. (It could easily update apps the same way.)

This shouldn't be especially heavy. The switch isn't time-consuming
or needing a reboot. No paths are swept away from under running apps.

BApplication and the Locale prefs will need a little work.
Deskbar will need an update, but Tracker will not.

I could work on this if everyone thinks its a good solution.

/Jonas.


Other related posts: