[haiku-bugs] Re: [Haiku] #5912: Devices localization patch

  • From: "Karvjorm" <trac@xxxxxxxxxxxx>
  • Date: Mon, 24 May 2010 19:15:47 -0000

#5912: Devices localization patch
----------------------------------------+-----------------------------------
 Reporter:  Karvjorm                    |       Owner:  nobody   
     Type:  enhancement                 |      Status:  new      
 Priority:  normal                      |   Milestone:  R1       
Component:  Applications/Devices        |     Version:  R1/alpha1
 Keywords:  Devices localization patch  |    Platform:  All      
Blockedby:                              |       Patch:  1        
 Blocking:                              |  
----------------------------------------+-----------------------------------

Comment(by Karvjorm):

 Replying to [comment:6 stippi]:
 > Why is there one fAppCatalog per translated file, additionally to the
 one allocated in main()?

 It is my mistake. Surely there could be only one BCatalog and
 initialization. I did not think clearly there.

  The patch also still contains translation-unfriendly string composition:
 >
 {{{
 }}}
 >
 > This should be more like
 >
 {{{
     BString string = B_TRANSLATE("Device Name\t\t\t\t: %1\n"
         "Manufacturer\t\t\t: %2\n"
         "Driver used\t\t\t\t: %3\n"
          "Device paths\t: %4\n");
     string.ReplaceFirst("%1", GetName());
     string.ReplaceFirst("%2", GetManufacturer());
     string.ReplaceFirst("%3", GetDriverUsed());
     string.ReplaceFirst("%4", GetDevPathsPublished());
     return string;
  }}}
 >
 > This way, a translation can change the order (think bottom to top
 languages) and the number of tabs can be adjusted for the actual string
 widths, so that the alignment can be preserved.

 Thank you. It was just I said that I'm an ordinary programmer, not a guru.
 You can always find several solutions but gurus find better solutions and
 faster. ;)

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

Other related posts: