Ticket #5563: ShowImageUpdate.patch

File ShowImageUpdate.patch, 3.1 KB (added by Karvjorm, 14 years ago)

Another localization update for ShowImage app.

  • src/apps/showimage/ShowImageView.cpp

     
    2323#include <Application.h>
    2424#include <Bitmap.h>
    2525#include <BitmapStream.h>
     26#include <Catalog.h>
    2627#include <Clipboard.h>
    2728#include <Debug.h>
    2829#include <Directory.h>
    2930#include <Entry.h>
    3031#include <File.h>
     32#include <Locale.h>
    3133#include <MenuBar.h>
    3234#include <MenuItem.h>
    3335#include <Message.h>
     
    12441246    return found;
    12451247}
    12461248
     1249#undef TR_CONTEXT
     1250#define TR_CONTEXT "SaveToFile"
    12471251
    12481252void
    12491253ShowImageView::SaveToFile(BDirectory* dir, const char* name, BBitmap* bitmap,
     
    12781282    if (loop) {
    12791283        // If loop terminated because of a break, there was an error
    12801284        BString errText;
    1281         errText << "Sorry, the file '" << name << "' could not be written.";
    1282         BAlert *palert = new BAlert(NULL, errText.String(), "OK");
     1285        errText << TR("Sorry, the file '") << name
     1286            << TR("' could not be written.");
     1287        BAlert *palert = new BAlert(NULL, errText.String(), TR("OK"));
    12831288        palert->Go();
    12841289    }
    12851290
  • src/apps/showimage/ShowImageStatusView.cpp

     
    99
    1010#include "ShowImageStatusView.h"
    1111
     12#include <Catalog.h>
    1213#include <Entry.h>
     14#include <Locale.h>
    1315#include <MenuItem.h>
    1416#include <Path.h>
    1517#include <PopUpMenu.h>
     
    7375        floorf(b.top + b.Height() / 2.0 + fh.ascent / 2.0)));
    7476}
    7577
     78#undef TR_CONTEXT
     79#define TR_CONTEXT "MouseDown"
    7680
    7781void
    7882ShowImageStatusView::MouseDown(BPoint where)
     
    8488    BPath path;
    8589    path.SetTo(window->GetShowImageView()->Image());
    8690
    87     BPopUpMenu popup("no title");
     91    BPopUpMenu popup(TR("no title"));
    8892    popup.SetFont(be_plain_font);
    8993
    9094    while (path.GetParent(&path) == B_OK && path != "/") {
  • src/apps/showimage/ProgressWindow.cpp

     
    99#include <stdio.h>
    1010
    1111#include <Autolock.h>
     12#include <Catalog.h>
     13#include <Locale.h>
    1214#include <MessageRunner.h>
    1315#include <Screen.h>
    1416#include <StatusBar.h>
     
    1820
    1921static const uint32 kMsgShow = 'show';
    2022
     23#undef TR_CONTEXT
     24#define TR_CONTEXT "ProgressWindow"
    2125
    2226ProgressWindow::ProgressWindow(BWindow* referenceWindow, bool center)
    2327    :
    24     BWindow(BRect(0, 0, 250, 100), "Progress monitor",
     28    BWindow(BRect(0, 0, 250, 100), TR("Progress monitor"),
    2529        B_MODAL_WINDOW_LOOK, B_FLOATING_APP_WINDOW_FEEL,
    2630        B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS),
    2731    fRunner(NULL)
     
    3337    AddChild(view);
    3438
    3539    rect = view->Bounds().InsetByCopy(5, 5);
    36     fStatusBar = new BStatusBar(rect, "status", NULL, NULL);
     40    fStatusBar = new BStatusBar(rect, TR("status"), NULL, NULL);
    3741    float width, height;
    3842    fStatusBar->GetPreferredSize(&width, &height);
    3943    fStatusBar->ResizeTo(rect.Width(), height);