Ticket #5907: packageinstallerLocalization.patch

File packageinstallerLocalization.patch, 23.1 KB (added by Karvjorm, 12 years ago)

Localization patch for the PackageInstaller application

  • src/apps/packageinstaller/PackageStatus.cpp

     
    1010#include "PackageStatus.h"
    1111
    1212#include <Autolock.h>
    13 
     13#include <Catalog.h>
    1414#include <GroupLayoutBuilder.h>
    1515#include <GroupLayout.h>
     16#include <Locale.h>
    1617
    1718#include <stdio.h>
    1819#include <string.h>
    1920
    20 // Macro reserved for later localization
    21 #define T(x) x
     21#undef TR_CONTEXT
     22#define TR_CONTEXT "PackageStatus"
    2223
    23 
    2424StopButton::StopButton()
    25     :   BButton(BRect(0, 0, 22, 18), "stop", "", new BMessage(P_MSG_STOP))
     25    :   BButton(BRect(0, 0, 22, 18), "stop", TR("Stop"), new BMessage(P_MSG_STOP))
    2626{
    2727}
    2828
     
    100100{
    101101    SetLayout(new BGroupLayout(B_VERTICAL));
    102102
    103     fStatus = new BStatusBar("status_bar", T("Installing package"));
     103    fStatus = new BStatusBar("status_bar", TR("Installing package"));
    104104    fStatus->SetBarHeight(12);
    105105
    106106    fButton = new StopButton();
  • src/apps/packageinstaller/PackageInfo.cpp

     
    1111
    1212#include <Alert.h>
    1313#include <ByteOrder.h>
     14#include <Catalog.h>
    1415#include <FindDirectory.h>
     16#include <Locale.h>
    1517#include <Path.h>
    1618#include <kernel/OS.h>
    1719
    1820
    19 // Macro reserved for later localization
    20 #define T(x) x
     21#undef TR_CONTEXT
     22#define TR_CONTEXT "PackageInfo"
    2123
    2224#define RETURN_AND_SET_STATUS(err) fStatus = err; \
    23     fprintf(stderr, "err at %s():%d: %x\n", __FUNCTION__, __LINE__, err); \
     25    fprintf(stderr, TR("err at %s():%d: %x\n"), __FUNCTION__, __LINE__, err); \
    2426    return fStatus;
    2527
    2628const uint32 kSkipOffset = 33;
     
    4850    :
    4951    fStatus(B_NO_INIT),
    5052    fPackageFile(0),
    51     fDescription(T("No package available.")),
     53    fDescription(TR("No package available.")),
    5254    fProfiles(2),
    5355    fHasImage(false)
    5456{
     
    5961    :
    6062    fStatus(B_NO_INIT),
    6163    fPackageFile(new BFile(ref, B_READ_ONLY)),
    62     fDescription(T("No package selected.")),
     64    fDescription(TR("No package selected.")),
    6365    fProfiles(2),
    6466    fHasImage(false)
    6567{
     
    10271029            parser_debug("PtcI\n");
    10281030            break;
    10291031        } else {
    1030             fprintf(stderr, "Unknown file tag %s\n", buffer);
     1032            fprintf(stderr, TR("Unknown file tag %s\n"), buffer);
    10311033            RETURN_AND_SET_STATUS(B_ERROR);
    10321034        }
    10331035    }
     
    10351037    if (static_cast<uint64>(actualSize) != fileSize) {
    10361038        // Inform the user of a possible error
    10371039        int32 selection;
    1038         BAlert *warning = new BAlert(T("filesize_wrong"),
    1039             T("There seems to be a file size mismatch in the package file. "
     1040        BAlert *warning = new BAlert("filesize_wrong",
     1041            TR("There seems to be a file size mismatch in the package file. "
    10401042                "The package might be corrupted or have been modified after its "
    1041                 "creation. Do you still wish to continue?"), T("Continue"),
    1042                 T("Abort"), NULL,
     1043                "creation. Do you still wish to continue?"), TR("Continue"),
     1044                TR("Abort"), NULL,
    10431045            B_WIDTH_AS_USUAL, B_WARNING_ALERT);
    10441046        selection = warning->Go();
    10451047
  • src/apps/packageinstaller/PackageItem.cpp

     
    1313
    1414#include <Alert.h>
    1515#include <ByteOrder.h>
     16#include <Catalog.h>
    1617#include <Directory.h>
    1718#include <fs_info.h>
     19#include <Locale.h>
    1820#include <NodeInfo.h>
    1921#include <OS.h>
    2022#include <SymLink.h>
     
    2224
    2325#include "zlib.h"
    2426
     27#undef TR_CONTEXT
     28#define TR_CONTEXT "PackageItem"
    2529
    26 // Macro reserved for later localization
    27 #define T(x) x
    28 
    2930enum {
    3031    P_CHUNK_SIZE = 256
    3132};
     
    564565const char*
    565566PackageScript::ItemKind()
    566567{
    567     return "script";
     568    return TR("The script named ");
    568569}
    569570
    570571
     
    740741const char*
    741742PackageDirectory::ItemKind()
    742743{
    743     return "directory";
     744    return TR("The directory named ");
    744745}
    745746
    746747
     
    906907const char*
    907908PackageFile::ItemKind()
    908909{
    909     return "file";
     910    return TR("The file named ");
    910911}
    911912
    912913
     
    10411042const char*
    10421043PackageLink::ItemKind()
    10431044{
    1044     return "symbolic link";
     1045    return TR("The symbolic link named ");
    10451046}
  • src/apps/packageinstaller/PackageImageViewer.cpp

     
    1010#include "PackageImageViewer.h"
    1111
    1212#include <BitmapStream.h>
     13#include <Catalog.h>
     14#include <Locale.h>
    1315#include <Message.h>
    1416#include <Screen.h>
    1517#include <TranslatorRoster.h>
    1618
    1719
    18 // Reserved
    19 #define T(x) x
     20#undef TR_CONTEXT
     21#define TR_CONTEXT "PackageImageViewer"
    2022
    21 
    2223enum {
    2324    P_MSG_CLOSE = 'pmic'
    2425};
     
    8182    if (fSuccess)
    8283        DrawBitmapAsync(fImage, Bounds());
    8384    else {
    84         float length = StringWidth(T("Image not loaded correctly"));
    85         DrawString(T("Image not loaded correctly"),
     85        float length = StringWidth(TR("Image not loaded correctly"));
     86        DrawString(TR("Image not loaded correctly"),
    8687            BPoint((Bounds().Width() - length) / 2.0f, 30.0f));
    8788    }
    8889}
  • src/apps/packageinstaller/PackageInstall.cpp

     
    1414#include "PackageView.h"
    1515
    1616#include <Alert.h>
     17#include <Catalog.h>
     18#include <Locale.h>
    1719#include <stdio.h>
    1820
    1921
    20 // Macro reserved for later localization
    21 #define T(x) x
     22#undef TR_CONTEXT
     23#define TR_CONTEXT "PackageInstall"
    2224
    2325static int32 install_function(void *data)
    2426{
     
    106108    PackageStatus *progress = fParent->GetStatusWindow();
    107109    progress->Reset(n + m + 5);
    108110
    109     progress->StageStep(1, T("Preparing package"));
     111    progress->StageStep(1, TR("Preparing package"));
    110112
    111113    InstalledPackageInfo packageInfo(info->GetName(), info->GetVersion());
    112114
     
    114116    if (err == B_OK) {
    115117        // The package is already installed, inform the user
    116118        BAlert *reinstall = new BAlert("reinstall",
    117             T("The given package seems to be already installed on your system. "
     119            TR("The given package seems to be already installed on your system. "
    118120                "Would you like to uninstall the existing one and continue the "
    119                 "installation?"), T("Continue"), T("Abort"));
     121                "installation?"), TR("Continue"), TR("Abort"));
    120122
    121123        if (reinstall->Go() == 0) {
    122124            // Uninstall the package
    123125            err = packageInfo.Uninstall();
    124126            if (err != B_OK) {
    125                 fprintf(stderr, "Error on uninstall\n");
     127                fprintf(stderr, TR("Error on uninstall\n"));
    126128                return P_MSG_I_ERROR;
    127129            }
    128130
    129131            err = packageInfo.SetTo(info->GetName(), info->GetVersion(), true);
    130132            if (err != B_OK) {
    131                 fprintf(stderr, "Error on SetTo\n");
     133                fprintf(stderr, TR("Error on SetTo\n"));
    132134                return P_MSG_I_ERROR;
    133135            }
    134136        } else {
     
    138140    } else if (err == B_ENTRY_NOT_FOUND) {
    139141        err = packageInfo.SetTo(info->GetName(), info->GetVersion(), true);
    140142        if (err != B_OK) {
    141             fprintf(stderr, "Error on SetTo\n");
     143            fprintf(stderr, TR("Error on SetTo\n"));
    142144            return P_MSG_I_ERROR;
    143145        }
    144146    } else if (progress->Stopped()) {
    145147        return P_MSG_I_ABORT;
    146148    } else {
    147         fprintf(stderr, "returning on error\n");
     149        fprintf(stderr, TR("returning on error\n"));
    148150        return P_MSG_I_ERROR;
    149151    }
    150152
    151     progress->StageStep(1, T("Installing files and folders"));
     153    progress->StageStep(1, TR("Installing files and folders"));
    152154
    153155    // Install files and directories
    154156    PackageItem *iter;
     
    189191        }
    190192
    191193        if (err != B_OK) {
    192             fprintf(stderr, "Error while writing path\n");
     194            fprintf(stderr, TR("Error while writing path\n"));
    193195            return P_MSG_I_ERROR;
    194196        }
    195197
     
    202204        packageInfo.AddItem(state.destination.Path());
    203205    }
    204206
    205     progress->StageStep(1, T("Running post-installation scripts"), "");
     207    progress->StageStep(1, TR("Running post-installation scripts"), "");
    206208
    207209    PackageScript *scr;
    208210    status_t status;
     
    214216        fCurrentScript = scr;
    215217
    216218        if (scr->DoInstall() != B_OK) {
    217             fprintf(stderr, "Error while running script\n");
     219            fprintf(stderr, TR("Error while running script\n"));
    218220            return P_MSG_I_ERROR;
    219221        }
    220222        fCurrentScriptLocker.Unlock();
     
    232234        progress->StageStep(1, NULL, label.String());
    233235    }
    234236
    235     progress->StageStep(1, T("Finishing installation"), "");
     237    progress->StageStep(1, TR("Finishing installation"), "");
    236238
    237239    err = packageInfo.Save();
    238240    if (err != B_OK)
    239241        return P_MSG_I_ERROR;
    240242
    241     progress->StageStep(1, T("Done"));
     243    progress->StageStep(1, TR("Done"));
    242244
    243245    // Inform our parent that we finished
    244246    return P_MSG_I_FINISHED;
  • src/apps/packageinstaller/PackageTextViewer.cpp

     
    1010#include "PackageTextViewer.h"
    1111
    1212#include <Button.h>
     13#include <Catalog.h>
     14#include <Locale.h>
    1315#include <ScrollView.h>
    1416
    1517#include <GroupLayout.h>
     
    2123    P_MSG_DECLINE
    2224};
    2325
    24 // Reserved
    25 #define T(x) x
     26#undef TR_CONTEXT
     27#define TR_CONTEXT "PackageTextViewer"
    2628
    2729
    2830PackageTextViewer::PackageTextViewer(const char *text, bool disclaimer)
    29     :   BWindow(BRect(125, 125, 675, 475), T("Disclaimer"), B_MODAL_WINDOW,
     31    :   BWindow(BRect(125, 125, 675, 475), TR("Disclaimer"), B_MODAL_WINDOW,
    3032            B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_NOT_CLOSABLE),
    3133        fValue(0)
    3234{
     
    115117    BRect bounds;
    116118    BRect rect = Bounds();
    117119    if (disclaimer) {
    118         BButton *button = new BButton(BRect(0, 0, 1, 1), "accept", T("Accept"),
     120        BButton *button = new BButton(BRect(0, 0, 1, 1), "accept", TR("Accept"),
    119121                new BMessage(P_MSG_ACCEPT));
    120122        button->ResizeToPreferred();
    121123
     
    128130        button->MakeDefault(true);
    129131        fBackground->AddChild(button);
    130132
    131         button = new BButton(BRect(0, 0, 1, 1), "decline", T("Decline"),
     133        button = new BButton(BRect(0, 0, 1, 1), "decline", TR("Decline"),
    132134                new BMessage(P_MSG_DECLINE));
    133135        button->ResizeToPreferred();
    134136
     
    138140        fBackground->AddChild(button);
    139141    }
    140142    else {
    141         BButton *button = new BButton(BRect(0, 0, 1, 1), "accept", T("Continue"),
     143        BButton *button = new BButton(BRect(0, 0, 1, 1), "accept", TR("Continue"),
    142144                new BMessage(P_MSG_ACCEPT));
    143145        button->ResizeToPreferred();
    144146
     
    184186            B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true);
    185187
    186188    if (disclaimer) {
    187         BButton *accept = new BButton("accept", T("Accept"),
     189        BButton *accept = new BButton("accept", TR("Accept"),
    188190                new BMessage(P_MSG_ACCEPT));
    189191
    190         BButton *decline = new BButton("decline", T("Decline"),
     192        BButton *decline = new BButton("decline", TR("Decline"),
    191193                new BMessage(P_MSG_DECLINE));
    192194
    193195        fBackground = BGroupLayoutBuilder(B_VERTICAL)
     
    199201            .End();
    200202    }
    201203    else {
    202         BButton *button = new BButton("accept", T("Continue"),
     204        BButton *button = new BButton("accept", TR("Continue"),
    203205                new BMessage(P_MSG_ACCEPT));
    204206
    205207        fBackground = BGroupLayoutBuilder(B_VERTICAL)
  • src/apps/packageinstaller/PackageWindow.cpp

     
    1010#include "PackageWindow.h"
    1111
    1212#include <Application.h>
    13 
     13#include <Catalog.h>
    1414#include <GroupLayout.h>
     15#include <Locale.h>
    1516
    16 // Macro reserved for later localization
    17 #define T(x) x
     17#undef TR_CONTEXT
     18#define TR_CONTEXT "PackageWindow"
    1819
    19 
    2020PackageWindow::PackageWindow(const entry_ref *ref)
    21     :   BWindow(BRect(100, 100, 600, 300), T("PackageInstaller"), B_TITLED_WINDOW,
    22             B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
     21    :   BWindow(BRect(100, 100, 600, 300), TR("PackageInstaller"),
     22        B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
    2323{
    2424    //SetLayout(new BGroupLayout(B_HORIZONTAL));
    2525
  • src/apps/packageinstaller/main.cpp

     
    99
    1010#include "PackageWindow.h"
    1111
     12#include <Alert.h>
    1213#include <Application.h>
     14#include <Autolock.h>
     15#include <Catalog.h>
     16#include <Entry.h>
    1317#include <FilePanel.h>
    1418#include <List.h>
    15 #include <Alert.h>
     19#include <Locale.h>
    1620#include <TextView.h>
    17 #include <Entry.h>
    18 #include <Autolock.h>
     21
    1922#include <stdio.h>
    2023
     24#undef TR_CONTEXT
     25#define TR_CONTEXT "Packageinstaller main"
    2126
    2227class PackageInstaller : public BApplication {
    2328    public:
     
    3338        void AboutRequested();
    3439
    3540    private:
    36         BFilePanel *fOpen;
    37         uint32 fWindowCount;
     41        BFilePanel  *fOpen;
     42        uint32      fWindowCount;
     43        BCatalog    fAppCatalog;
    3844};
    3945
    4046
    4147PackageInstaller::PackageInstaller()
    4248    :   BApplication("application/x-vnd.Haiku-PackageInstaller"),
    43     fWindowCount(0)
     49    fOpen(NULL),
     50    fWindowCount(0),
     51    fAppCatalog(NULL)
    4452{
    4553    fOpen = new BFilePanel(B_OPEN_PANEL);
     54    be_locale->GetAppCatalog(&fAppCatalog);
    4655}
    4756
    4857
     
    94103   
    95104    for (i = 1; i < argc; i++) {
    96105        if (path.SetTo(argv[i]) != B_OK) {
    97             fprintf(stderr, "Error! \"%s\" is not a valid path.\n", argv[i]);
     106            fprintf(stderr, TR("Error! \"%s\" is not a valid path.\n"), argv[i]);
    98107            continue;
    99108        }
    100109       
    101110        ret = get_ref_for_path(path.Path(), &ref);
    102111        if (ret != B_OK) {
    103             fprintf(stderr, "Error (%s)! Could not open \"%s\".\n", strerror(ret),
     112            fprintf(stderr, TR("Error (%s)! Could not open \"%s\".\n"), strerror(ret),
    104113                    argv[i]);
    105114            continue;
    106115        }
     
    135144PackageInstaller::AboutRequested()
    136145{
    137146    BAlert *about = new BAlert("about",
    138         "PackageInstaller\n"
     147        TR("PackageInstaller\n"
    139148        "BeOS legacy .pkg file installer for Haiku.\n\n"
    140149        "Copyright 2007,\nŁukasz 'Sil2100' Zemczak\n\n"
    141         "Copyright (c) 2007 Haiku, Inc. \n",
    142         "OK");
     150        "Copyright (c) 2007 Haiku, Inc. \n"),
     151        TR("OK"));
    143152
    144153    BTextView *view = about->TextView();
    145154    BFont font;
  • src/apps/packageinstaller/PackageView.cpp

     
    1414
    1515#include <Alert.h>
    1616#include <Button.h>
     17#include <Catalog.h>
    1718#include <Directory.h>
    1819#include <FindDirectory.h>
     20#include <Locale.h>
    1921#include <MenuItem.h>
    2022#include <Path.h>
    2123#include <PopUpMenu.h>
     
    3234#include <fs_info.h>
    3335#include <stdio.h> // For debugging
    3436
    35 // Macro reserved for later localization
    36 #define T(x) x
     37#undef TR_CONTEXT
     38#define TR_CONTEXT "PackageView"
    3739
    3840const float kMaxDescHeight = 125.0f;
    3941const uint32 kSeparatorIndex = 3;
    4042
    4143
    42 
    4344static void
    4445convert_size(uint64 size, char *buffer, uint32 n)
    4546{
    4647    if (size < 1024)
    47         snprintf(buffer, n, "%llu bytes", size);
     48        snprintf(buffer, n, TR("%llu bytes"), size);
    4849    else if (size < 1024 * 1024)
    49         snprintf(buffer, n, "%.1f KiB", size / 1024.0f);
     50        snprintf(buffer, n, TR("%.1f KiB"), size / 1024.0f);
    5051    else if (size < 1024 * 1024 * 1024)
    51         snprintf(buffer, n, "%.1f MiB", size / (1024.0f*1024.0f));
     52        snprintf(buffer, n, TR("%.1f MiB"), size / (1024.0f*1024.0f));
    5253    else
    53         snprintf(buffer, n, "%.1f GiB", size / (1024.0f*1024.0f*1024.0f));
     54        snprintf(buffer, n, TR("%.1f GiB"), size / (1024.0f*1024.0f*1024.0f));
    5455}
    5556
    5657
     
    8889{
    8990    status_t ret = fInfo.InitCheck();
    9091    if (ret != B_OK && ret != B_NO_INIT) {
    91         BAlert *warning = new BAlert(T("parsing_failed"),
    92                 T("The package file is not readable.\nOne of the possible "
     92        BAlert *warning = new BAlert("parsing_failed",
     93                TR("The package file is not readable.\nOne of the possible "
    9394                "reasons for this might be that the requested file is not a valid "
    94                 "BeOS .pkg package."), T("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
     95                "BeOS .pkg package."), TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL,
    9596                B_WARNING_ALERT);
    9697        warning->Go();
    9798
     
    104105    BString title;
    105106    BString name = fInfo.GetName();
    106107    if (name.CountChars() == 0) {
    107         title = T("Package installer");
     108        title = TR("Package installer");
    108109    }
    109110    else {
    110         title = T("Install ");
     111        title = TR("Install ");
    111112        title += name;
    112113    }
    113114    parent->SetTitle(title.String());
     
    122123        // attaching the view to the window
    123124        _GroupChanged(0);
    124125
    125         fStatusWindow = new PackageStatus(T("Installation progress"), NULL, NULL,
     126        fStatusWindow = new PackageStatus(TR("Installation progress"), NULL, NULL,
    126127                this);
    127128
    128129        // Show the splash screen, if present
     
    184185        case P_MSG_I_FINISHED:
    185186        {
    186187            BAlert *notify = new BAlert("installation_success",
    187                 T("The package you requested has been successfully installed "
    188                     "on your system."), T("OK"));
     188                TR("The package you requested has been successfully installed "
     189                    "on your system."), TR("OK"));
    189190
    190191            notify->Go();
    191192            fStatusWindow->Hide();
     
    202203        case P_MSG_I_ABORT:
    203204        {
    204205            BAlert *notify = new BAlert("installation_aborted",
    205                 T("The installation of the package has been aborted."), T("OK"));
     206                TR("The installation of the package has been aborted."),
     207                TR("OK"));
    206208            notify->Go();
    207209            fStatusWindow->Hide();
    208210            fInstall->SetEnabled(true);
     
    214216        case P_MSG_I_ERROR:
    215217        {
    216218            BAlert *notify = new BAlert("installation_failed", // TODO: Review this
    217                 T("The requested package failed to install on your system. This "
    218                     "might be a problem with the target package file. Please consult "
    219                     "this issue with the package distributor."), T("OK"), NULL,
    220                 NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
    221             fprintf(stderr, "Error while installing the package\n");
     219                TR("The requested package failed to install on your system. "
     220                "This might be a problem with the target package file. Please "
     221                "consult this issue with the package distributor."),
     222                TR("OK"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
     223            fprintf(stderr, TR("Error while installing the package\n"));
    222224            notify->Go();
    223225            fStatusWindow->Hide();
    224226            fInstall->SetEnabled(true);
     
    300302        case P_EXISTS_ASK:
    301303        case P_EXISTS_NONE:
    302304        {
    303             BString alertString = T("The ");
     305            BString alertString = item.ItemKind();
    304306
    305             alertString << item.ItemKind() << T(" named \'") << path.Leaf() << "\' ";
    306             alertString << T("already exists in the given path.\nReplace the file with "
    307                 "the one from this package or skip it?");
     307            alertString << "\'" << path.Leaf() << "\' ";
     308            alertString << TR("already exists in the given path.\nReplace the "
     309                "file with the one from this package or skip it?");
    308310
    309             BAlert *alert = new BAlert(T("file_exists"), alertString.String(),
    310                 T("Replace"), T("Skip"), T("Abort"));
     311            BAlert *alert = new BAlert("file_exists", alertString.String(),
     312                TR("Replace"), TR("Skip"), TR("Abort"));
    311313
    312314            choice = alert->Go();
    313315            switch (choice) {
     
    323325
    324326            if (policy == P_EXISTS_NONE) {
    325327                // TODO: Maybe add 'No, but ask again' type of choice as well?
    326                 alertString = T("Do you want to remember this decision for the rest of "
    327                     "this installation?\nAll existing files will be ");
     328                alertString = TR("Do you want to remember this decision for "
     329                    "the rest of this installation?\n");
    328330                alertString << ((choice == P_EXISTS_OVERWRITE)
    329                     ? T("replaced?") : T("skipped?"));
     331                    ? TR("All existing files will be replaced?")
     332                    : TR("All existing files will be skipped?"));
    330333
    331                 alert = new BAlert(T("policy_decision"), alertString.String(),
    332                     T("Yes"), T("No"));
     334                alert = new BAlert("policy_decision", alertString.String(),
     335                    TR("Yes"), TR("No"));
    333336
    334337                int32 decision = alert->Go();
    335338                if (decision == 0)
     
    361364    fInstallTypes = new BPopUpMenu("none");
    362365
    363366    BMenuField *installType = new BMenuField("install_type",
    364         T("Installation type:"), fInstallTypes, 0);
     367        TR("Installation type:"), fInstallTypes, 0);
    365368    installType->SetAlignment(B_ALIGN_RIGHT);
    366369    installType->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_MIDDLE));
    367370
     
    370373    fInstallDesc->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    371374    fInstallDesc->MakeEditable(false);
    372375    fInstallDesc->MakeSelectable(false);
    373     fInstallDesc->SetText(T("No installation type selected"));
     376    fInstallDesc->SetText(TR("No installation type selected"));
    374377    fInstallDesc->TextHeight(0, fInstallDesc->TextLength());
    375378
    376     fInstall = new BButton("install_button", T("Install"),
     379    fInstall = new BButton("install_button", TR("Install"),
    377380            new BMessage(P_MSG_INSTALL));
    378381
    379382    BView *installField = BGroupLayoutBuilder(B_VERTICAL, 5.0f)
     
    436439    fInstallTypes = new BPopUpMenu("none");
    437440
    438441    BMenuField *installType = new BMenuField(BRect(2, 2, 100, 50), "install_type",
    439         T("Installation type:"), fInstallTypes, false);
     442        TR("Installation type:"), fInstallTypes, false);
    440443    installType->SetDivider(installType->StringWidth(installType->Label()) + 8);
    441444    installType->SetAlignment(B_ALIGN_RIGHT);
    442445    installType->ResizeToPreferred();
     
    450453        B_WILL_DRAW);
    451454    fInstallDesc->MakeEditable(false);
    452455    fInstallDesc->MakeSelectable(false);
    453     fInstallDesc->SetText(T("No installation type selected"));
     456    fInstallDesc->SetText(TR("No installation type selected"));
    454457    fInstallDesc->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    455458
    456459    fInstallDesc->ResizeTo(rect.Width() - B_V_SCROLL_BAR_WIDTH, 60);
     
    469472    rect = installBox->Frame();
    470473    rect.top = rect.bottom + 5;
    471474    rect.bottom += 35;
    472     fDestField = new BMenuField(rect, "install_to", T("Install to:"),
     475    fDestField = new BMenuField(rect, "install_to", TR("Install to:"),
    473476            fDestination, false);
    474477    fDestField->SetDivider(fDestField->StringWidth(fDestField->Label()) + 8);
    475478    fDestField->SetAlignment(B_ALIGN_RIGHT);
     
    477480
    478481    AddChild(fDestField);
    479482
    480     fInstall = new BButton(rect, "install_button", T("Install"),
     483    fInstall = new BButton(rect, "install_button", TR("Install"),
    481484            new BMessage(P_MSG_INSTALL));
    482485    fInstall->ResizeToPreferred();
    483486    AddChild(fInstall);
     
    554557        BPath path;
    555558        BMessage *temp;
    556559        BVolume volume;
     560        char *tmp = TR("free");
    557561
    558562        if (prof->path_type == P_INSTALL_PATH) {
    559563            dev_t device;
     
    568572
    569573                    convert_size(volume.FreeBytes(), sizeString, 32);
    570574                    name = path.Path();
    571                     name << " (" << sizeString << " free)";
     575                    name << " (" << sizeString << tmp << ")";
    572576                    item = new BMenuItem(name.String(), temp);
    573577                    item->SetTarget(this);
    574578                    fDestination->AddItem(item);
     
    582586
    583587                    convert_size(volume.FreeBytes(), sizeString, 32);
    584588                    name = path.Path();
    585                     name << " (" << sizeString << " free)";
     589                    name << " (" << sizeString << tmp << ")";
    586590                    item = new BMenuItem(name.String(), temp);
    587591                    item->SetTarget(this);
    588592                    fDestination->AddItem(item);
     
    595599            }
    596600            fDestination->AddSeparatorItem();
    597601
    598             item = new BMenuItem("Other" B_UTF8_ELLIPSIS, new BMessage(P_MSG_OPEN_PANEL));
     602            item = new BMenuItem(TR("Other" B_UTF8_ELLIPSIS),
     603                new BMessage(P_MSG_OPEN_PANEL));
    599604            item->SetTarget(this);
    600605            fDestination->AddItem(item);
    601606
     
    622627                convert_size(volume.FreeBytes(), sizeString, 32);
    623628                volume.GetName(volumeName);
    624629                name = volumeName;
    625                 name << " (" << sizeString << " free)";
     630                name << " (" << sizeString << tmp << ")";
    626631                item = new BMenuItem(name.String(), temp);
    627632                item->SetTarget(this);
    628633                fDestination->AddItem(item);