Ticket #7109: charactermap-localization-update.patch

File charactermap-localization-update.patch, 2.7 KB (added by Karvjorm, 10 years ago)

A CharacterMap localization update patch

  • src/apps/charactermap/CharacterWindow.cpp

     
    121121
    122122
    123123CharacterWindow::CharacterWindow()
    124     : BWindow(BRect(100, 100, 700, 550), "CharacterMap", B_TITLED_WINDOW,
    125         B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
     124    : BWindow(BRect(100, 100, 700, 550), B_TRANSLATE("CharacterMap"),
     125        B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE
    126126            | B_AUTO_UPDATE_SIZE_LIMITS)
    127127{
    128128    BMessage settings;
     
    216216    // Add menu
    217217
    218218    // "File" menu
    219     BMenu* menu = new BMenu("File");
     219    BMenu* menu = new BMenu(B_TRANSLATE("File"));
    220220    BMenuItem* item;
    221221
    222222    menu->AddItem(item = new BMenuItem(B_TRANSLATE("About CharacterMap"
     
    230230    item->SetTarget(be_app);
    231231    menuBar->AddItem(menu);
    232232
    233     menu = new BMenu("View");
     233    menu = new BMenu(B_TRANSLATE("View"));
    234234    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Show private blocks"),
    235235        new BMessage(kMsgPrivateBlocks)));
    236236    item->SetMarked(fCharacterView->IsShowingPrivateBlocks());
    237237// TODO: this feature is not yet supported by Haiku!
    238238#if 0
    239     menu->AddItem(item = new BMenuItem("Only show blocks contained in font",
    240         new BMessage(kMsgContainedBlocks)));
     239    menu->AddItem(item = new BMenuItem(B_TRANSLATE("Only show blocks "
     240        "contained in font"), new BMessage(kMsgContainedBlocks)));
    241241    item->SetMarked(fCharacterView->IsShowingContainedBlocksOnly());
    242242#endif
    243243    menuBar->AddItem(menu);
     
    310310                sizeof(utf8Hex));
    311311
    312312            char text[128];
    313             snprintf(text, sizeof(text), "'%s' Code: %#lx (%ld), UTF-8: %s",
     313            BString str1("'%s' %1: %#lx (%ld), UTF-8: %s");
     314            str1.ReplaceFirst("%1", "Code");
     315            snprintf(text, sizeof(text), str1.String(),
    314316                utf8, character, character, utf8Hex);
    315317
    316318            fCodeView->SetText(text);
     
    493495BMenu*
    494496CharacterWindow::_CreateFontMenu()
    495497{
    496     BMenu* menu = new BMenu("Font");
     498    BMenu* menu = new BMenu(B_TRANSLATE("Font"));
    497499    BMenuItem* item;
    498500
    499501    font_family currentFamily;
  • src/apps/charactermap/CharacterMap.cpp

     
    5757void
    5858CharacterMap::AboutRequested()
    5959{
    60     BAlert *alert = new BAlert(B_TRANSLATE("about"), B_TRANSLATE(
     60    BAlert *alert = new BAlert("about", B_TRANSLATE(
    6161        "CharacterMap\n"
    6262        "\twritten by Axel Dörfler\n"
    63         "\tCopyright 2009, Haiku, Inc.\n"), "OK");
     63        "\tCopyright 2009, Haiku, Inc.\n"), B_TRANSLATE("OK"));
    6464    BTextView *view = alert->TextView();
    6565    BFont font;
    6666