Patch by stargater : localize pairs. Thanks !

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35630 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2010-02-27 13:13:18 +00:00
parent e8e5e0caa0
commit 84df7867f8
10 changed files with 43 additions and 20 deletions

View File

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

View File

@ -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 <stdlib.h>
#include <Application.h>
#include <Catalog.h>
#include <Locale.h>
#include "Pairs.h"
#include "PairsWindow.h"
@ -17,6 +19,7 @@ Pairs::Pairs()
: BApplication(kSignature),
fWindow(NULL)
{
be_locale->GetAppCatalog(&fCatalog);
}

View File

@ -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 <Application.h>
#include <Catalog.h>
extern const char* kSignature;
@ -23,6 +25,8 @@ public:
private:
PairsWindow* fWindow;
BCatalog fCatalog;
};
#endif // PAIRS_H

View File

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

View File

@ -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.
*/

View File

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

View File

@ -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.
*/

View File

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

View File

@ -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 <stdio.h>
#include <Application.h>
#include <MessageRunner.h>
#include <Button.h>
#include <Alert.h>
#include <TextView.h>
#include <Button.h>
#include <Catalog.h>
#include <Locale.h>
#include <MessageRunner.h>
#include <String.h>
#include <TextView.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 @@ 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;

View File

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