Ticket #9587: 0001-Localizing-libprint.a.patch

File 0001-Localizing-libprint.a.patch, 36.5 KB (added by mt, 8 years ago)
  • src/add-ons/print/drivers/canon_lips/lips3/Jamfile

    From b4f087c20da713bc30e58067255330a10aef4da8 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Fri, 29 Mar 2013 20:25:42 +0900
    Subject: [PATCH] Localizing libprint.a
    
    ---
     src/add-ons/print/drivers/canon_lips/lips3/Jamfile |   26 ++++++-
     src/add-ons/print/drivers/canon_lips/lips4/Jamfile |   26 ++++++-
     src/add-ons/print/drivers/gutenprint/Jamfile       |   26 +++++++
     src/add-ons/print/drivers/pcl5/Jamfile             |   26 ++++++-
     src/add-ons/print/drivers/pcl6/Jamfile             |   26 ++++++-
     src/add-ons/print/drivers/pdf/source/Jamfile       |   25 +++++++
     src/add-ons/print/drivers/postscript/Jamfile       |   26 ++++++-
     src/add-ons/print/drivers/preview/Jamfile          |   27 ++++++-
     src/libs/print/libprint/AddPrinterDlg.cpp          |   15 ++--
     src/libs/print/libprint/GraphicsDriver.cpp         |    9 ++-
     src/libs/print/libprint/HalftoneView.cpp           |   11 +--
     src/libs/print/libprint/JobSetupDlg.cpp            |   74 ++++++++++++--------
     src/libs/print/libprint/MarginView.cpp             |   24 ++++---
     src/libs/print/libprint/PageSetupDlg.cpp           |   26 ++++---
     src/libs/print/libprint/Preview.cpp                |   41 +++++++----
     src/libs/print/libprint/StatusWindow.cpp           |   29 ++++----
     16 files changed, 343 insertions(+), 94 deletions(-)
    
    diff --git a/src/add-ons/print/drivers/canon_lips/lips3/Jamfile b/src/add-ons/print/drivers/canon_lips/lips3/Jamfile
    index b74e921..f62ad14c 100644
    a b SubDirHdrs [ FDirName $(HAIKU_TOP) headers libs print libprint ] ;  
    66
    77AddResources Canon\ LIPS3\ Compatible : Lips3.rdef ;
    88
     9# libprint.a source files for collecting catalogs
     10local libprintLocalizeFiles =
     11    libprint/AddPrinterDlg.cpp
     12    libprint/GraphicsDriver.cpp
     13    libprint/HalftoneView.cpp
     14    libprint/JobSetupDlg.cpp
     15    libprint/MarginView.cpp
     16    libprint/PageSetupDlg.cpp
     17    libprint/Preview.cpp
     18    libprint/StatusWindow.cpp
     19;
     20
     21local LocalizeLibFiles ;
     22local file ;
     23for file in $(libprintLocalizeFiles) {
     24    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     25}
     26
    927Addon Canon\ LIPS3\ Compatible :
    1028    Lips3Entry.cpp
    1129    Lips3.cpp
    1230    Lips3Cap.cpp
    1331    Compress3.cpp
    14     : be libprint.a $(TARGET_LIBSTDC++)
     32    : be libprint.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
     33;
     34
     35DoCatalogs Canon\ LIPS3\ Compatible :
     36    x-vnd.lips3-compatible
     37    :
     38    $(LocalizeLibFiles)
    1539;
    1640
    1741Package haiku-printingkit-cvs :
  • src/add-ons/print/drivers/canon_lips/lips4/Jamfile

    diff --git a/src/add-ons/print/drivers/canon_lips/lips4/Jamfile b/src/add-ons/print/drivers/canon_lips/lips4/Jamfile
    index 6ee5d7a..ff00059 100644
    a b SubDirHdrs [ FDirName $(HAIKU_TOP) headers libs print libprint ] ;  
    66
    77AddResources Canon\ LIPS4\ Compatible : Lips4.rdef ;
    88
     9# libprint.a source files for collecting catalogs
     10local libprintLocalizeFiles =
     11    libprint/AddPrinterDlg.cpp
     12    libprint/GraphicsDriver.cpp
     13    libprint/HalftoneView.cpp
     14    libprint/JobSetupDlg.cpp
     15    libprint/MarginView.cpp
     16    libprint/PageSetupDlg.cpp
     17    libprint/Preview.cpp
     18    libprint/StatusWindow.cpp
     19;
     20
     21local LocalizeLibFiles ;
     22local file ;
     23for file in $(libprintLocalizeFiles) {
     24    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     25}
     26
    927Addon Canon\ LIPS4\ Compatible :
    1028    Lips4Entry.cpp
    1129    Lips4.cpp
    1230    Lips4Cap.cpp
    13     : be libprint.a $(TARGET_LIBSTDC++)
     31    : be libprint.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
     32;
     33
     34DoCatalogs Canon\ LIPS4\ Compatible :
     35    x-vnd.lips4-compatible
     36    :
     37    $(LocalizeLibFiles)
    1438;
    1539
    1640Package haiku-printingkit-cvs :
  • src/add-ons/print/drivers/gutenprint/Jamfile

    diff --git a/src/add-ons/print/drivers/gutenprint/Jamfile b/src/add-ons/print/drivers/gutenprint/Jamfile
    index e9b76a0..990ab2b 100644
    a b SubDirHdrs [ FDirName $(HAIKU_TOP) headers libs print libprint ] ;  
    55
    66AddResources Gutenprint : Gutenprint.rdef ;
    77
     8# libprint.a source files for collecting catalogs
     9local libprintLocalizeFiles =
     10    libprint/AddPrinterDlg.cpp
     11    libprint/GraphicsDriver.cpp
     12    libprint/HalftoneView.cpp
     13    libprint/JobSetupDlg.cpp
     14    libprint/MarginView.cpp
     15    libprint/PageSetupDlg.cpp
     16    libprint/Preview.cpp
     17    libprint/StatusWindow.cpp
     18;
     19
     20local LocalizeLibFiles ;
     21local file ;
     22for file in $(libprintLocalizeFiles) {
     23    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     24}
     25
    826Addon Gutenprint :
    927    GPBand.cpp
    1028    GPBinding.cpp
    Addon Gutenprint :  
    2240    libgutenprint.a
    2341    libprint.a
    2442    $(TARGET_LIBSTDC++)
     43    $(HAIKU_LOCALE_LIBS)
    2544;
     45
     46DoCatalogs Gutenprint :
     47    x-vnd.gutenprint
     48    :
     49    $(LocalizeLibFiles)
     50;
     51
  • src/add-ons/print/drivers/pcl5/Jamfile

    diff --git a/src/add-ons/print/drivers/pcl5/Jamfile b/src/add-ons/print/drivers/pcl5/Jamfile
    index 8cfefff..ee30aa6 100644
    a b SubDirHdrs [ FDirName $(HAIKU_TOP) headers libs print libprint ] ;  
    66
    77AddResources PCL5\ Compatible : PCL5.rdef ;
    88
     9# libprint.a source files for collecting catalogs
     10local libprintLocalizeFiles =
     11    libprint/AddPrinterDlg.cpp
     12    libprint/GraphicsDriver.cpp
     13    libprint/HalftoneView.cpp
     14    libprint/JobSetupDlg.cpp
     15    libprint/MarginView.cpp
     16    libprint/PageSetupDlg.cpp
     17    libprint/Preview.cpp
     18    libprint/StatusWindow.cpp
     19;
     20
     21local LocalizeLibFiles ;
     22local file ;
     23for file in $(libprintLocalizeFiles) {
     24    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     25}
     26
    927Addon PCL5\ Compatible :
    1028    PCL5Entry.cpp
    1129    PCL5.cpp
    1230    PCL5Cap.cpp
    13     : be libprint.a $(TARGET_LIBSTDC++)
     31    : be libprint.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
     32;
     33
     34DoCatalogs PCL5\ Compatible :
     35    x-vnd.pcl5-compatible
     36    :
     37    $(LocalizeLibFiles)
    1438;
    1539
    1640Package haiku-printingkit-cvs :
  • src/add-ons/print/drivers/pcl6/Jamfile

    diff --git a/src/add-ons/print/drivers/pcl6/Jamfile b/src/add-ons/print/drivers/pcl6/Jamfile
    index c55e927..4853ffc 100644
    a b SubDirHdrs [ FDirName $(HAIKU_TOP) headers libs print libprint ] ;  
    66
    77AddResources PCL6\ Compatible : PCL6.rdef ;
    88
     9# libprint.a source files for collecting catalogs
     10local libprintLocalizeFiles =
     11    libprint/AddPrinterDlg.cpp
     12    libprint/GraphicsDriver.cpp
     13    libprint/HalftoneView.cpp
     14    libprint/JobSetupDlg.cpp
     15    libprint/MarginView.cpp
     16    libprint/PageSetupDlg.cpp
     17    libprint/Preview.cpp
     18    libprint/StatusWindow.cpp
     19;
     20
     21local LocalizeLibFiles ;
     22local file ;
     23for file in $(libprintLocalizeFiles) {
     24    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     25}
     26
    927Addon PCL6\ Compatible :
    1028    DeltaRowCompression.cpp
    1129    PCL6Entry.cpp
    Addon PCL6\ Compatible :  
    1432    PCL6Rasterizer.cpp
    1533    PCL6Writer.cpp
    1634    Rasterizer.cpp
    17     : be libprint.a $(TARGET_LIBSTDC++)
     35    : be libprint.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
     36;
     37
     38DoCatalogs PCL6\ Compatible :
     39    x-vnd.pcl6-compatible
     40    :
     41    $(LocalizeLibFiles)
    1842;
    1943
    2044Package haiku-printingkit-cvs :
  • src/add-ons/print/drivers/pdf/source/Jamfile

    diff --git a/src/add-ons/print/drivers/pdf/source/Jamfile b/src/add-ons/print/drivers/pdf/source/Jamfile
    index 8518c86..d4fe18c 100644
    a b AddResources PDF\ Writer :  
    1010    PDFWriter.rdef
    1111;
    1212
     13# libprint.a source files for collecting catalogs
     14local libprintLocalizeFiles =
     15    libprint/AddPrinterDlg.cpp
     16    libprint/GraphicsDriver.cpp
     17    libprint/HalftoneView.cpp
     18    libprint/JobSetupDlg.cpp
     19    libprint/MarginView.cpp
     20    libprint/PageSetupDlg.cpp
     21    libprint/Preview.cpp
     22    libprint/StatusWindow.cpp
     23;
     24
     25local LocalizeLibFiles ;
     26local file ;
     27for file in $(libprintLocalizeFiles) {
     28    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     29}
     30
    1331Addon PDF\ Writer :
    1432    AboutText.cpp
    1533    AdvancedSettingsWindow.cpp
    Addon PDF\ Writer :  
    4967    libprint.a
    5068    libprintutils.a
    5169    $(TARGET_LIBSUPC++)
     70    $(HAIKU_LOCALE_LIBS)
     71;
     72
     73DoCatalogs PDF\ Writer :
     74    x-vnd.obos.pdfwriter
     75    :
     76    $(LocalizeLibFiles)
    5277;
    5378
    5479Package haiku-pdf_writer-cvs :
  • src/add-ons/print/drivers/postscript/Jamfile

    diff --git a/src/add-ons/print/drivers/postscript/Jamfile b/src/add-ons/print/drivers/postscript/Jamfile
    index 6a22891..ebb7489 100644
    a b SubDirHdrs [ FDirName $(HAIKU_TOP) headers libs print libprint ] ;  
    66
    77AddResources PS\ Compatible : PS.rdef ;
    88
     9# libprint.a source files for collecting catalogs
     10local libprintLocalizeFiles =
     11    libprint/AddPrinterDlg.cpp
     12    libprint/GraphicsDriver.cpp
     13    libprint/HalftoneView.cpp
     14    libprint/JobSetupDlg.cpp
     15    libprint/MarginView.cpp
     16    libprint/PageSetupDlg.cpp
     17    libprint/Preview.cpp
     18    libprint/StatusWindow.cpp
     19;
     20
     21local LocalizeLibFiles ;
     22local file ;
     23for file in $(libprintLocalizeFiles) {
     24    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     25}
     26
    927Addon PS\ Compatible :
    1028    PSEntry.cpp
    1129    PS.cpp
    Addon PS\ Compatible :  
    1432    SelectPPDDlg.cpp
    1533    PPDParser.cpp
    1634    FilterIO.cpp
    17     : be libprint.a $(TARGET_LIBSTDC++)
     35    : be libprint.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
     36;
     37
     38DoCatalogs PS\ Compatible :
     39    x-vnd.ps-compatible
     40    :
     41    $(LocalizeLibFiles)
    1842;
    1943
    2044Package haiku-printingkit-cvs :
  • src/add-ons/print/drivers/preview/Jamfile

    diff --git a/src/add-ons/print/drivers/preview/Jamfile b/src/add-ons/print/drivers/preview/Jamfile
    index b46fb81..afb177b 100644
    a b SubDirHdrs [ FDirName $(HAIKU_TOP) headers libs print libprint ] ;  
    66
    77AddResources Preview : Preview.rdef ;
    88
     9# libprint.a source files for collecting catalogs
     10local libprintLocalizeFiles =
     11    libprint/AddPrinterDlg.cpp
     12    libprint/GraphicsDriver.cpp
     13    libprint/HalftoneView.cpp
     14    libprint/JobSetupDlg.cpp
     15    libprint/MarginView.cpp
     16    libprint/PageSetupDlg.cpp
     17    libprint/Preview.cpp
     18    libprint/StatusWindow.cpp
     19;
     20
     21local LocalizeLibFiles ;
     22local file ;
     23for file in $(libprintLocalizeFiles) {
     24    LocalizeLibFiles += [ FDirName $(HAIKU_TOP) src libs print $(file) ] ;
     25}
     26
    927Addon Preview :
    1028    PageSetupWindow.cpp
    1129    JobSetupWindow.cpp
    1230    Driver.cpp
    1331    PrinterDriver.cpp
    1432    PreviewDriver.cpp
    15     : be libprint.a $(TARGET_LIBSTDC++)
     33    : be libprint.a $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS)
     34;
     35
     36DoCatalogs Preview :
     37    x-vnd.preview
     38    :
     39    $(LocalizeLibFiles)
    1640;
    1741
    1842Package haiku-printingkit-cvs :
    1943    Preview :
    2044    boot home config add-ons Print ;
     45
  • src/libs/print/libprint/AddPrinterDlg.cpp

    diff --git a/src/libs/print/libprint/AddPrinterDlg.cpp b/src/libs/print/libprint/AddPrinterDlg.cpp
    index 719b35e..d5e1d76 100644
    a b  
    11#include "AddPrinterDlg.h"
    22
     3#include <Catalog.h>
    34#include <GroupLayoutBuilder.h>
    45
    56#include "PrinterCap.h"
    67#include "PrinterData.h"
    78
    89
     10#undef B_TRANSLATION_CONTEXT
     11#define B_TRANSLATION_CONTEXT "libprint_AddPrinterDlg"
     12
    913enum MSGS {
    1014    kMsgCancel = 1,
    1115    kMsgOK,
    AddPrinterView::AttachedToWindow()  
    5357{
    5458    // protocol class box
    5559    BBox* protocolClassBox = new BBox("protocolClass");
    56     protocolClassBox->SetLabel("Protocol Classes:");
     60    protocolClassBox->SetLabel(B_TRANSLATE("Protocol Classes:"));
    5761   
    5862    // protocol class
    5963    fProtocolClassList = new BListView("protocolClassList");
    AddPrinterView::AttachedToWindow()  
    8892   
    8993    // description of protocol class box
    9094    BBox* descriptionBox = new BBox("descriptionBox");
    91     descriptionBox->SetLabel("Description:");
     95    descriptionBox->SetLabel(B_TRANSLATE("Description:"));
    9296
    9397    // description of protocol class
    9498    fDescription = new BTextView("description");
    AddPrinterView::AttachedToWindow()  
    109113    separator->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 1));
    110114
    111115    // buttons
    112     BButton* cancel = new BButton("cancel", "Cancel",
     116    BButton* cancel = new BButton("cancel", B_TRANSLATE("Cancel"),
    113117        new BMessage(kMsgCancel));
    114     BButton* ok = new BButton("ok", "OK", new BMessage(kMsgOK));
     118    BButton* ok = new BButton("ok", B_TRANSLATE("OK"), new BMessage(kMsgOK));
    115119    ok->MakeDefault(true);
    116120
    117121    SetLayout(new BGroupLayout(B_VERTICAL));
    AddPrinterDlg::AddPrinterDlg(PrinterData* printerData,  
    175179    const PrinterCap *printerCap)
    176180    :
    177181    DialogWindow(BRect(100, 100, 120, 120),
    178         "Add Printer", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
     182        B_TRANSLATE("Add Printer"),
     183        B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
    179184        B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
    180185            | B_AUTO_UPDATE_SIZE_LIMITS)
    181186{
  • src/libs/print/libprint/GraphicsDriver.cpp

    diff --git a/src/libs/print/libprint/GraphicsDriver.cpp b/src/libs/print/libprint/GraphicsDriver.cpp
    index aa6994f..52efca3 100644
    a b  
    99
    1010#include <Alert.h>
    1111#include <Bitmap.h>
     12#include <Catalog.h>
    1213#include <Debug.h>
    1314#include <Message.h>
    1415#include <PrintJob.h>
     
    3031#include "ValidRect.h"
    3132#include "DbgMsg.h"
    3233
     34#undef B_TRANSLATION_CONTEXT
     35#define B_TRANSLATION_CONTEXT "libprint_GraphicsDriver"
    3336
    3437using namespace std;
    3538
    GraphicsDriver::_PrintJob(BFile* spoolFile)  
    699702    if (success == false) {
    700703        BAlert *alert;
    701704        if (fTransport->CheckAbort())
    702             alert = new BAlert("", fTransport->LastError().c_str(), "OK");
     705            alert = new BAlert("", fTransport->LastError().c_str(),
     706                B_TRANSLATE("OK"));
    703707        else
    704             alert = new BAlert("", "Printer not responding.", "OK");
     708            alert = new BAlert("", B_TRANSLATE("Printer not responding."),
     709                B_TRANSLATE("OK"));
    705710        alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
    706711        alert->Go();
    707712    }
  • src/libs/print/libprint/HalftoneView.cpp

    diff --git a/src/libs/print/libprint/HalftoneView.cpp b/src/libs/print/libprint/HalftoneView.cpp
    index 638f327..8031921 100644
    a b  
    11#include "HalftoneView.h"
    22
    33#include <Bitmap.h>
     4#include <Catalog.h>
    45#include <StringView.h>
    56
     7#undef B_TRANSLATION_CONTEXT
     8#define B_TRANSLATION_CONTEXT "libprint_HalftoneView"
    69
    710HalftonePreviewView::HalftonePreviewView(BRect frame, const char* name,
    811    uint32 resizeMask, uint32 flags)
    HalftoneView::HalftoneView(BRect frame, const char* name, uint32 resizeMask,  
    144147    const float blue_top  = green_top + delta;
    145148    const float gray_top  = r.bottom - delta;
    146149   
    147     const char* kRedLabel   = "Red: ";
    148     const char* kGreenLabel = "Green: ";
    149     const char* kBlueLabel  = "Blue: ";
    150     const char* kGrayLabel  = "Black: ";
     150    const char* kRedLabel   = B_TRANSLATE("Red: ");
     151    const char* kGreenLabel = B_TRANSLATE("Green: ");
     152    const char* kBlueLabel  = B_TRANSLATE("Blue: ");
     153    const char* kGrayLabel  = B_TRANSLATE("Black: ");
    151154   
    152155
    153156    BFont font(be_plain_font);
  • src/libs/print/libprint/JobSetupDlg.cpp

    diff --git a/src/libs/print/libprint/JobSetupDlg.cpp b/src/libs/print/libprint/JobSetupDlg.cpp
    index 93d1012..4e9d7f5 100644
    a b  
    1616#include <Bitmap.h>
    1717#include <Box.h>
    1818#include <Button.h>
     19#include <Catalog.h>
    1920#include <CheckBox.h>
    2021#include <Debug.h>
    2122#include <GridView.h>
     
    4647#include "PrinterCap.h"
    4748#include "DbgMsg.h"
    4849
     50#undef B_TRANSLATION_CONTEXT
     51#define B_TRANSLATION_CONTEXT "libprint_JobSetupDlg"
    4952
    5053using namespace std;
    5154
    static const NupCap gNup32("32", false, 32);  
    8891static const NupCap gNup36("36", false, 36);
    8992
    9093
    91 static const DitherCap gDitherType1("Crosshatch", false, Halftone::kType1);
    92 static const DitherCap gDitherType2("Grid", false, Halftone::kType2);
    93 static const DitherCap gDitherType3("Stipple", false, Halftone::kType3);
    94 static const DitherCap gDitherFloydSteinberg("Floyd-Steinberg", false,
    95     Halftone::kTypeFloydSteinberg);
     94static const DitherCap gDitherType1(B_TRANSLATE("Crosshatch"),
     95        false, Halftone::kType1);
     96static const DitherCap gDitherType2(B_TRANSLATE("Grid"),
     97        false, Halftone::kType2);
     98static const DitherCap gDitherType3(B_TRANSLATE("Stipple"),
     99        false, Halftone::kType3);
     100static const DitherCap gDitherFloydSteinberg(B_TRANSLATE("Floyd-Steinberg"),
     101        false, Halftone::kTypeFloydSteinberg);
    96102
    97103
    98104const BaseCap *gNups[] = {
    JobSetupView::AttachedToWindow()  
    195201{
    196202    // quality
    197203    BBox* qualityBox = new BBox("quality");
    198     qualityBox->SetLabel("Quality");
     204    qualityBox->SetLabel(B_TRANSLATE("Quality"));
    199205
    200206    // color
    201207    fColorType = new BPopUpMenu("color");
    202208    fColorType->SetRadioMode(true);
    203209    FillCapabilityMenu(fColorType, kMsgQuality, PrinterCap::kColor,
    204210        fJobData->GetColor());
    205     BMenuField* colorMenuField = new BMenuField("color", "Color:", fColorType);
     211    BMenuField* colorMenuField = new BMenuField("color", B_TRANSLATE("Color:"),
     212        fColorType);
    206213    fColorType->SetTargetForItems(this);
    207214
    208215    if (IsHalftoneConfigurationNeeded())
    JobSetupView::AttachedToWindow()  
    211218    // page range
    212219
    213220    BBox* pageRangeBox = new BBox("pageRange");
    214     pageRangeBox->SetLabel("Page Range");
     221    pageRangeBox->SetLabel(B_TRANSLATE("Page Range"));
    215222
    216     fAll = new BRadioButton("all", "Print all Pages", new BMessage(kMsgRangeAll));
     223    fAll = new BRadioButton("all", B_TRANSLATE("Print all Pages"),
     224        new BMessage(kMsgRangeAll));
    217225
    218     BRadioButton *range = new BRadioButton("selection", "Print selected Pages:",
     226    BRadioButton *range = new BRadioButton("selection",
     227        B_TRANSLATE("Print selected Pages:"),
    219228        new BMessage(kMsgRangeSelection));
    220229
    221     fFromPage = new BTextControl("from", "From:", "", NULL);
     230    fFromPage = new BTextControl("from", B_TRANSLATE("From:"), "", NULL);
    222231    fFromPage->SetAlignment(B_ALIGN_LEFT, B_ALIGN_RIGHT);
    223232    AllowOnlyDigits(fFromPage->TextView(), 6);
    224233
    225     fToPage = new BTextControl("to", "To:", "", NULL);
     234    fToPage = new BTextControl("to", B_TRANSLATE("To:"), "", NULL);
    226235    fToPage->SetAlignment(B_ALIGN_LEFT, B_ALIGN_RIGHT);
    227236    AllowOnlyDigits(fToPage->TextView(), 6);
    228237
    JobSetupView::AttachedToWindow()  
    256265    FillCapabilityMenu(fPaperFeed, kMsgNone, PrinterCap::kPaperSource,
    257266        fJobData->GetPaperSource());
    258267    BMenuField* paperSourceMenufield = new BMenuField("paperSource",
    259         "Paper Source:", fPaperFeed);
     268        B_TRANSLATE("Paper Source:"), fPaperFeed);
    260269
    261270    // Pages per sheet
    262271    fNup = new BPopUpMenu("");
    JobSetupView::AttachedToWindow()  
    264273    FillCapabilityMenu(fNup, kMsgNone, gNups,
    265274        sizeof(gNups) / sizeof(gNups[0]), (int)fJobData->GetNup());
    266275    BMenuField* pagesPerSheet = new BMenuField("pagesPerSheet",
    267         "Pages Per Sheet:", fNup);
     276        B_TRANSLATE("Pages Per Sheet:"), fNup);
    268277
    269278    // duplex
    270279    if (fPrinterCap->Supports(PrinterCap::kPrintStyle)) {
    271         fDuplex = new BCheckBox("duplex", "Duplex",
     280        fDuplex = new BCheckBox("duplex", B_TRANSLATE("Duplex"),
    272281            new BMessage(kMsgDuplexChanged));
    273282        if (fJobData->GetPrintStyle() != JobData::kSimplex) {
    274283            fDuplex->SetValue(B_CONTROL_ON);
    JobSetupView::AttachedToWindow()  
    279288    }
    280289
    281290    // copies
    282     fCopies = new BTextControl("copies", "Number of Copies:", "", NULL);
     291    fCopies = new BTextControl("copies", B_TRANSLATE("Number of Copies:"),
     292        "", NULL);
    283293    AllowOnlyDigits(fCopies->TextView(), 3);
    284294
    285295    BString copies;
    JobSetupView::AttachedToWindow()  
    287297    fCopies->SetText(copies.String());
    288298
    289299    // collate
    290     fCollate = new BCheckBox("collate", "Collate",
     300    fCollate = new BCheckBox("collate", B_TRANSLATE("Collate"),
    291301        new BMessage(kMsgCollateChanged));
    292302    if (fJobData->GetCollate()) {
    293303        fCollate->SetValue(B_CONTROL_ON);
    JobSetupView::AttachedToWindow()  
    295305    fCollate->SetTarget(this);
    296306
    297307    // reverse
    298     fReverse = new BCheckBox("reverse", "Reverse Order",
     308    fReverse = new BCheckBox("reverse", B_TRANSLATE("Reverse Order"),
    299309        new BMessage(kMsgReverseChanged));
    300310    if (fJobData->GetReverse()) {
    301311        fReverse->SetValue(B_CONTROL_ON);
    JobSetupView::AttachedToWindow()  
    313323
    314324    // page selection
    315325    BBox* pageSelectionBox = new BBox("pageSelection");
    316     pageSelectionBox->SetLabel("Page Selection");
     326    pageSelectionBox->SetLabel(B_TRANSLATE("Page Selection"));
    317327
    318     fAllPages = CreatePageSelectionItem("allPages", "All Pages",
     328    fAllPages = CreatePageSelectionItem("allPages",
     329        B_TRANSLATE("All Pages"),
    319330        JobData::kAllPages);
    320331    fOddNumberedPages = CreatePageSelectionItem("oddPages",
    321         "Odd-Numbered Pages", JobData::kOddNumberedPages);
     332        B_TRANSLATE("Odd-Numbered Pages"), JobData::kOddNumberedPages);
    322333    fEvenNumberedPages = CreatePageSelectionItem("evenPages",
    323         "Even-Numbered Pages", JobData::kEvenNumberedPages);
     334        B_TRANSLATE("Even-Numbered Pages"), JobData::kEvenNumberedPages);
    324335
    325     fPreview = new BCheckBox("preview", "Show preview before printing", NULL);
     336    fPreview = new BCheckBox("preview",
     337        B_TRANSLATE("Show preview before printing"), NULL);
    326338    if (fJobData->GetShowPreview())
    327339        fPreview->SetValue(B_CONTROL_ON);
    328340
    JobSetupView::AttachedToWindow()  
    331343    separator->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 1));
    332344
    333345    // buttons
    334     BButton* cancel = new BButton("cancel", "Cancel",
     346    BButton* cancel = new BButton("cancel", B_TRANSLATE("Cancel"),
    335347        new BMessage(kMsgCancel));
    336     BButton* ok = new BButton("ok", "OK", new BMessage(kMsgOK));
     348    BButton* ok = new BButton("ok", B_TRANSLATE("OK"), new BMessage(kMsgOK));
    337349    ok->MakeDefault(true);
    338350
    339351    if (IsHalftoneConfigurationNeeded()) {
    JobSetupView::CreateHalftoneConfigurationUI()  
    465477    FillCapabilityMenu(fDitherType, kMsgQuality, gDitherTypes,
    466478        sizeof(gDitherTypes) / sizeof(gDitherTypes[0]),
    467479        (int)fJobData->GetDitherType());
    468     fDitherMenuField = new BMenuField("dithering", "Dot Pattern:",
     480    fDitherMenuField = new BMenuField("dithering", B_TRANSLATE("Dot Pattern:"),
    469481        fDitherType);
    470482    fDitherType->SetTargetForItems(this);
    471483
    JobSetupView::CreateHalftoneConfigurationUI()  
    482494    fHalftone->SetExplicitMaxSize(size);
    483495
    484496    // gamma
    485     fGamma = new JSDSlider("gamma", "Gamma", new BMessage(kMsgQuality),
     497    fGamma = new JSDSlider("gamma", B_TRANSLATE("Gamma"), new BMessage(kMsgQuality),
    486498        -300, 300);
    487499
    488     fGamma->SetLimitLabels("Lighter", "Darker");
     500    fGamma->SetLimitLabels(B_TRANSLATE("Lighter"), B_TRANSLATE("Darker"));
    489501    fGamma->SetValue((int32)(100 * log(fJobData->GetGamma()) / log(2.0)));
    490502    fGamma->SetHashMarks(B_HASH_MARKS_BOTH);
    491503    fGamma->SetHashMarkCount(7);
    JobSetupView::CreateHalftoneConfigurationUI()  
    493505    fGamma->SetTarget(this);
    494506
    495507    // ink density
    496     fInkDensity = new JSDSlider("inkDensity", "Ink Usage",
     508    fInkDensity = new JSDSlider("inkDensity", B_TRANSLATE("Ink Usage"),
    497509        new BMessage(kMsgQuality), 0, 127);
    498510
    499     fInkDensity->SetLimitLabels("Min", "Max");
     511    fInkDensity->SetLimitLabels(B_TRANSLATE("Min"), B_TRANSLATE("Max"));
    500512    fInkDensity->SetValue((int32)fJobData->GetInkDensity());
    501513    fInkDensity->SetHashMarks(B_HASH_MARKS_BOTH);
    502514    fInkDensity->SetHashMarkCount(10);
    JobSetupView::UpdateJobData()  
    10131025JobSetupDlg::JobSetupDlg(JobData* jobData, PrinterData* printerData,
    10141026    const PrinterCap* printerCap)
    10151027    :
    1016     DialogWindow(BRect(100, 100, 200, 200), "PrintJob Setup",
     1028    DialogWindow(BRect(100, 100, 200, 200), B_TRANSLATE("PrintJob Setup"),
    10171029        B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
    10181030        B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
    10191031            | B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS
  • src/libs/print/libprint/MarginView.cpp

    diff --git a/src/libs/print/libprint/MarginView.cpp b/src/libs/print/libprint/MarginView.cpp
    index 3da3b42..390b407 100644
    a b THE SOFTWARE.  
    3737
    3838
    3939#include <AppKit.h>
     40#include <Catalog.h>
    4041#include <GridView.h>
    4142#include <GridLayout.h>
    4243#include <GroupLayout.h>
    THE SOFTWARE.  
    4849#include <stdio.h>
    4950#include <stdlib.h>
    5051
     52#undef B_TRANSLATION_CONTEXT
     53#define B_TRANSLATION_CONTEXT "libprint_MarginView"
    5154
    5255/*----------------- MarginView Private Constants --------------------*/
    5356
    const static float kMinFieldWidth = 100; // pixels  
    6568const static float kMinUnitHeight = 30; // pixels
    6669
    6770const static float kUnitFormat[] = { kInchUnits, kCMUnits, kPointUnits };
    68 const static char *kUnitNames[] = { "Inch", "cm", "Points", NULL };
     71const static char *kUnitNames[] = {
     72                                     B_TRANSLATE_MARK("Inch"),
     73                                     B_TRANSLATE_MARK("cm"),
     74                                     B_TRANSLATE_MARK("Points"),
     75                                     NULL };
    6976const static MarginUnit kUnitMsg[] = { kUnitInch, kUnitCM, kUnitPoint };
    7077
    7178const pattern kDots = {{ 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55 }};
    MarginView::MarginView(int32 pageWidth, int32 pageHeight,  
    157164    fMarginUnit = units;
    158165    fUnitValue = kUnitFormat[units];
    159166
    160     SetLabel("Margins");
     167    SetLabel(B_TRANSLATE("Margins"));
    161168
    162169    fMargins = margins;
    163170
    MarginView::_ConstructGUI()  
    393400
    394401    // top
    395402    str << fMargins.top/fUnitValue;
    396     fTop = new BTextControl("top", "Top:", str.String(), NULL);
     403    fTop = new BTextControl("top", B_TRANSLATE("Top:"), str.String(), NULL);
    397404
    398405    fTop->SetModificationMessage(new BMessage(TOP_MARGIN_CHANGED));
    399406    fTop->SetTarget(this);
    MarginView::_ConstructGUI()  
    402409    //left
    403410    str = "";
    404411    str << fMargins.left/fUnitValue;
    405     fLeft = new BTextControl("left", "Left:", str.String(), NULL);
     412    fLeft = new BTextControl("left", B_TRANSLATE("Left:"), str.String(), NULL);
    406413
    407414    fLeft->SetModificationMessage(new BMessage(LEFT_MARGIN_CHANGED));
    408415    fLeft->SetTarget(this);
    MarginView::_ConstructGUI()  
    411418    //bottom
    412419    str = "";
    413420    str << fMargins.bottom/fUnitValue;
    414     fBottom = new BTextControl("bottom", "Bottom:", str.String(), NULL);
     421    fBottom = new BTextControl("bottom", B_TRANSLATE("Bottom:"), str.String(), NULL);
    415422
    416423    fBottom->SetModificationMessage(new BMessage(BOTTOM_MARGIN_CHANGED));
    417424    fBottom->SetTarget(this);
    MarginView::_ConstructGUI()  
    420427    //right
    421428    str = "";
    422429    str << fMargins.right/fUnitValue;
    423     fRight = new BTextControl("right", "Right:", str.String(), NULL);
     430    fRight = new BTextControl("right", B_TRANSLATE("Right:"), str.String(), NULL);
    424431
    425432    fRight->SetModificationMessage(new BMessage(RIGHT_MARGIN_CHANGED));
    426433    fRight->SetTarget(this);
    MarginView::_ConstructGUI()  
    429436    // Create Units popup
    430437
    431438    BPopUpMenu *menu = new BPopUpMenu("units");
    432     BMenuField *units = new BMenuField("units", "Units:", menu);
     439    BMenuField *units = new BMenuField("units", B_TRANSLATE("Units:"), menu);
    433440
    434441    BMenuItem *item;
    435442    // Construct menu items
    436443    for (int32 i = 0; kUnitNames[i] != NULL; i++) {
    437444        BMessage *msg = new BMessage(MARGIN_UNIT_CHANGED);
    438445        msg->AddInt32("marginUnit", kUnitMsg[i]);
    439         menu->AddItem(item = new BMenuItem(kUnitNames[i], msg));
     446        menu->AddItem(item = new BMenuItem(B_TRANSLATE_NOCOLLECT(kUnitNames[i]),
     447            msg));
    440448        item->SetTarget(this);
    441449        if (fMarginUnit == kUnitMsg[i])
    442450            item->SetMarked(true);
  • src/libs/print/libprint/PageSetupDlg.cpp

    diff --git a/src/libs/print/libprint/PageSetupDlg.cpp b/src/libs/print/libprint/PageSetupDlg.cpp
    index a23f659..473e7e7 100644
    a b  
    1414#include <Bitmap.h>
    1515#include <Box.h>
    1616#include <Button.h>
     17#include <Catalog.h>
    1718#include <Debug.h>
    1819#include <Font.h>
    1920#include <GridView.h>
     
    4344#include "PrinterCap.h"
    4445#include "PrintUtils.h"
    4546
     47#undef B_TRANSLATION_CONTEXT
     48#define B_TRANSLATION_CONTEXT "libprint_PageSetupDlg"
    4649
    4750using namespace std;
    4851
    PageSetupView::AttachedToWindow()  
    127130    }
    128131    if (!marked)
    129132        item->SetMarked(true);
    130     BMenuField* paperSize = new BMenuField("paperSize", "Paper Size:", fPaper);
     133    BMenuField* paperSize = new BMenuField("paperSize",
     134        B_TRANSLATE("Paper Size:"), fPaper);
    131135
    132136    // orientation
    133137    fOrientation = new BPopUpMenu("orientation");
    134138    fOrientation->SetRadioMode(true);
    135139
    136     BMenuField* orientation = new BMenuField("orientation", "Orientation:", fOrientation);
     140    BMenuField* orientation = new BMenuField("orientation",
     141        B_TRANSLATE("Orientation:"), fOrientation);
    137142
    138143    count = fPrinterCap->CountCap(PrinterCap::kOrientation);
    139144    if (count == 0) {
    140         AddOrientationItem("Portrait", JobData::kPortrait);
    141         AddOrientationItem("Landscape", JobData::kLandscape);
     145        AddOrientationItem(B_TRANSLATE("Portrait"), JobData::kPortrait);
     146        AddOrientationItem(B_TRANSLATE("Landscape"), JobData::kLandscape);
    142147    } else {
    143148        OrientationCap **orientation_cap = (OrientationCap **)fPrinterCap->GetCaps(PrinterCap::kOrientation);
    144149        while (count--) {
    PageSetupView::AttachedToWindow()  
    167172    }
    168173    if (!marked)
    169174        item->SetMarked(true);
    170     BMenuField* resolution = new BMenuField("resolution", "Resolution:", fResolution);
     175    BMenuField* resolution = new BMenuField("resolution",
     176        B_TRANSLATE("Resolution:"), fResolution);
    171177
    172178    // scale
    173179    BString scale;
    174180    scale << (int)fJobData->GetScaling();
    175     fScaling = new BTextControl("scale", "Scale [%]:",
     181    fScaling = new BTextControl("scale", B_TRANSLATE("Scale [%]:"),
    176182                                    scale.String(),
    177183                                    NULL);
    178184    int num;
    PageSetupView::AttachedToWindow()  
    185191    fScaling->TextView()->SetMaxBytes(3);
    186192
    187193    // cancel and ok
    188     BButton* cancel = new BButton("cancel", "Cancel", new BMessage(kMsgCancel));
    189     BButton* ok = new BButton("ok", "OK", new BMessage(kMsgOK));
     194    BButton* cancel = new BButton("cancel", B_TRANSLATE("Cancel"),
     195        new BMessage(kMsgCancel));
     196    BButton* ok = new BButton("ok", B_TRANSLATE("OK"), new BMessage(kMsgOK));
    190197
    191198    ok->MakeDefault(true);
    192199
    PageSetupView::MessageReceived(BMessage *msg)  
    348355// TODO center window on screen
    349356PageSetupDlg::PageSetupDlg(JobData *job_data, PrinterData *printer_data, const PrinterCap *printer_cap)
    350357    : DialogWindow(BRect(100, 100, 160, 160),
    351         "Page Setup", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
     358        B_TRANSLATE("Page Setup"),
     359        B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
    352360        B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
    353361            | B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE)
    354362{
  • src/libs/print/libprint/Preview.cpp

    diff --git a/src/libs/print/libprint/Preview.cpp b/src/libs/print/libprint/Preview.cpp
    index db4d9d5..c01c672 100644
    a b  
    2020
    2121#include <Application.h>
    2222#include <Button.h>
     23#include <Catalog.h>
    2324#include <Debug.h>
    2425#include <Region.h>
    2526#include <Screen.h>
     
    2829#include <StringView.h>
    2930#include <TextControl.h>
    3031
     32#undef B_TRANSLATION_CONTEXT
     33#define B_TRANSLATION_CONTEXT "libprint_Preview"
    3134
    3235// #pragma mark - PreviewPage
    3336
    int32 PreviewView::_GetPageNumber(int32 index) const  
    779782
    780783
    781784PreviewWindow::PreviewWindow(BFile* jobFile, bool showOkAndCancelButtons)
    782     : BlockingWindow(BRect(20, 24, 400, 600), "Preview", B_TITLED_WINDOW,
     785    : BlockingWindow(BRect(20, 24, 400, 600), B_TRANSLATE("Preview"), B_TITLED_WINDOW,
    783786        B_ASYNCHRONOUS_CONTROLS)
    784787    , fButtonBarHeight(0.0)
    785788{
    PreviewWindow::PreviewWindow(BFile* jobFile, bool showOkAndCancelButtons)  
    792795
    793796    bounds.OffsetBy(10.0, 10.0);
    794797
    795     fFirst = new BButton(bounds, "first", "First Page", new BMessage(MSG_FIRST_PAGE));
     798    fFirst = new BButton(bounds, "first", B_TRANSLATE("First Page"),
     799        new BMessage(MSG_FIRST_PAGE));
    796800    panel->AddChild(fFirst);
    797801    fFirst->ResizeToPreferred();
    798802
    799803    bounds.OffsetBy(fFirst->Bounds().Width() + 10.0, 0.0);
    800     fPrev = new BButton(bounds, "previous", "Previous Page", new BMessage(MSG_PREV_PAGE));
     804    fPrev = new BButton(bounds, "previous", B_TRANSLATE("Previous Page"),
     805        new BMessage(MSG_PREV_PAGE));
    801806    panel->AddChild(fPrev);
    802807    fPrev->ResizeToPreferred();
    803808
    804809    bounds.OffsetBy(fPrev->Bounds().Width() + 10.0, 0.0);
    805     fNext = new BButton(bounds, "next", "Next Page", new BMessage(MSG_NEXT_PAGE));
     810    fNext = new BButton(bounds, "next", B_TRANSLATE("Next Page"),
     811        new BMessage(MSG_NEXT_PAGE));
    806812    panel->AddChild(fNext);
    807813    fNext->ResizeToPreferred();
    808814
    809815    bounds.OffsetBy(fNext->Bounds().Width() + 10.0, 0.0);
    810     fLast = new BButton(bounds, "last", "Last Page", new BMessage(MSG_LAST_PAGE));
     816    fLast = new BButton(bounds, "last", B_TRANSLATE("Last Page"),
     817        new BMessage(MSG_LAST_PAGE));
    811818    panel->AddChild(fLast);
    812819    fLast->ResizeToPreferred();
    813820
    PreviewWindow::PreviewWindow(BFile* jobFile, bool showOkAndCancelButtons)  
    832839    bounds.OffsetBy(fPageNumber->Bounds().Width() + 5.0, 0.0);
    833840    fPageText = new BStringView(bounds, "pageText", "");
    834841    panel->AddChild(fPageText);
    835     fPageText->ResizeTo(fPageText->StringWidth("of 99999 Pages"),
     842    fPageText->ResizeTo(fPageText->StringWidth(B_TRANSLATE("of 99999 Pages")),
    836843        fFirst->Bounds().Height());
    837844
    838845    bounds.OffsetBy(fPageText->Bounds().Width() + 10.0, 0.0);
    839     fZoomIn = new BButton(bounds, "zoomIn", "Zoom In", new BMessage(MSG_ZOOM_IN));
     846    fZoomIn = new BButton(bounds, "zoomIn", B_TRANSLATE("Zoom In"),
     847        new BMessage(MSG_ZOOM_IN));
    840848    panel->AddChild(fZoomIn);
    841849    fZoomIn->ResizeToPreferred();
    842850
    843851    bounds.OffsetBy(fZoomIn->Bounds().Width() + 10.0, 0.0);
    844     fZoomOut = new BButton(bounds, "ZoomOut", "Zoom Out", new BMessage(MSG_ZOOM_OUT));
     852    fZoomOut = new BButton(bounds, "ZoomOut", B_TRANSLATE("Zoom Out"),
     853        new BMessage(MSG_ZOOM_OUT));
    845854    panel->AddChild(fZoomOut);
    846855    fZoomOut->ResizeToPreferred();
    847856
    PreviewWindow::PreviewWindow(BFile* jobFile, bool showOkAndCancelButtons)  
    859868        // cancel printing if user closes the preview window
    860869        SetUserQuitResult(B_ERROR);
    861870
    862         BButton *printJob = new BButton(BRect(), "printJob", "Print",
     871        BButton *printJob = new BButton(BRect(), "printJob", B_TRANSLATE("Print"),
    863872            new BMessage(MSG_PRINT_JOB), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
    864873        panel->AddChild(printJob);
    865874        printJob->ResizeToPreferred();
    866875        printJob->MoveTo(bounds.right - (printJob->Bounds().Width() + 10.0),
    867876            bounds.bottom + 10.0);
    868877
    869         BButton *cancelJob = new BButton(BRect(), "cancelJob", "Cancel",
     878        BButton *cancelJob = new BButton(BRect(), "cancelJob", B_TRANSLATE("Cancel"),
    870879            new BMessage(MSG_CANCEL_JOB), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
    871880        panel->AddChild(cancelJob);
    872881        cancelJob->ResizeToPreferred();
    PreviewWindow::_UpdateControls()  
    10031012    text << fPreview->CurrentPage();
    10041013    fPageNumber->SetText(text.String());
    10051014
    1006     text.SetTo("of ");
    1007     text << fPreview->NumberOfPages() << " Page";
    1008     if (fPreview->NumberOfPages() > 1)
    1009         text.Append("s");
     1015    if (fPreview->NumberOfPages() == 1){
     1016        text.SetTo(B_TRANSLATE("of 1 Page"));
     1017    } else if (fPreview->NumberOfPages() > 1){
     1018        text.SetTo(B_TRANSLATE("of %Pages Pages"));
     1019        BString pages;
     1020        pages << fPreview->NumberOfPages();
     1021        text.ReplaceFirst("%Pages", pages);
     1022    }
    10101023    fPageText->SetText(text.String());
    10111024}
  • src/libs/print/libprint/StatusWindow.cpp

    diff --git a/src/libs/print/libprint/StatusWindow.cpp b/src/libs/print/libprint/StatusWindow.cpp
    index 450c32e..9911b33 100644
    a b  
    99#include "StatusWindow.h"
    1010
    1111#include <Button.h>
     12#include <Catalog.h>
    1213#include <GroupLayout.h>
    1314#include <GroupLayoutBuilder.h>
    1415#include <Message.h>
     
    2122#define CANCEL_MSG  'canM'
    2223#define HIDE_MSG    'hidM'
    2324
     25#undef B_TRANSLATION_CONTEXT
     26#define B_TRANSLATION_CONTEXT "libprint_StatusWindow"
    2427
    2528StatusWindow::StatusWindow(bool oddPages, bool evenPages, uint32 firstPage,
    2629    uint32 numPages, uint32 numCopies, uint32 nup)
    2730    :
    2831    BWindow(BRect(200, 200, 250, 250),
    29         "Print Status",
     32        B_TRANSLATE("Print Status"),
    3033        B_TITLED_WINDOW,
    3134        B_NOT_RESIZABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
    3235            | B_AUTO_UPDATE_SIZE_LIMITS)
    StatusWindow::StatusWindow(bool oddPages, bool evenPages, uint32 firstPage,  
    3942    //  numCopies   - total number of document copies
    4043   
    4144    // the status bar
    42     fStatusBar = new BStatusBar("statusBar", "Page: ");
     45    fStatusBar = new BStatusBar("statusBar", B_TRANSLATE("Page: "));
    4346   
    4447    // the cancel button
    45     fHideButton = new BButton("hideButton", "Hide Status",
     48    fHideButton = new BButton("hideButton", B_TRANSLATE("Hide Status"),
    4649        new BMessage(HIDE_MSG));
    4750
    48     fCancelButton = new BButton("cancelButton", "Cancel",
     51    fCancelButton = new BButton("cancelButton", B_TRANSLATE("Cancel"),
    4952        new BMessage(CANCEL_MSG));
    5053   
    5154    SetLayout(new BGroupLayout(B_VERTICAL));
    void  
    113116StatusWindow::ResetStatusBar(void)
    114117{
    115118    Lock();
    116         fStatusBar->Reset("Page:  ");
     119        fStatusBar->Reset(B_TRANSLATE("Page:  "));
    117120        InvalidateLayout(true);
    118121    Unlock();
    119122}
    StatusWindow::UpdateStatusBar(uint32 page, uint32 copy)  
    135138        string1.Append(BString(" / "));
    136139        string1.Append(string2);
    137140       
    138         BString string3 = BString("Remaining Document Copies:  ")
     141        BString string3;   
    139142        if (fDocumentCopy == true) {
    140             sprintf(buffer, "%d", (int)(fDocCopies));
    141             BString string4(buffer);
    142             string3.Append(string4);
     143            string3.SetToFormat(B_TRANSLATE("Remaining Document Copies:  %d"),
     144                (int)(fDocCopies));
    143145        } else {
    144             string3 = BString("Remaining Page Copies:  "); 
    145             char buffer[20];
    146             sprintf(buffer,"%d",(int)(fCopies - copy) );                       
    147             BString string4(buffer);
    148             string3.Append(string4);       
     146            string3.SetToFormat(B_TRANSLATE("Remaining Page Copies:  %d"),
     147                (int)(fCopies - copy));
    149148        }
    150149       
    151150        fStatusBar->Update(fStatusDelta * 100.0 / fNops,
    StatusWindow::MessageReceived(BMessage *message)  
    177176        case CANCEL_MSG:    // 'CancelButton' is pressed...
    178177            fCancelled = true;
    179178            fCancelButton->SetEnabled(false);
    180             fCancelButton->SetLabel("Job cancelled");
     179            fCancelButton->SetLabel(B_TRANSLATE("Job cancelled"));
    181180            InvalidateLayout(true);
    182181            break;
    183182