[haiku-bugs] Re: [Haiku] #8124: Regression: Folder names are no longer translated

#8124: Regression: Folder names are no longer translated
-------------------------------+----------------------------
   Reporter:  taos             |      Owner:  pulkomandy
       Type:  bug              |     Status:  new
   Priority:  normal           |  Milestone:  R1
  Component:  Kits/Locale Kit  |    Version:  R1/Development
 Resolution:                   |   Keywords:  localization
 Blocked By:                   |   Blocking:
Has a Patch:  1                |   Platform:  All
-------------------------------+----------------------------

Comment (by jonas.kirilla):

 I don't think the patch is right. Translations of filenames can live in
 any catalog, anywhere, not limited to the catalogs related to Tracker.
 (The Deskbar menu folders translations live in Deskbars catalog. And, for
 example, a pkgfs package could have its folders translated, providing its
 own catalog for this. As long as the system knows how to look up a catalog
 by its signature.)

 The lookup happens like this:

 A filesystem entry has an attribute called SYS:NAME with the contents
 (catalog signature : context : string). If the Locale setting "Translate
 apps and folders in Deskbar and Tracker" is selected, Tracker will attempt
 to use the BLocaleRoster to look up translations.

 Tracker calls BLocaleRoster::GetLocalizedFileName(BString&
 localizedFileName, const entry_ref& ref, bool traverse) with the entry_ref
 of the filesystem entry (file, app, folder or link) to see if there's a
 translation for it.

 Which in turn calls the method _PrepareCatalogEntry() which simpy reads
 the SYS:NAME attribute of the entry and parses its contents as three
 string: catalog signature, context and string.

 The signature is (or, rather, was) used to find the proper catalog, in
 which to look up the translation of string/context, but it seems the
 method BCatalog::SetCatalog(const char* signature, uint32 fingerprint) was
 removed.

 So, how to find the right catalog for an arbitrary signature, post r43021?

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8124#comment:9>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: