Ticket #5907: packageinstallerLocalization.patch
File packageinstallerLocalization.patch, 23.1 KB (added by , 14 years ago) |
---|
-
src/apps/packageinstaller/PackageStatus.cpp
10 10 #include "PackageStatus.h" 11 11 12 12 #include <Autolock.h> 13 13 #include <Catalog.h> 14 14 #include <GroupLayoutBuilder.h> 15 15 #include <GroupLayout.h> 16 #include <Locale.h> 16 17 17 18 #include <stdio.h> 18 19 #include <string.h> 19 20 20 // Macro reserved for later localization 21 #define T (x) x21 #undef TR_CONTEXT 22 #define TR_CONTEXT "PackageStatus" 22 23 23 24 24 StopButton::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)) 26 26 { 27 27 } 28 28 … … 100 100 { 101 101 SetLayout(new BGroupLayout(B_VERTICAL)); 102 102 103 fStatus = new BStatusBar("status_bar", T ("Installing package"));103 fStatus = new BStatusBar("status_bar", TR("Installing package")); 104 104 fStatus->SetBarHeight(12); 105 105 106 106 fButton = new StopButton(); -
src/apps/packageinstaller/PackageInfo.cpp
11 11 12 12 #include <Alert.h> 13 13 #include <ByteOrder.h> 14 #include <Catalog.h> 14 15 #include <FindDirectory.h> 16 #include <Locale.h> 15 17 #include <Path.h> 16 18 #include <kernel/OS.h> 17 19 18 20 19 // Macro reserved for later localization 20 #define T (x) x21 #undef TR_CONTEXT 22 #define TR_CONTEXT "PackageInfo" 21 23 22 24 #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); \ 24 26 return fStatus; 25 27 26 28 const uint32 kSkipOffset = 33; … … 48 50 : 49 51 fStatus(B_NO_INIT), 50 52 fPackageFile(0), 51 fDescription(T ("No package available.")),53 fDescription(TR("No package available.")), 52 54 fProfiles(2), 53 55 fHasImage(false) 54 56 { … … 59 61 : 60 62 fStatus(B_NO_INIT), 61 63 fPackageFile(new BFile(ref, B_READ_ONLY)), 62 fDescription(T ("No package selected.")),64 fDescription(TR("No package selected.")), 63 65 fProfiles(2), 64 66 fHasImage(false) 65 67 { … … 1027 1029 parser_debug("PtcI\n"); 1028 1030 break; 1029 1031 } else { 1030 fprintf(stderr, "Unknown file tag %s\n", buffer);1032 fprintf(stderr, TR("Unknown file tag %s\n"), buffer); 1031 1033 RETURN_AND_SET_STATUS(B_ERROR); 1032 1034 } 1033 1035 } … … 1035 1037 if (static_cast<uint64>(actualSize) != fileSize) { 1036 1038 // Inform the user of a possible error 1037 1039 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. " 1040 1042 "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, 1043 1045 B_WIDTH_AS_USUAL, B_WARNING_ALERT); 1044 1046 selection = warning->Go(); 1045 1047 -
src/apps/packageinstaller/PackageItem.cpp
13 13 14 14 #include <Alert.h> 15 15 #include <ByteOrder.h> 16 #include <Catalog.h> 16 17 #include <Directory.h> 17 18 #include <fs_info.h> 19 #include <Locale.h> 18 20 #include <NodeInfo.h> 19 21 #include <OS.h> 20 22 #include <SymLink.h> … … 22 24 23 25 #include "zlib.h" 24 26 27 #undef TR_CONTEXT 28 #define TR_CONTEXT "PackageItem" 25 29 26 // Macro reserved for later localization27 #define T(x) x28 29 30 enum { 30 31 P_CHUNK_SIZE = 256 31 32 }; … … 564 565 const char* 565 566 PackageScript::ItemKind() 566 567 { 567 return "script";568 return TR("The script named "); 568 569 } 569 570 570 571 … … 740 741 const char* 741 742 PackageDirectory::ItemKind() 742 743 { 743 return "directory";744 return TR("The directory named "); 744 745 } 745 746 746 747 … … 906 907 const char* 907 908 PackageFile::ItemKind() 908 909 { 909 return "file";910 return TR("The file named "); 910 911 } 911 912 912 913 … … 1041 1042 const char* 1042 1043 PackageLink::ItemKind() 1043 1044 { 1044 return "symbolic link";1045 return TR("The symbolic link named "); 1045 1046 } -
src/apps/packageinstaller/PackageImageViewer.cpp
10 10 #include "PackageImageViewer.h" 11 11 12 12 #include <BitmapStream.h> 13 #include <Catalog.h> 14 #include <Locale.h> 13 15 #include <Message.h> 14 16 #include <Screen.h> 15 17 #include <TranslatorRoster.h> 16 18 17 19 18 // Reserved 19 #define T (x) x20 #undef TR_CONTEXT 21 #define TR_CONTEXT "PackageImageViewer" 20 22 21 22 23 enum { 23 24 P_MSG_CLOSE = 'pmic' 24 25 }; … … 81 82 if (fSuccess) 82 83 DrawBitmapAsync(fImage, Bounds()); 83 84 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"), 86 87 BPoint((Bounds().Width() - length) / 2.0f, 30.0f)); 87 88 } 88 89 } -
src/apps/packageinstaller/PackageInstall.cpp
14 14 #include "PackageView.h" 15 15 16 16 #include <Alert.h> 17 #include <Catalog.h> 18 #include <Locale.h> 17 19 #include <stdio.h> 18 20 19 21 20 // Macro reserved for later localization 21 #define T (x) x22 #undef TR_CONTEXT 23 #define TR_CONTEXT "PackageInstall" 22 24 23 25 static int32 install_function(void *data) 24 26 { … … 106 108 PackageStatus *progress = fParent->GetStatusWindow(); 107 109 progress->Reset(n + m + 5); 108 110 109 progress->StageStep(1, T ("Preparing package"));111 progress->StageStep(1, TR("Preparing package")); 110 112 111 113 InstalledPackageInfo packageInfo(info->GetName(), info->GetVersion()); 112 114 … … 114 116 if (err == B_OK) { 115 117 // The package is already installed, inform the user 116 118 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. " 118 120 "Would you like to uninstall the existing one and continue the " 119 "installation?"), T ("Continue"), T("Abort"));121 "installation?"), TR("Continue"), TR("Abort")); 120 122 121 123 if (reinstall->Go() == 0) { 122 124 // Uninstall the package 123 125 err = packageInfo.Uninstall(); 124 126 if (err != B_OK) { 125 fprintf(stderr, "Error on uninstall\n");127 fprintf(stderr, TR("Error on uninstall\n")); 126 128 return P_MSG_I_ERROR; 127 129 } 128 130 129 131 err = packageInfo.SetTo(info->GetName(), info->GetVersion(), true); 130 132 if (err != B_OK) { 131 fprintf(stderr, "Error on SetTo\n");133 fprintf(stderr, TR("Error on SetTo\n")); 132 134 return P_MSG_I_ERROR; 133 135 } 134 136 } else { … … 138 140 } else if (err == B_ENTRY_NOT_FOUND) { 139 141 err = packageInfo.SetTo(info->GetName(), info->GetVersion(), true); 140 142 if (err != B_OK) { 141 fprintf(stderr, "Error on SetTo\n");143 fprintf(stderr, TR("Error on SetTo\n")); 142 144 return P_MSG_I_ERROR; 143 145 } 144 146 } else if (progress->Stopped()) { 145 147 return P_MSG_I_ABORT; 146 148 } else { 147 fprintf(stderr, "returning on error\n");149 fprintf(stderr, TR("returning on error\n")); 148 150 return P_MSG_I_ERROR; 149 151 } 150 152 151 progress->StageStep(1, T ("Installing files and folders"));153 progress->StageStep(1, TR("Installing files and folders")); 152 154 153 155 // Install files and directories 154 156 PackageItem *iter; … … 189 191 } 190 192 191 193 if (err != B_OK) { 192 fprintf(stderr, "Error while writing path\n");194 fprintf(stderr, TR("Error while writing path\n")); 193 195 return P_MSG_I_ERROR; 194 196 } 195 197 … … 202 204 packageInfo.AddItem(state.destination.Path()); 203 205 } 204 206 205 progress->StageStep(1, T ("Running post-installation scripts"), "");207 progress->StageStep(1, TR("Running post-installation scripts"), ""); 206 208 207 209 PackageScript *scr; 208 210 status_t status; … … 214 216 fCurrentScript = scr; 215 217 216 218 if (scr->DoInstall() != B_OK) { 217 fprintf(stderr, "Error while running script\n");219 fprintf(stderr, TR("Error while running script\n")); 218 220 return P_MSG_I_ERROR; 219 221 } 220 222 fCurrentScriptLocker.Unlock(); … … 232 234 progress->StageStep(1, NULL, label.String()); 233 235 } 234 236 235 progress->StageStep(1, T ("Finishing installation"), "");237 progress->StageStep(1, TR("Finishing installation"), ""); 236 238 237 239 err = packageInfo.Save(); 238 240 if (err != B_OK) 239 241 return P_MSG_I_ERROR; 240 242 241 progress->StageStep(1, T ("Done"));243 progress->StageStep(1, TR("Done")); 242 244 243 245 // Inform our parent that we finished 244 246 return P_MSG_I_FINISHED; -
src/apps/packageinstaller/PackageTextViewer.cpp
10 10 #include "PackageTextViewer.h" 11 11 12 12 #include <Button.h> 13 #include <Catalog.h> 14 #include <Locale.h> 13 15 #include <ScrollView.h> 14 16 15 17 #include <GroupLayout.h> … … 21 23 P_MSG_DECLINE 22 24 }; 23 25 24 // Reserved 25 #define T (x) x26 #undef TR_CONTEXT 27 #define TR_CONTEXT "PackageTextViewer" 26 28 27 29 28 30 PackageTextViewer::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, 30 32 B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_NOT_CLOSABLE), 31 33 fValue(0) 32 34 { … … 115 117 BRect bounds; 116 118 BRect rect = Bounds(); 117 119 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"), 119 121 new BMessage(P_MSG_ACCEPT)); 120 122 button->ResizeToPreferred(); 121 123 … … 128 130 button->MakeDefault(true); 129 131 fBackground->AddChild(button); 130 132 131 button = new BButton(BRect(0, 0, 1, 1), "decline", T ("Decline"),133 button = new BButton(BRect(0, 0, 1, 1), "decline", TR("Decline"), 132 134 new BMessage(P_MSG_DECLINE)); 133 135 button->ResizeToPreferred(); 134 136 … … 138 140 fBackground->AddChild(button); 139 141 } 140 142 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"), 142 144 new BMessage(P_MSG_ACCEPT)); 143 145 button->ResizeToPreferred(); 144 146 … … 184 186 B_FOLLOW_LEFT | B_FOLLOW_TOP, 0, false, true); 185 187 186 188 if (disclaimer) { 187 BButton *accept = new BButton("accept", T ("Accept"),189 BButton *accept = new BButton("accept", TR("Accept"), 188 190 new BMessage(P_MSG_ACCEPT)); 189 191 190 BButton *decline = new BButton("decline", T ("Decline"),192 BButton *decline = new BButton("decline", TR("Decline"), 191 193 new BMessage(P_MSG_DECLINE)); 192 194 193 195 fBackground = BGroupLayoutBuilder(B_VERTICAL) … … 199 201 .End(); 200 202 } 201 203 else { 202 BButton *button = new BButton("accept", T ("Continue"),204 BButton *button = new BButton("accept", TR("Continue"), 203 205 new BMessage(P_MSG_ACCEPT)); 204 206 205 207 fBackground = BGroupLayoutBuilder(B_VERTICAL) -
src/apps/packageinstaller/PackageWindow.cpp
10 10 #include "PackageWindow.h" 11 11 12 12 #include <Application.h> 13 13 #include <Catalog.h> 14 14 #include <GroupLayout.h> 15 #include <Locale.h> 15 16 16 // Macro reserved for later localization 17 #define T (x) x17 #undef TR_CONTEXT 18 #define TR_CONTEXT "PackageWindow" 18 19 19 20 20 PackageWindow::PackageWindow(const entry_ref *ref) 21 : BWindow(BRect(100, 100, 600, 300), T ("PackageInstaller"), B_TITLED_WINDOW,22 21 : BWindow(BRect(100, 100, 600, 300), TR("PackageInstaller"), 22 B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE) 23 23 { 24 24 //SetLayout(new BGroupLayout(B_HORIZONTAL)); 25 25 -
src/apps/packageinstaller/main.cpp
9 9 10 10 #include "PackageWindow.h" 11 11 12 #include <Alert.h> 12 13 #include <Application.h> 14 #include <Autolock.h> 15 #include <Catalog.h> 16 #include <Entry.h> 13 17 #include <FilePanel.h> 14 18 #include <List.h> 15 #include < Alert.h>19 #include <Locale.h> 16 20 #include <TextView.h> 17 #include <Entry.h> 18 #include <Autolock.h> 21 19 22 #include <stdio.h> 20 23 24 #undef TR_CONTEXT 25 #define TR_CONTEXT "Packageinstaller main" 21 26 22 27 class PackageInstaller : public BApplication { 23 28 public: … … 33 38 void AboutRequested(); 34 39 35 40 private: 36 BFilePanel *fOpen; 37 uint32 fWindowCount; 41 BFilePanel *fOpen; 42 uint32 fWindowCount; 43 BCatalog fAppCatalog; 38 44 }; 39 45 40 46 41 47 PackageInstaller::PackageInstaller() 42 48 : BApplication("application/x-vnd.Haiku-PackageInstaller"), 43 fWindowCount(0) 49 fOpen(NULL), 50 fWindowCount(0), 51 fAppCatalog(NULL) 44 52 { 45 53 fOpen = new BFilePanel(B_OPEN_PANEL); 54 be_locale->GetAppCatalog(&fAppCatalog); 46 55 } 47 56 48 57 … … 94 103 95 104 for (i = 1; i < argc; i++) { 96 105 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]); 98 107 continue; 99 108 } 100 109 101 110 ret = get_ref_for_path(path.Path(), &ref); 102 111 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), 104 113 argv[i]); 105 114 continue; 106 115 } … … 135 144 PackageInstaller::AboutRequested() 136 145 { 137 146 BAlert *about = new BAlert("about", 138 "PackageInstaller\n"147 TR("PackageInstaller\n" 139 148 "BeOS legacy .pkg file installer for Haiku.\n\n" 140 149 "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")); 143 152 144 153 BTextView *view = about->TextView(); 145 154 BFont font; -
src/apps/packageinstaller/PackageView.cpp
14 14 15 15 #include <Alert.h> 16 16 #include <Button.h> 17 #include <Catalog.h> 17 18 #include <Directory.h> 18 19 #include <FindDirectory.h> 20 #include <Locale.h> 19 21 #include <MenuItem.h> 20 22 #include <Path.h> 21 23 #include <PopUpMenu.h> … … 32 34 #include <fs_info.h> 33 35 #include <stdio.h> // For debugging 34 36 35 // Macro reserved for later localization 36 #define T (x) x37 #undef TR_CONTEXT 38 #define TR_CONTEXT "PackageView" 37 39 38 40 const float kMaxDescHeight = 125.0f; 39 41 const uint32 kSeparatorIndex = 3; 40 42 41 43 42 43 44 static void 44 45 convert_size(uint64 size, char *buffer, uint32 n) 45 46 { 46 47 if (size < 1024) 47 snprintf(buffer, n, "%llu bytes", size);48 snprintf(buffer, n, TR("%llu bytes"), size); 48 49 else if (size < 1024 * 1024) 49 snprintf(buffer, n, "%.1f KiB", size / 1024.0f);50 snprintf(buffer, n, TR("%.1f KiB"), size / 1024.0f); 50 51 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)); 52 53 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)); 54 55 } 55 56 56 57 … … 88 89 { 89 90 status_t ret = fInfo.InitCheck(); 90 91 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 " 93 94 "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, 95 96 B_WARNING_ALERT); 96 97 warning->Go(); 97 98 … … 104 105 BString title; 105 106 BString name = fInfo.GetName(); 106 107 if (name.CountChars() == 0) { 107 title = T ("Package installer");108 title = TR("Package installer"); 108 109 } 109 110 else { 110 title = T ("Install ");111 title = TR("Install "); 111 112 title += name; 112 113 } 113 114 parent->SetTitle(title.String()); … … 122 123 // attaching the view to the window 123 124 _GroupChanged(0); 124 125 125 fStatusWindow = new PackageStatus(T ("Installation progress"), NULL, NULL,126 fStatusWindow = new PackageStatus(TR("Installation progress"), NULL, NULL, 126 127 this); 127 128 128 129 // Show the splash screen, if present … … 184 185 case P_MSG_I_FINISHED: 185 186 { 186 187 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")); 189 190 190 191 notify->Go(); 191 192 fStatusWindow->Hide(); … … 202 203 case P_MSG_I_ABORT: 203 204 { 204 205 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")); 206 208 notify->Go(); 207 209 fStatusWindow->Hide(); 208 210 fInstall->SetEnabled(true); … … 214 216 case P_MSG_I_ERROR: 215 217 { 216 218 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")); 222 224 notify->Go(); 223 225 fStatusWindow->Hide(); 224 226 fInstall->SetEnabled(true); … … 300 302 case P_EXISTS_ASK: 301 303 case P_EXISTS_NONE: 302 304 { 303 BString alertString = T("The ");305 BString alertString = item.ItemKind(); 304 306 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?"); 308 310 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")); 311 313 312 314 choice = alert->Go(); 313 315 switch (choice) { … … 323 325 324 326 if (policy == P_EXISTS_NONE) { 325 327 // 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 "th is installation?\nAll existing files will be");328 alertString = TR("Do you want to remember this decision for " 329 "the rest of this installation?\n"); 328 330 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?")); 330 333 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")); 333 336 334 337 int32 decision = alert->Go(); 335 338 if (decision == 0) … … 361 364 fInstallTypes = new BPopUpMenu("none"); 362 365 363 366 BMenuField *installType = new BMenuField("install_type", 364 T ("Installation type:"), fInstallTypes, 0);367 TR("Installation type:"), fInstallTypes, 0); 365 368 installType->SetAlignment(B_ALIGN_RIGHT); 366 369 installType->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_MIDDLE)); 367 370 … … 370 373 fInstallDesc->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 371 374 fInstallDesc->MakeEditable(false); 372 375 fInstallDesc->MakeSelectable(false); 373 fInstallDesc->SetText(T ("No installation type selected"));376 fInstallDesc->SetText(TR("No installation type selected")); 374 377 fInstallDesc->TextHeight(0, fInstallDesc->TextLength()); 375 378 376 fInstall = new BButton("install_button", T ("Install"),379 fInstall = new BButton("install_button", TR("Install"), 377 380 new BMessage(P_MSG_INSTALL)); 378 381 379 382 BView *installField = BGroupLayoutBuilder(B_VERTICAL, 5.0f) … … 436 439 fInstallTypes = new BPopUpMenu("none"); 437 440 438 441 BMenuField *installType = new BMenuField(BRect(2, 2, 100, 50), "install_type", 439 T ("Installation type:"), fInstallTypes, false);442 TR("Installation type:"), fInstallTypes, false); 440 443 installType->SetDivider(installType->StringWidth(installType->Label()) + 8); 441 444 installType->SetAlignment(B_ALIGN_RIGHT); 442 445 installType->ResizeToPreferred(); … … 450 453 B_WILL_DRAW); 451 454 fInstallDesc->MakeEditable(false); 452 455 fInstallDesc->MakeSelectable(false); 453 fInstallDesc->SetText(T ("No installation type selected"));456 fInstallDesc->SetText(TR("No installation type selected")); 454 457 fInstallDesc->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 455 458 456 459 fInstallDesc->ResizeTo(rect.Width() - B_V_SCROLL_BAR_WIDTH, 60); … … 469 472 rect = installBox->Frame(); 470 473 rect.top = rect.bottom + 5; 471 474 rect.bottom += 35; 472 fDestField = new BMenuField(rect, "install_to", T ("Install to:"),475 fDestField = new BMenuField(rect, "install_to", TR("Install to:"), 473 476 fDestination, false); 474 477 fDestField->SetDivider(fDestField->StringWidth(fDestField->Label()) + 8); 475 478 fDestField->SetAlignment(B_ALIGN_RIGHT); … … 477 480 478 481 AddChild(fDestField); 479 482 480 fInstall = new BButton(rect, "install_button", T ("Install"),483 fInstall = new BButton(rect, "install_button", TR("Install"), 481 484 new BMessage(P_MSG_INSTALL)); 482 485 fInstall->ResizeToPreferred(); 483 486 AddChild(fInstall); … … 554 557 BPath path; 555 558 BMessage *temp; 556 559 BVolume volume; 560 char *tmp = TR("free"); 557 561 558 562 if (prof->path_type == P_INSTALL_PATH) { 559 563 dev_t device; … … 568 572 569 573 convert_size(volume.FreeBytes(), sizeString, 32); 570 574 name = path.Path(); 571 name << " (" << sizeString << " free)";575 name << " (" << sizeString << tmp << ")"; 572 576 item = new BMenuItem(name.String(), temp); 573 577 item->SetTarget(this); 574 578 fDestination->AddItem(item); … … 582 586 583 587 convert_size(volume.FreeBytes(), sizeString, 32); 584 588 name = path.Path(); 585 name << " (" << sizeString << " free)";589 name << " (" << sizeString << tmp << ")"; 586 590 item = new BMenuItem(name.String(), temp); 587 591 item->SetTarget(this); 588 592 fDestination->AddItem(item); … … 595 599 } 596 600 fDestination->AddSeparatorItem(); 597 601 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)); 599 604 item->SetTarget(this); 600 605 fDestination->AddItem(item); 601 606 … … 622 627 convert_size(volume.FreeBytes(), sizeString, 32); 623 628 volume.GetName(volumeName); 624 629 name = volumeName; 625 name << " (" << sizeString << " free)";630 name << " (" << sizeString << tmp << ")"; 626 631 item = new BMenuItem(name.String(), temp); 627 632 item->SetTarget(this); 628 633 fDestination->AddItem(item);