From 78a471321cf364c6e4c74be53023839fe469ddf4 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Wed, 9 Feb 2011 11:28:56 +0000 Subject: [PATCH] Made localizable attribute control's label formatting. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40404 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/people/AttributeTextControl.cpp | 11 +++++++++-- src/apps/people/AttributeTextControl.h | 8 ++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/apps/people/AttributeTextControl.cpp b/src/apps/people/AttributeTextControl.cpp index ea9662f7fe..c01cc72413 100644 --- a/src/apps/people/AttributeTextControl.cpp +++ b/src/apps/people/AttributeTextControl.cpp @@ -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,7 +14,13 @@ #include #include + #include +#include + + +#undef B_TRANSLATE_CONTEXT +#define B_TRANSLATE_CONTEXT "People" AttributeTextControl::AttributeTextControl(const char* label, @@ -25,7 +31,8 @@ AttributeTextControl::AttributeTextControl(const char* label, 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); } diff --git a/src/apps/people/AttributeTextControl.h b/src/apps/people/AttributeTextControl.h index b29cbfaadf..23743530a4 100644 --- a/src/apps/people/AttributeTextControl.h +++ b/src/apps/people/AttributeTextControl.h @@ -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 #include @@ -33,4 +33,4 @@ private: BString fOriginalValue; }; -#endif // TEXT_CONTROL_H +#endif // ATTRIBUTE_TEXT_CONTROL_H