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:
Stephan Aßmus 2010-05-06 11:39:09 +00:00
parent 404b95c410
commit 420557d0ce
2 changed files with 13 additions and 9 deletions

View File

@ -14,10 +14,12 @@
#include <Application.h>
#include <Bitmap.h>
#include <Button.h>
#include <Catalog.h>
#include <Directory.h>
#include <Entry.h>
#include <FindDirectory.h>
#include <IconUtils.h>
#include <Locale.h>
#include <List.h>
#include <Node.h>
#include <NodeInfo.h>
@ -91,6 +93,8 @@ PairsView::_HasBitmap(BList& bitmaps, BBitmap* bitmap)
return false;
}
#undef TR_CONTEXT
#define TR_CONTEXT "PairsView"
void
PairsView::_ReadRandomIcons()
@ -163,12 +167,12 @@ PairsView::_ReadRandomIcons()
int32 index = rand() % bitmaps.CountItems();
BBitmap* bitmap = ((BBitmap*)bitmaps.RemoveItem(index));
if (bitmap == NULL) {
BString strErr;
strErr
<< "Pairs did not find enough vector icons in the system; it "
<< "needs at least " << fNumOfCards / 2;
BAlert* alert = new BAlert("fatal", strErr,
"OK", NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
char buffer[512];
snprintf(buffer, sizeof(buffer), TR("Pairs did not find enough "
"vector icons in the system; it needs at least %d."),
fNumOfCards / 2);
BAlert* alert = new BAlert("fatal", buffer, TR("OK"), NULL, NULL,
B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
alert->Go();
exit(1);
}

View File

@ -39,7 +39,7 @@ const uint32 MENU_QUIT = 'MGqu';
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_NOT_RESIZABLE | B_NOT_ZOOMABLE),
fPairComparing(NULL),
@ -223,11 +223,11 @@ PairsWindow::MessageReceived(BMessage* message)
BString score;
score << fButtonClicks;
strAbout
<< "Pairs\n"
<< TR("Pairs\n"
"\twritten by Ralf Schülke\n"
"\tCopyright 2008-2010, Haiku Inc.\n"
"\n"
"You completed the game in %s clicks.\n";
"You completed the game in %s clicks.\n");
strAbout.Replace("%s", score.String(), 1);