Revision: hrev43268 Commit: ff49e36ea94ed5897f77b3381ed58a60e6b43755 URL: http://cgit.haiku-os.org/haiku/commit/?id=ff49e36 Author: pulkomandy <pulkomandy@xxxxxxxxxxxxxxxxx> Date: Mon Nov 14 19:39:41 2011 UTC Fix BSnow localization. * Having defines in a header that are used only a single time is not helpful. * B_TRANSLATE in a macro is only expanded when the macro is used, so it escaped collectcatkeys eyes. ............................................................................ src/apps/bsnow/Jamfile | 2 +- src/apps/bsnow/SnowView.cpp | 11 ++++++++--- src/apps/bsnow/SnowView.h | 7 ------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/apps/bsnow/Jamfile b/src/apps/bsnow/Jamfile index 2b34a26..fcf6251 100644 --- a/src/apps/bsnow/Jamfile +++ b/src/apps/bsnow/Jamfile @@ -13,5 +13,5 @@ Application BSnow : DoCatalogs BSnow : x-vnd.mmu_man.BSnow : - SnowView.h + SnowView.cpp ; diff --git a/src/apps/bsnow/SnowView.cpp b/src/apps/bsnow/SnowView.cpp index 55602ce..716dca8 100644 --- a/src/apps/bsnow/SnowView.cpp +++ b/src/apps/bsnow/SnowView.cpp @@ -6,6 +6,7 @@ #include <math.h> #include <Alert.h> +#include <Catalog.h> #include <Debug.h> #include <Message.h> #include <MessageRunner.h> @@ -18,6 +19,8 @@ #define FORWARD_TO_PARENT +#undef B_TRANSLATE_CONTEXT +#define B_TRANSLATE_CONTEXT "BSnow" SnowView::SnowView() @@ -234,8 +237,9 @@ void SnowView::Draw(BRect ur) SetLowColor(ViewColor()); SetHighColor(0,0,0); SetFontSize(12); - DrawString(MSG_DRAG_ME, BPoint(15,25)); - BPoint arrowHead(Bounds().RightBottom()+BPoint(-10,-10)); + DrawString(B_TRANSLATE("Drag me on your desktop"B_UTF8_ELLIPSIS), + BPoint(15,25)); + BPoint arrowHead(Bounds().RightBottom() + BPoint(-10,-10)); StrokeLine(arrowHead, arrowHead - BPoint(7,0)); StrokeLine(arrowHead, arrowHead - BPoint(0,7)); StrokeLine(arrowHead, arrowHead - BPoint(12,12)); @@ -244,7 +248,8 @@ void SnowView::Draw(BRect ur) SetLowColor(ViewColor()); SetHighColor(0,0,0); SetFontSize(12); - DrawString(MSG_CLICK_ME, BPoint(15,25)); + DrawString(B_TRANSLATE("Click me to remove BSnow"B_UTF8_ELLIPSIS), + BPoint(15,25)); return; } } diff --git a/src/apps/bsnow/SnowView.h b/src/apps/bsnow/SnowView.h index b5343c1..ed688c9 100644 --- a/src/apps/bsnow/SnowView.h +++ b/src/apps/bsnow/SnowView.h @@ -3,7 +3,6 @@ #include <Bitmap.h> -#include <Catalog.h> #include <Dragger.h> #include <List.h> #include <MessageRunner.h> @@ -27,12 +26,6 @@ #define FALLEN_HEIGHT 30 #define INVALIDATOR_THREAD_NAME "You're Neo? I'm the Snow Maker!" -#undef B_TRANSLATE_CONTEXT -#define B_TRANSLATE_CONTEXT "BSnow" - -#define MSG_DRAG_ME B_TRANSLATE("Drag me on your desktop...") -#define MSG_CLICK_ME B_TRANSLATE("Click me to remove BSnow...") - typedef struct flake { BPoint pos;