Patch by Jorma Karvonen with a fix by myself to remove string composition.
Add four missing localizations. Closes ticket #5484. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36643 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -14,10 +14,12 @@
|
|||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
#include <Button.h>
|
#include <Button.h>
|
||||||
|
#include <Catalog.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <FindDirectory.h>
|
#include <FindDirectory.h>
|
||||||
#include <IconUtils.h>
|
#include <IconUtils.h>
|
||||||
|
#include <Locale.h>
|
||||||
#include <List.h>
|
#include <List.h>
|
||||||
#include <Node.h>
|
#include <Node.h>
|
||||||
#include <NodeInfo.h>
|
#include <NodeInfo.h>
|
||||||
@@ -91,6 +93,8 @@ PairsView::_HasBitmap(BList& bitmaps, BBitmap* bitmap)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef TR_CONTEXT
|
||||||
|
#define TR_CONTEXT "PairsView"
|
||||||
|
|
||||||
void
|
void
|
||||||
PairsView::_ReadRandomIcons()
|
PairsView::_ReadRandomIcons()
|
||||||
@@ -163,12 +167,12 @@ PairsView::_ReadRandomIcons()
|
|||||||
int32 index = rand() % bitmaps.CountItems();
|
int32 index = rand() % bitmaps.CountItems();
|
||||||
BBitmap* bitmap = ((BBitmap*)bitmaps.RemoveItem(index));
|
BBitmap* bitmap = ((BBitmap*)bitmaps.RemoveItem(index));
|
||||||
if (bitmap == NULL) {
|
if (bitmap == NULL) {
|
||||||
BString strErr;
|
char buffer[512];
|
||||||
strErr
|
snprintf(buffer, sizeof(buffer), TR("Pairs did not find enough "
|
||||||
<< "Pairs did not find enough vector icons in the system; it "
|
"vector icons in the system; it needs at least %d."),
|
||||||
<< "needs at least " << fNumOfCards / 2;
|
fNumOfCards / 2);
|
||||||
BAlert* alert = new BAlert("fatal", strErr,
|
BAlert* alert = new BAlert("fatal", buffer, TR("OK"), NULL, NULL,
|
||||||
"OK", NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
|
B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
|
||||||
alert->Go();
|
alert->Go();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const uint32 MENU_QUIT = 'MGqu';
|
|||||||
|
|
||||||
PairsWindow::PairsWindow()
|
PairsWindow::PairsWindow()
|
||||||
:
|
:
|
||||||
BWindow(BRect(100, 100, 405, 423), "Pairs", B_TITLED_WINDOW,
|
BWindow(BRect(100, 100, 405, 423), TR("Pairs"), B_TITLED_WINDOW,
|
||||||
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
|
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
|
||||||
| B_NOT_RESIZABLE | B_NOT_ZOOMABLE),
|
| B_NOT_RESIZABLE | B_NOT_ZOOMABLE),
|
||||||
fPairComparing(NULL),
|
fPairComparing(NULL),
|
||||||
@@ -223,11 +223,11 @@ PairsWindow::MessageReceived(BMessage* message)
|
|||||||
BString score;
|
BString score;
|
||||||
score << fButtonClicks;
|
score << fButtonClicks;
|
||||||
strAbout
|
strAbout
|
||||||
<< "Pairs\n"
|
<< TR("Pairs\n"
|
||||||
"\twritten by Ralf Schülke\n"
|
"\twritten by Ralf Schülke\n"
|
||||||
"\tCopyright 2008-2010, Haiku Inc.\n"
|
"\tCopyright 2008-2010, Haiku Inc.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"You completed the game in %s clicks.\n";
|
"You completed the game in %s clicks.\n");
|
||||||
|
|
||||||
strAbout.Replace("%s", score.String(), 1);
|
strAbout.Replace("%s", score.String(), 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user