On 2011-02-17 at 14:43:11 [+0100], Jonas Sundström <jonas@xxxxxxxxxxx> wrote: > 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. Using a real attribute obviously cannot work with multi-user. Having a kind of virtual attribute in Tracker would though. The data for that attribute could come from some standard API, e.g. BEntry::GetLocalizedName(BString&) or BLocaleRoster::GetEntryName(const BEntry&, BString&). > As for implementation: > > Apps would store a list of translated names in their own resources > (which are embedded in the executable) Why not in a catalog? > and refresh/correct the > "sys:trans" attribute when they are run. So for an application's name to be displayed in the current locale one would have to start it once? > 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.) Again, I would use catalogs. CU, Ingo