diff --git a/src/apps/pairs/Jamfile b/src/apps/pairs/Jamfile index 7358612da1..0a851136a4 100644 --- a/src/apps/pairs/Jamfile +++ b/src/apps/pairs/Jamfile @@ -8,6 +8,13 @@ Application Pairs : PairsView.cpp PairsTopButton.cpp - : be $(TARGET_LIBSTDC++) + : be liblocale.so $(TARGET_LIBSTDC++) : Pairs.rdef - ; +; + +DoCatalogs Pairs : + x-vnd.Haiku-Pairs + : + PairsWindow.cpp + : en.catalog +; diff --git a/src/apps/pairs/Pairs.cpp b/src/apps/pairs/Pairs.cpp index fd816a866b..dd8c7a4589 100644 --- a/src/apps/pairs/Pairs.cpp +++ b/src/apps/pairs/Pairs.cpp @@ -1,11 +1,13 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ #include #include +#include +#include #include "Pairs.h" #include "PairsWindow.h" @@ -17,6 +19,7 @@ Pairs::Pairs() : BApplication(kSignature), fWindow(NULL) { + be_locale->GetAppCatalog(&fCatalog); } diff --git a/src/apps/pairs/Pairs.h b/src/apps/pairs/Pairs.h index 20b9c3925e..14f2731052 100644 --- a/src/apps/pairs/Pairs.h +++ b/src/apps/pairs/Pairs.h @@ -1,11 +1,13 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_H #define PAIRS_H #include +#include extern const char* kSignature; @@ -17,12 +19,14 @@ public: Pairs(); virtual ~Pairs(); - virtual void ReadyToRun(); - virtual void RefsReceived(BMessage* message); - virtual void MessageReceived(BMessage* message); + virtual void ReadyToRun(); + virtual void RefsReceived(BMessage* message); + virtual void MessageReceived(BMessage* message); private: - PairsWindow* fWindow; + PairsWindow* fWindow; + BCatalog fCatalog; + }; #endif // PAIRS_H diff --git a/src/apps/pairs/PairsGlobal.h b/src/apps/pairs/PairsGlobal.h index a43a8746fe..9080f98908 100644 --- a/src/apps/pairs/PairsGlobal.h +++ b/src/apps/pairs/PairsGlobal.h @@ -1,7 +1,8 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_GLOBAL_H #define PAIRS_GLOBAL_H diff --git a/src/apps/pairs/PairsTopButton.cpp b/src/apps/pairs/PairsTopButton.cpp index d592fb2573..112c16b1c8 100644 --- a/src/apps/pairs/PairsTopButton.cpp +++ b/src/apps/pairs/PairsTopButton.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ diff --git a/src/apps/pairs/PairsTopButton.h b/src/apps/pairs/PairsTopButton.h index 9d39efe83c..2eeabb19eb 100644 --- a/src/apps/pairs/PairsTopButton.h +++ b/src/apps/pairs/PairsTopButton.h @@ -1,7 +1,8 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_TOP_BUTTON_H #define PAIRS_TOP_BUTTON_H diff --git a/src/apps/pairs/PairsView.cpp b/src/apps/pairs/PairsView.cpp index 2866a573f8..d4bdb71bc8 100644 --- a/src/apps/pairs/PairsView.cpp +++ b/src/apps/pairs/PairsView.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ diff --git a/src/apps/pairs/PairsView.h b/src/apps/pairs/PairsView.h index cdce7df4f0..be9b892950 100644 --- a/src/apps/pairs/PairsView.h +++ b/src/apps/pairs/PairsView.h @@ -1,7 +1,8 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_VIEW_H #define PAIRS_VIEW_H diff --git a/src/apps/pairs/PairsWindow.cpp b/src/apps/pairs/PairsWindow.cpp index 4c984b16c2..4601196f4c 100644 --- a/src/apps/pairs/PairsWindow.cpp +++ b/src/apps/pairs/PairsWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ @@ -8,17 +8,22 @@ #include #include -#include -#include #include -#include +#include +#include +#include +#include #include +#include #include "Pairs.h" #include "PairsGlobal.h" #include "PairsView.h" #include "PairsTopButton.h" +// #pragma mark - PairsWindow +#undef TR_CONTEXT +#define TR_CONTEXT "PairsWindow" PairsWindow::PairsWindow() : BWindow(BRect(100, 100, 405, 405), "Pairs", B_TITLED_WINDOW, @@ -115,8 +120,8 @@ PairsWindow::MessageReceived(BMessage* message) << "You completed the game in " << fButtonClicks << " clicks.\n"; - BAlert* alert = new BAlert("about", strAbout.String(), - "New game", "Quit game"); + BAlert* alert = new BAlert("about", TR(strAbout.String()), + TR("New game"), TR("Quit game")); BTextView* view = alert->TextView(); BFont font; diff --git a/src/apps/pairs/PairsWindow.h b/src/apps/pairs/PairsWindow.h index 2fa313e96b..1badc7f250 100644 --- a/src/apps/pairs/PairsWindow.h +++ b/src/apps/pairs/PairsWindow.h @@ -1,7 +1,8 @@ /* - * Copyright 2007, Ralf Schülke, teammaui@web.de. All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com. All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_WINDOW_H #define PAIRS_WINDOW_H