[haiku-development] Re: Coding Guidelines need update for localization

  • From: "Star's seed" <starsseed@xxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 22 Jul 2010 20:38:47 +0200

Thursday, July 22, 2010 3:22 PM "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxxxxxx> wrote :

Avoid using << and similar methods for building a localized string.

Instead of : BString s << total << "MiB total, " << free << "MiB free."
do : BString s("%t MiB total, %f MiB free); s.ReplaceFirst("%t",total);
s.ReplaceFirst("%f", free);

+1

Avoid leading and trailing spaces as they can be lost. (they are not visible in HTA)

Other related posts: