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.
This commit is contained in:
pulkomandy 2011-11-14 20:39:41 +01:00
parent c12f51264b
commit ff49e36ea9
3 changed files with 9 additions and 11 deletions

View File

@ -13,5 +13,5 @@ Application BSnow :
DoCatalogs BSnow :
x-vnd.mmu_man.BSnow
:
SnowView.h
SnowView.cpp
;

View File

@ -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;
}
}

View File

@ -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;