Ticket #5484: PairsLocalizationUpdate.patch

File PairsLocalizationUpdate.patch, 2.0 KB (added by Karvjorm, 12 years ago)

Not yet localized strings in Pairs application

  • src/apps/pairs/PairsWindow.cpp

     
    3939
    4040PairsWindow::PairsWindow()
    4141    :
    42     BWindow(BRect(100, 100, 405, 423), "Pairs", B_TITLED_WINDOW,
     42    BWindow(BRect(100, 100, 405, 423), TR("Pairs"), B_TITLED_WINDOW,
    4343        B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
    4444            | B_NOT_RESIZABLE | B_NOT_ZOOMABLE),
    4545    fPairComparing(NULL),
     
    223223                    BString score;
    224224                    score << fButtonClicks;
    225225                    strAbout
    226                         << "Pairs\n"
     226                        << TR("Pairs\n"
    227227                        "\twritten by Ralf Schülke\n"
    228228                        "\tCopyright 2008-2010, Haiku Inc.\n"
    229229                        "\n"
    230                         "You completed the game in %s clicks.\n";
     230                        "You completed the game in %s clicks.\n");
    231231                       
    232232                    strAbout.Replace("%s", score.String(), 1);
    233233
  • src/apps/pairs/PairsView.cpp

     
    1414#include <Application.h>
    1515#include <Bitmap.h>
    1616#include <Button.h>
     17#include <Catalog.h>
    1718#include <Directory.h>
    1819#include <Entry.h>
    1920#include <FindDirectory.h>
    2021#include <IconUtils.h>
     22#include <Locale.h>
    2123#include <List.h>
    2224#include <Node.h>
    2325#include <NodeInfo.h>
     
    9193    return false;
    9294}
    9395
     96#undef TR_CONTEXT
     97#define TR_CONTEXT "PairsView"
    9498
    9599void
    96100PairsView::_ReadRandomIcons()
     
    165169        if (bitmap == NULL) {
    166170            BString strErr;
    167171            strErr
    168                 << "Pairs did not find enough vector icons in the system; it "
    169                 << "needs at least " << fNumOfCards / 2;
     172                << TR("Pairs did not find enough vector icons in the system; ")
     173                << TR("it needs at least ")
     174                << fNumOfCards / 2;
    170175            BAlert* alert = new BAlert("fatal", strErr,
    171                 "OK", NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
     176                TR("OK"), NULL, NULL, B_WIDTH_FROM_WIDEST, B_STOP_ALERT);
    172177            alert->Go();
    173178            exit(1);
    174179        }