[haiku-bugs] Re: [Haiku] #7873: B_TRANSLATE("String") between #ifdef and #endif not included in catalogs

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Sun, 27 May 2012 11:00:09 -0000

#7873: B_TRANSLATE("String") between #ifdef and #endif not included in catalogs
-------------------------+-------------------------------
   Reporter:  taos       |      Owner:  zooey
       Type:  bug        |     Status:  assigned
   Priority:  normal     |  Milestone:  R1
  Component:  - General  |    Version:  R1/Development
 Resolution:             |   Keywords:  localization, HTA
 Blocked By:             |   Blocking:
Has a Patch:  0          |   Platform:  All
-------------------------+-------------------------------

Comment (by pulkomandy):

 Well, actually it's possible to revert to the scheme used before
 introduction of B_COLLECTING_CATKEYS :

 {{{
 static const char* kSomeString = B_TRANSLATE_MARK("Some String");

 #ifdef FOO
 // ...
 new BMenuItem(B_TRANSLATE_NOCOLLECT(kSomeString));
 // ...
 #endif
 }}}

 The problem with this is the string could end up in the binary (didn't
 check if it actually happens)

 So yes, having B_COLLECTING_CATKEYS around might still be helpful. It
 could be added in the jam rule as a preprocessor option, if we don't want
 it in an header.

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

Other related posts: