Author: phoudoin Date: 2011-02-09 12:28:56 +0100 (Wed, 09 Feb 2011) New Revision: 40404 Changeset: http://dev.haiku-os.org/changeset/40404 Modified: haiku/trunk/src/apps/people/AttributeTextControl.cpp haiku/trunk/src/apps/people/AttributeTextControl.h Log: Made localizable attribute control's label formatting. Modified: haiku/trunk/src/apps/people/AttributeTextControl.cpp =================================================================== --- haiku/trunk/src/apps/people/AttributeTextControl.cpp 2011-02-09 11:25:41 UTC (rev 40403) +++ haiku/trunk/src/apps/people/AttributeTextControl.cpp 2011-02-09 11:28:56 UTC (rev 40404) @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010, Haiku, Inc. All rights reserved. + * Copyright 2005-2011, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -14,9 +14,15 @@ #include <string.h> #include <malloc.h> + #include <Font.h> +#include <Catalog.h> +#undef B_TRANSLATE_CONTEXT +#define B_TRANSLATE_CONTEXT "People" + + AttributeTextControl::AttributeTextControl(const char* label, const char* attribute) : @@ -25,7 +31,8 @@ fOriginalValue() { if (label != NULL && label[0] != 0) - SetLabel(BString(label).Append(":")); + SetLabel(BString(B_TRANSLATE("%attribute_label:")) + .ReplaceFirst("%attribute_label", label)); SetAlignment(B_ALIGN_RIGHT, B_ALIGN_LEFT); } Modified: haiku/trunk/src/apps/people/AttributeTextControl.h =================================================================== --- haiku/trunk/src/apps/people/AttributeTextControl.h 2011-02-09 11:25:41 UTC (rev 40403) +++ haiku/trunk/src/apps/people/AttributeTextControl.h 2011-02-09 11:28:56 UTC (rev 40404) @@ -1,5 +1,5 @@ /* - * Copyright 2005-2010, Haiku, Inc. All rights reserved. + * Copyright 2005-2011, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT license. * * Authors: @@ -8,8 +8,8 @@ * Copyright 1999, Be Incorporated. All Rights Reserved. * This file may be used under the terms of the Be Sample Code License. */ -#ifndef TEXT_CONTROL_H -#define TEXT_CONTROL_H +#ifndef ATTRIBUTE_TEXT_CONTROL_H +#define ATTRIBUTE_TEXT_CONTROL_H #include <String.h> #include <TextControl.h> @@ -33,4 +33,4 @@ BString fOriginalValue; }; -#endif // TEXT_CONTROL_H +#endif // ATTRIBUTE_TEXT_CONTROL_H