Author: pulkomandy Date: 2010-02-27 14:13:18 +0100 (Sat, 27 Feb 2010) New Revision: 35630 Changeset: http://dev.haiku-os.org/changeset/35630/haiku Modified: haiku/trunk/src/apps/pairs/Jamfile haiku/trunk/src/apps/pairs/Pairs.cpp haiku/trunk/src/apps/pairs/Pairs.h haiku/trunk/src/apps/pairs/PairsGlobal.h haiku/trunk/src/apps/pairs/PairsTopButton.cpp haiku/trunk/src/apps/pairs/PairsTopButton.h haiku/trunk/src/apps/pairs/PairsView.cpp haiku/trunk/src/apps/pairs/PairsView.h haiku/trunk/src/apps/pairs/PairsWindow.cpp haiku/trunk/src/apps/pairs/PairsWindow.h Log: Patch by stargater : localize pairs. Thanks ! Modified: haiku/trunk/src/apps/pairs/Jamfile =================================================================== --- haiku/trunk/src/apps/pairs/Jamfile 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/Jamfile 2010-02-27 13:13:18 UTC (rev 35630) @@ -8,6 +8,13 @@ PairsView.cpp PairsTopButton.cpp - : be $(TARGET_LIBSTDC++) + : be liblocale.so $(TARGET_LIBSTDC++) : Pairs.rdef - ; +; + +DoCatalogs Pairs : + x-vnd.Haiku-Pairs + : + PairsWindow.cpp + : en.catalog +; Modified: haiku/trunk/src/apps/pairs/Pairs.cpp =================================================================== --- haiku/trunk/src/apps/pairs/Pairs.cpp 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/Pairs.cpp 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,11 +1,13 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ #include <stdlib.h> #include <Application.h> +#include <Catalog.h> +#include <Locale.h> #include "Pairs.h" #include "PairsWindow.h" @@ -17,6 +19,7 @@ : BApplication(kSignature), fWindow(NULL) { + be_locale->GetAppCatalog(&fCatalog); } Modified: haiku/trunk/src/apps/pairs/Pairs.h =================================================================== --- haiku/trunk/src/apps/pairs/Pairs.h 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/Pairs.h 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,11 +1,13 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_H #define PAIRS_H #include <Application.h> +#include <Catalog.h> extern const char* kSignature; @@ -17,12 +19,14 @@ 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 Modified: haiku/trunk/src/apps/pairs/PairsGlobal.h =================================================================== --- haiku/trunk/src/apps/pairs/PairsGlobal.h 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/PairsGlobal.h 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,7 +1,8 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_GLOBAL_H #define PAIRS_GLOBAL_H Modified: haiku/trunk/src/apps/pairs/PairsTopButton.cpp =================================================================== --- haiku/trunk/src/apps/pairs/PairsTopButton.cpp 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/PairsTopButton.cpp 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,5 +1,5 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ Modified: haiku/trunk/src/apps/pairs/PairsTopButton.h =================================================================== --- haiku/trunk/src/apps/pairs/PairsTopButton.h 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/PairsTopButton.h 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,7 +1,8 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_TOP_BUTTON_H #define PAIRS_TOP_BUTTON_H Modified: haiku/trunk/src/apps/pairs/PairsView.cpp =================================================================== --- haiku/trunk/src/apps/pairs/PairsView.cpp 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/PairsView.cpp 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,5 +1,5 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ Modified: haiku/trunk/src/apps/pairs/PairsView.h =================================================================== --- haiku/trunk/src/apps/pairs/PairsView.h 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/PairsView.h 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,7 +1,8 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_VIEW_H #define PAIRS_VIEW_H Modified: haiku/trunk/src/apps/pairs/PairsWindow.cpp =================================================================== --- haiku/trunk/src/apps/pairs/PairsWindow.cpp 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/PairsWindow.cpp 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,5 +1,5 @@ /* - * Copyright 2008, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ @@ -8,17 +8,22 @@ #include <stdio.h> #include <Application.h> +#include <Alert.h> +#include <Button.h> +#include <Catalog.h> +#include <Locale.h> #include <MessageRunner.h> -#include <Button.h> -#include <Alert.h> +#include <String.h> #include <TextView.h> -#include <String.h> #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 @@ << "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; Modified: haiku/trunk/src/apps/pairs/PairsWindow.h =================================================================== --- haiku/trunk/src/apps/pairs/PairsWindow.h 2010-02-27 09:44:30 UTC (rev 35629) +++ haiku/trunk/src/apps/pairs/PairsWindow.h 2010-02-27 13:13:18 UTC (rev 35630) @@ -1,7 +1,8 @@ /* - * Copyright 2007, Ralf Schülke, teammaui@xxxxxxx All rights reserved. + * Copyright 2008 Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxxx All rights reserved. * Distributed under the terms of the MIT License. */ + #ifndef PAIRS_WINDOW_H #define PAIRS_WINDOW_H