- Timestamp:
- Nov 11, 2021 2:45:18 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r91432 r92372 68 68 VBoxManageHelp.cpp \ 69 69 $(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp) \ 70 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrl.cpp) 70 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrl.cpp) \ 71 71 72 72 73 ifndef VBOX_ONLY_DOCS … … 115 116 VBoxManage_LIBS += $(LIB_DDU) 116 117 118 ifdef VBOX_WITH_VBOXMANAGE_NLS 119 VBoxManage_DEFS += VBOX_WITH_VBOXMANAGE_NLS 120 121 VBoxManage_INCS += \ 122 $(PATH_ROOT)/src/VBox/Main/include 123 124 VBoxManage_SOURCES += \ 125 $(PATH_ROOT)/src/VBox/Main/src-all/VirtualBoxTranslator.cpp \ 126 $(PATH_ROOT)/src/VBox/Main/src-all/QMTranslatorImpl.cpp \ 127 $(PATH_ROOT)/src/VBox/Main/src-all/GlobalStatusConversion.cpp 128 endif 129 130 117 131 # VBoxNetPortForwardString.h 118 132 VBoxManageNATNetwork.cpp_INCS += ../../NetworkServices/NetLib/ … … 228 242 229 243 include $(FILE_KBUILD_SUB_FOOTER) 230 -
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r89905 r92372 89 89 #define HOSTPARTITION_MAX 100 90 90 91 DECLARE_TRANSLATION_CONTEXT(Internal); 92 91 93 92 94 typedef struct HOSTPARTITION … … 141 143 Assert(enmCommand != USAGE_S_DUMPOPTS); 142 144 RTStrmPrintf(pStrm, 143 "Usage: VBoxManage internalcommands <command> [command arguments]\n" 144 "\n" 145 "Commands:\n" 146 "\n" 147 "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" 148 "WARNING: This is a development tool and shall only be used to analyse\n" 149 " problems. It is completely unsupported and will change in\n" 150 " incompatible ways without warning.\n", 145 Internal::tr( 146 "Usage: VBoxManage internalcommands <command> [command arguments]\n" 147 "\n" 148 "Commands:\n" 149 "\n" 150 "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" 151 "WARNING: This is a development tool and shall only be used to analyse\n" 152 " problems. It is completely unsupported and will change in\n" 153 " incompatible ways without warning.\n"), 151 154 152 155 (enmCommand == USAGE_I_LOADMAP || enmCommand == USAGE_S_ALL) 153 ? " loadmap <vmname|uuid> <symfile> <address> [module] [subtrahend] [segment]\n" 154 " This will instruct DBGF to load the given map file\n" 155 " during initialization. (See also loadmap in the debugger.)\n" 156 "\n" 156 ? Internal::tr( 157 " loadmap <vmname|uuid> <symfile> <address> [module] [subtrahend] [segment]\n" 158 " This will instruct DBGF to load the given map file\n" 159 " during initialization. (See also loadmap in the debugger.)\n" 160 "\n") 157 161 : "", 158 162 (enmCommand == USAGE_I_LOADSYMS || enmCommand == USAGE_S_ALL) 159 ? " loadsyms <vmname|uuid> <symfile> [delta] [module] [module address]\n" 160 " This will instruct DBGF to load the given symbol file\n" 161 " during initialization.\n" 162 "\n" 163 ? Internal::tr( 164 " loadsyms <vmname|uuid> <symfile> [delta] [module] [module address]\n" 165 " This will instruct DBGF to load the given symbol file\n" 166 " during initialization.\n" 167 "\n") 163 168 : "", 164 169 (enmCommand == USAGE_I_SETHDUUID || enmCommand == USAGE_S_ALL) 165 ? " sethduuid <filepath> [<uuid>]\n" 166 " Assigns a new UUID to the given image file. This way, multiple copies\n" 167 " of a container can be registered.\n" 168 "\n" 170 ? Internal::tr( 171 " sethduuid <filepath> [<uuid>]\n" 172 " Assigns a new UUID to the given image file. This way, multiple copies\n" 173 " of a container can be registered.\n" 174 "\n") 169 175 : "", 170 176 (enmCommand == USAGE_I_SETHDPARENTUUID || enmCommand == USAGE_S_ALL) 171 ? " sethdparentuuid <filepath> <uuid>\n" 172 " Assigns a new parent UUID to the given image file.\n" 173 "\n" 177 ? Internal::tr( 178 " sethdparentuuid <filepath> <uuid>\n" 179 " Assigns a new parent UUID to the given image file.\n" 180 "\n") 174 181 : "", 175 182 (enmCommand == USAGE_I_DUMPHDINFO || enmCommand == USAGE_S_ALL) 176 ? " dumphdinfo <filepath>\n" 183 ? Internal::tr( 184 " dumphdinfo <filepath>\n" 177 185 " Prints information about the image at the given location.\n" 178 "\n" 186 "\n") 179 187 : "", 180 188 (enmCommand == USAGE_I_LISTPARTITIONS || enmCommand == USAGE_S_ALL) 181 ? " listpartitions -rawdisk <diskname>\n" 182 " Lists all partitions on <diskname>.\n" 183 "\n" 189 ? Internal::tr( 190 " listpartitions -rawdisk <diskname>\n" 191 " Lists all partitions on <diskname>.\n" 192 "\n") 184 193 : "", 185 194 (enmCommand == USAGE_I_CREATERAWVMDK || enmCommand == USAGE_S_ALL) 186 ? " createrawvmdk -filename <filename> -rawdisk <diskname>\n" 187 " [-partitions <list of partition numbers> [-mbr <filename>] ]\n" 188 " [-relative]\n" 189 " Creates a new VMDK image which gives access to an entire host disk (if\n" 190 " the parameter -partitions is not specified) or some partitions of a\n" 191 " host disk. If access to individual partitions is granted, then the\n" 192 " parameter -mbr can be used to specify an alternative MBR to be used\n" 193 " (the partitioning information in the MBR file is ignored).\n" 194 " The diskname is on Linux e.g. /dev/sda, and on Windows e.g.\n" 195 " \\\\.\\PhysicalDrive0).\n" 196 " On Linux or FreeBSD host the parameter -relative causes a VMDK file to\n" 197 " be created which refers to individual partitions instead to the entire\n" 198 " disk.\n" 199 " The necessary partition numbers can be queried with\n" 200 " VBoxManage internalcommands listpartitions\n" 201 "\n" 195 ? Internal::tr( 196 " createrawvmdk -filename <filename> -rawdisk <diskname>\n" 197 " [-partitions <list of partition numbers> [-mbr <filename>] ]\n" 198 " [-relative]\n" 199 " Creates a new VMDK image which gives access to an entire host disk (if\n" 200 " the parameter -partitions is not specified) or some partitions of a\n" 201 " host disk. If access to individual partitions is granted, then the\n" 202 " parameter -mbr can be used to specify an alternative MBR to be used\n" 203 " (the partitioning information in the MBR file is ignored).\n" 204 " The diskname is on Linux e.g. /dev/sda, and on Windows e.g.\n" 205 " \\\\.\\PhysicalDrive0).\n" 206 " On Linux or FreeBSD host the parameter -relative causes a VMDK file to\n" 207 " be created which refers to individual partitions instead to the entire\n" 208 " disk.\n" 209 " The necessary partition numbers can be queried with\n" 210 " VBoxManage internalcommands listpartitions\n" 211 "\n") 202 212 : "", 203 213 (enmCommand == USAGE_I_RENAMEVMDK || enmCommand == USAGE_S_ALL) 204 ? " renamevmdk -from <filename> -to <filename>\n" 205 " Renames an existing VMDK image, including the base file and all its extents.\n" 206 "\n" 214 ? Internal::tr( 215 " renamevmdk -from <filename> -to <filename>\n" 216 " Renames an existing VMDK image, including the base file and all its extents.\n" 217 "\n") 207 218 : "", 208 219 (enmCommand == USAGE_I_CONVERTTORAW || enmCommand == USAGE_S_ALL) 209 ? " converttoraw [-format <fileformat>] <filename> <outputfile>"210 220 #ifdef ENABLE_CONVERT_RAW_TO_STDOUT 211 "|stdout" 212 #endif /* ENABLE_CONVERT_RAW_TO_STDOUT */ 213 "\n" 214 " Convert image to raw, writing to file" 215 #ifdef ENABLE_CONVERT_RAW_TO_STDOUT 216 " or stdout" 217 #endif /* ENABLE_CONVERT_RAW_TO_STDOUT */ 218 ".\n" 219 "\n" 221 ? Internal::tr( 222 " converttoraw [-format <fileformat>] <filename> <outputfile>|stdout" 223 "\n" 224 " Convert image to raw, writing to file or stdout.\n" 225 "\n") 226 #else 227 ? Internal::tr( 228 " converttoraw [-format <fileformat>] <filename> <outputfile>" 229 "\n" 230 " Convert image to raw, writing to file.\n" 231 "\n") 232 #endif 220 233 : "", 221 234 (enmCommand == USAGE_I_CONVERTHD || enmCommand == USAGE_S_ALL) 222 ? " converthd [-srcformat VDI|VMDK|VHD|RAW]\n" 223 " [-dstformat VDI|VMDK|VHD|RAW]\n" 224 " <inputfile> <outputfile>\n" 225 " converts hard disk images between formats\n" 226 "\n" 235 ? Internal::tr( 236 " converthd [-srcformat VDI|VMDK|VHD|RAW]\n" 237 " [-dstformat VDI|VMDK|VHD|RAW]\n" 238 " <inputfile> <outputfile>\n" 239 " converts hard disk images between formats\n" 240 "\n") 227 241 : "", 228 242 (enmCommand == USAGE_I_REPAIRHD || enmCommand == USAGE_S_ALL) 229 ? " repairhd [-dry-run]\n" 230 " [-format VDI|VMDK|VHD|...]\n" 231 " <filename>\n" 232 " Tries to repair corrupted disk images\n" 233 "\n" 243 ? Internal::tr( 244 " repairhd [-dry-run]\n" 245 " [-format VDI|VMDK|VHD|...]\n" 246 " <filename>\n" 247 " Tries to repair corrupted disk images\n" 248 "\n") 234 249 : "", 235 250 #ifdef RT_OS_WINDOWS 236 251 (enmCommand == USAGE_I_MODINSTALL || enmCommand == USAGE_S_ALL) 237 ? " modinstall\n" 238 " Installs the necessary driver for the host OS\n" 239 "\n" 252 ? Internal::tr( 253 " modinstall\n" 254 " Installs the necessary driver for the host OS\n" 255 "\n") 240 256 : "", 241 257 (enmCommand == USAGE_I_MODUNINSTALL || enmCommand == USAGE_S_ALL) 242 ? " moduninstall\n" 243 " Deinstalls the driver\n" 244 "\n" 258 ? Internal::tr( 259 " moduninstall\n" 260 " Deinstalls the driver\n" 261 "\n") 245 262 : "", 246 263 #else … … 249 266 #endif 250 267 (enmCommand == USAGE_I_DEBUGLOG || enmCommand == USAGE_S_ALL) 251 ? " debuglog <vmname|uuid> [--enable|--disable] [--flags todo]\n" 252 " [--groups todo] [--destinations todo]\n" 253 " Controls debug logging.\n" 254 "\n" 268 ? Internal::tr( 269 " debuglog <vmname|uuid> [--enable|--disable] [--flags todo]\n" 270 " [--groups todo] [--destinations todo]\n" 271 " Controls debug logging.\n" 272 "\n") 255 273 : "", 256 274 (enmCommand == USAGE_I_PASSWORDHASH || enmCommand == USAGE_S_ALL) 257 ? " passwordhash <password>\n" 258 " Generates a password hash.\n" 259 "\n" 275 ? Internal::tr( 276 " passwordhash <password>\n" 277 " Generates a password hash.\n" 278 "\n") 260 279 : "", 261 280 (enmCommand == USAGE_I_GUESTSTATS || enmCommand == USAGE_S_ALL) 262 ? " gueststats <vmname|uuid> [--interval <seconds>]\n" 263 " Obtains and prints internal guest statistics.\n" 264 " Sets the update interval if specified.\n" 265 "\n" 281 ? Internal::tr( 282 " gueststats <vmname|uuid> [--interval <seconds>]\n" 283 " Obtains and prints internal guest statistics.\n" 284 " Sets the update interval if specified.\n" 285 "\n") 266 286 : "" 267 287 ); … … 321 341 } 322 342 } 323 RTMsgError( "Cannot find unique key for '%s'!", pszKeyBase);343 RTMsgError(Internal::tr("Cannot find unique key for '%s'!"), pszKeyBase); 324 344 return E_FAIL; 325 345 } … … 384 404 } 385 405 else 386 RTMsgError( "Failed to delete key '%s' from '%s', string conversion error %Rrc!",406 RTMsgError(Internal::tr("Failed to delete key '%s' from '%s', string conversion error %Rrc!"), 387 407 pszKey, pszKeyBase, rc); 388 408 … … 408 428 Bstr(pszValue).raw()); 409 429 if (FAILED(hrc)) 410 RTMsgError( "Failed to set '%s/%s/%s' to '%s'! hrc=%#x",430 RTMsgError(Internal::tr("Failed to set '%s/%s/%s' to '%s'! hrc=%#x"), 411 431 pszKeyBase, pszKey, pszAttribute, pszValue, hrc); 412 432 return hrc; … … 476 496 /* filename */ 477 497 if (argc < 2) 478 return errorArgument( "Missing the filename argument!\n");498 return errorArgument(Internal::tr("Missing the filename argument!\n")); 479 499 pszFilename = argv[1]; 480 500 … … 484 504 int irc = RTStrToInt64Ex(argv[2], NULL, 0, &offDelta); 485 505 if (RT_FAILURE(irc)) 486 return errorArgument(argv[0], "Failed to read delta '%s', rc=%Rrc\n", argv[2], rc);506 return errorArgument(argv[0], Internal::tr("Failed to read delta '%s', rc=%Rrc\n"), argv[2], rc); 487 507 } 488 508 … … 496 516 int irc = RTStrToUInt64Ex(argv[4], NULL, 0, &ModuleAddress); 497 517 if (RT_FAILURE(irc)) 498 return errorArgument(argv[0], "Failed to read module address '%s', rc=%Rrc\n", argv[4], rc);518 return errorArgument(argv[0], Internal::tr("Failed to read module address '%s', rc=%Rrc\n"), argv[4], rc); 499 519 } 500 520 … … 504 524 int irc = RTStrToUInt64Ex(argv[5], NULL, 0, &ModuleSize); 505 525 if (RT_FAILURE(irc)) 506 return errorArgument(argv[0], "Failed to read module size '%s', rc=%Rrc\n", argv[5], rc);526 return errorArgument(argv[0], Internal::tr("Failed to read module size '%s', rc=%Rrc\n"), argv[5], rc); 507 527 } 508 528 … … 553 573 /* filename */ 554 574 if (argc < 2) 555 return errorArgument( "Missing the filename argument!\n");575 return errorArgument(Internal::tr("Missing the filename argument!\n")); 556 576 pszFilename = argv[1]; 557 577 558 578 /* address */ 559 579 if (argc < 3) 560 return errorArgument( "Missing the module address argument!\n");580 return errorArgument(Internal::tr("Missing the module address argument!\n")); 561 581 int irc = RTStrToUInt64Ex(argv[2], NULL, 0, &ModuleAddress); 562 582 if (RT_FAILURE(irc)) 563 return errorArgument(argv[0], "Failed to read module address '%s', rc=%Rrc\n", argv[2], rc);583 return errorArgument(argv[0], Internal::tr("Failed to read module address '%s', rc=%Rrc\n"), argv[2], rc); 564 584 565 585 /* name (optional) */ … … 572 592 irc = RTStrToUInt64Ex(argv[4], NULL, 0, &offSubtrahend); 573 593 if (RT_FAILURE(irc)) 574 return errorArgument(argv[0], "Failed to read subtrahend '%s', rc=%Rrc\n", argv[4], rc);594 return errorArgument(argv[0], Internal::tr("Failed to read subtrahend '%s', rc=%Rrc\n"), argv[4], rc); 575 595 } 576 596 … … 580 600 irc = RTStrToUInt32Ex(argv[5], NULL, 0, &iSeg); 581 601 if (RT_FAILURE(irc)) 582 return errorArgument(argv[0], "Failed to read segment number '%s', rc=%Rrc\n", argv[5], rc);602 return errorArgument(argv[0], Internal::tr("Failed to read segment number '%s', rc=%Rrc\n"), argv[5], rc); 583 603 } 584 604 … … 607 627 RT_NOREF(pvUser); 608 628 RTMsgErrorV(pszFormat, va); 609 RTMsgError( "Error code %Rrc at %s(%u) in function %s", rc, RT_SRC_POS_ARGS);629 RTMsgError(Internal::tr("Error code %Rrc at %s(%u) in function %s"), rc, RT_SRC_POS_ARGS); 610 630 } 611 631 … … 630 650 uuidType = HDUUID; 631 651 if (argc != 3 && argc != 2) 632 return errorSyntax(USAGE_I_SETHDUUID, "Not enough parameters");652 return errorSyntax(USAGE_I_SETHDUUID, Internal::tr("Not enough parameters")); 633 653 /* if specified, take UUID, otherwise generate a new one */ 634 654 if (argc == 3) 635 655 { 636 656 if (RT_FAILURE(RTUuidFromStr(&rtuuid, argv[2]))) 637 return errorSyntax(USAGE_I_SETHDUUID, "Invalid UUID parameter");657 return errorSyntax(USAGE_I_SETHDUUID, Internal::tr("Invalid UUID parameter")); 638 658 uuid = argv[2]; 639 659 } else … … 644 664 uuidType = HDPARENTUUID; 645 665 if (argc != 3) 646 return errorSyntax(USAGE_I_SETHDPARENTUUID, "Not enough parameters");666 return errorSyntax(USAGE_I_SETHDPARENTUUID, Internal::tr("Not enough parameters")); 647 667 if (RT_FAILURE(RTUuidFromStr(&rtuuid, argv[2]))) 648 return errorSyntax(USAGE_I_SETHDPARENTUUID, "Invalid UUID parameter");668 return errorSyntax(USAGE_I_SETHDPARENTUUID, Internal::tr("Invalid UUID parameter")); 649 669 uuid = argv[2]; 650 670 } 651 671 else 652 return errorSyntax(USAGE_I_SETHDUUID, "Invalid invocation");672 return errorSyntax(USAGE_I_SETHDUUID, Internal::tr("Invalid invocation")); 653 673 654 674 /* just try it */ … … 658 678 argv[1], VDTYPE_INVALID, &pszFormat, &enmType); 659 679 if (RT_FAILURE(rc)) 660 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Format autodetect failed: %Rrc", rc);680 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Format autodetect failed: %Rrc"), rc); 661 681 662 682 PVDISK pDisk = NULL; … … 667 687 vdInterfaceError.pfnMessage = handleVDMessage; 668 688 669 rc = VDInterfaceAdd(&vdInterfaceError.Core, "VBoxManage_IError", VDINTERFACETYPE_ERROR,689 rc = VDInterfaceAdd(&vdInterfaceError.Core, Internal::tr("VBoxManage_IError"), VDINTERFACETYPE_ERROR, 670 690 NULL, sizeof(VDINTERFACEERROR), &pVDIfs); 671 691 AssertRC(rc); … … 673 693 rc = VDCreate(pVDIfs, enmType, &pDisk); 674 694 if (RT_FAILURE(rc)) 675 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot create the virtual disk container: %Rrc", rc);695 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot create the virtual disk container: %Rrc"), rc); 676 696 677 697 /* Open the image */ 678 698 rc = VDOpen(pDisk, pszFormat, argv[1], VD_OPEN_FLAGS_NORMAL | VD_OPEN_FLAGS_INFO, NULL); 679 699 if (RT_FAILURE(rc)) 680 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot open the image: %Rrc", rc);700 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot open the image: %Rrc"), rc); 681 701 682 702 if (uuidType == HDUUID) … … 685 705 rc = VDSetParentUuid(pDisk, VD_LAST_IMAGE, uuid.raw()); 686 706 if (RT_FAILURE(rc)) 687 RTMsgError( "Cannot set a new UUID: %Rrc", rc);707 RTMsgError(Internal::tr("Cannot set a new UUID: %Rrc"), rc); 688 708 else 689 RTPrintf( "UUID changed to: %s\n", uuid.toString().c_str());709 RTPrintf(Internal::tr("UUID changed to: %s\n"), uuid.toString().c_str()); 690 710 691 711 VDCloseAll(pDisk); … … 702 722 if (argc != 1) 703 723 { 704 return errorSyntax(USAGE_I_DUMPHDINFO, "Not enough parameters");724 return errorSyntax(USAGE_I_DUMPHDINFO, Internal::tr("Not enough parameters")); 705 725 } 706 726 … … 711 731 argv[0], VDTYPE_INVALID, &pszFormat, &enmType); 712 732 if (RT_FAILURE(rc)) 713 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Format autodetect failed: %Rrc", rc);733 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Format autodetect failed: %Rrc"), rc); 714 734 715 735 PVDISK pDisk = NULL; … … 720 740 vdInterfaceError.pfnMessage = handleVDMessage; 721 741 722 rc = VDInterfaceAdd(&vdInterfaceError.Core, "VBoxManage_IError", VDINTERFACETYPE_ERROR,742 rc = VDInterfaceAdd(&vdInterfaceError.Core, Internal::tr("VBoxManage_IError"), VDINTERFACETYPE_ERROR, 723 743 NULL, sizeof(VDINTERFACEERROR), &pVDIfs); 724 744 AssertRC(rc); … … 726 746 rc = VDCreate(pVDIfs, enmType, &pDisk); 727 747 if (RT_FAILURE(rc)) 728 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot create the virtual disk container: %Rrc", rc);748 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot create the virtual disk container: %Rrc"), rc); 729 749 730 750 /* Open the image */ 731 751 rc = VDOpen(pDisk, pszFormat, argv[0], VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_INFO, NULL); 732 752 if (RT_FAILURE(rc)) 733 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot open the image: %Rrc", rc);753 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot open the image: %Rrc"), rc); 734 754 735 755 VDDumpImages(pDisk); … … 812 832 if (partitionEntrySize * partitionsNumber > 4 * _1M) 813 833 { 814 RTMsgError( "The GPT header seems corrupt because it contains too many entries");834 RTMsgError(Internal::tr("The GPT header seems corrupt because it contains too many entries")); 815 835 return VERR_INVALID_PARAMETER; 816 836 } … … 819 839 if (!pbPartTable) 820 840 { 821 RTMsgError( "Allocating memory for the GPT partitions entries failed");841 RTMsgError(Internal::tr("Allocating memory for the GPT partitions entries failed")); 822 842 return VERR_NO_MEMORY; 823 843 } … … 828 848 if (RT_FAILURE(rc)) 829 849 { 830 RTMsgError( "Reading the partition table failed");850 RTMsgError(Internal::tr("Reading the partition table failed")); 831 851 RTMemFree(pbPartTable); 832 852 return rc; … … 912 932 else 913 933 { 914 RTMsgError( "More than one extended partition");934 RTMsgError(Internal::tr("More than one extended partition")); 915 935 return VERR_INVALID_PARAMETER; 916 936 } … … 930 950 if (!uStart) 931 951 { 932 RTMsgError( "Inconsistency for logical partition start");952 RTMsgError(Internal::tr("Inconsistency for logical partition start")); 933 953 return VERR_INVALID_PARAMETER; 934 954 } … … 942 962 if (aBuffer[510] != 0x55 || aBuffer[511] != 0xaa) 943 963 { 944 RTMsgError( "Logical partition without magic");964 RTMsgError(Internal::tr("Logical partition without magic")); 945 965 return VERR_INVALID_PARAMETER; 946 966 } … … 949 969 if (p[4] == 0) 950 970 { 951 RTMsgError( "Logical partition with type 0 encountered");971 RTMsgError(Internal::tr("Logical partition with type 0 encountered")); 952 972 return VERR_INVALID_PARAMETER; 953 973 } … … 966 986 if (!uStartOffset) 967 987 { 968 RTMsgError( "Invalid partition start offset");988 RTMsgError(Internal::tr("Invalid partition start offset")); 969 989 return VERR_INVALID_PARAMETER; 970 990 } … … 986 1006 else 987 1007 { 988 RTMsgError( "Logical partition chain broken");1008 RTMsgError(Internal::tr("Logical partition chain broken")); 989 1009 return VERR_INVALID_PARAMETER; 990 1010 } … … 1009 1029 else if (pPart->aPartitions[j].uStart == uMinVal) 1010 1030 { 1011 RTMsgError( "Two partitions start at the same place");1031 RTMsgError(Internal::tr("Two partitions start at the same place")); 1012 1032 return VERR_INVALID_PARAMETER; 1013 1033 } 1014 1034 else if (pPart->aPartitions[j].uStart == 0) 1015 1035 { 1016 RTMsgError( "Partition starts at sector 0");1036 RTMsgError(Internal::tr("Partition starts at sector 0")); 1017 1037 return VERR_INVALID_PARAMETER; 1018 1038 } … … 1050 1070 pPart->cPartitions-1 != i) 1051 1071 { 1052 RTMsgError( "Overlapping GPT partitions");1072 RTMsgError(Internal::tr("Overlapping GPT partitions")); 1053 1073 return VERR_INVALID_PARAMETER; 1054 1074 } … … 1066 1086 if (pPart->aPartitions[i].uStart < uPrevEnd) 1067 1087 { 1068 RTMsgError( "Overlapping MBR partitions");1088 RTMsgError(Internal::tr("Overlapping MBR partitions")); 1069 1089 return VERR_INVALID_PARAMETER; 1070 1090 } … … 1089 1109 if (argc <= i + 1) 1090 1110 { 1091 return errorArgument( "Missing argument to '%s'", argv[i]);1111 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1092 1112 } 1093 1113 i++; … … 1096 1116 else 1097 1117 { 1098 return errorSyntax(USAGE_I_LISTPARTITIONS, "Invalid parameter '%s'", argv[i]);1118 return errorSyntax(USAGE_I_LISTPARTITIONS, Internal::tr("Invalid parameter '%s'"), argv[i]); 1099 1119 } 1100 1120 } 1101 1121 1102 1122 if (rawdisk.isEmpty()) 1103 return errorSyntax(USAGE_I_LISTPARTITIONS, "Mandatory parameter -rawdisk missing");1123 return errorSyntax(USAGE_I_LISTPARTITIONS, Internal::tr("Mandatory parameter -rawdisk missing")); 1104 1124 1105 1125 RTFILE hRawFile; 1106 1126 int vrc = RTFileOpen(&hRawFile, rawdisk.c_str(), RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE); 1107 1127 if (RT_FAILURE(vrc)) 1108 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot open the raw disk: %Rrc", vrc);1128 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot open the raw disk: %Rrc"), vrc); 1109 1129 1110 1130 HOSTPARTITIONS partitions; … … 1112 1132 /* Don't bail out on errors, print the table and return the result code. */ 1113 1133 1114 RTPrintf( "Number Type StartCHS EndCHS Size (MiB) Start (Sect)\n");1134 RTPrintf(Internal::tr("Number Type StartCHS EndCHS Size (MiB) Start (Sect)\n")); 1115 1135 for (unsigned i = 0; i < partitions.cPartitions; i++) 1116 1136 { … … 1174 1194 if (argc <= i + 1) 1175 1195 { 1176 return errorArgument( "Missing argument to '%s'", argv[i]);1196 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1177 1197 } 1178 1198 i++; … … 1183 1203 if (argc <= i + 1) 1184 1204 { 1185 return errorArgument( "Missing argument to '%s'", argv[i]);1205 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1186 1206 } 1187 1207 i++; … … 1192 1212 if (argc <= i + 1) 1193 1213 { 1194 return errorArgument( "Missing argument to '%s'", argv[i]);1214 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1195 1215 } 1196 1216 i++; … … 1201 1221 if (argc <= i + 1) 1202 1222 { 1203 return errorArgument( "Missing argument to '%s'", argv[i]);1223 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1204 1224 } 1205 1225 i++; … … 1213 1233 #endif /* RT_OS_LINUX || RT_OS_FREEBSD */ 1214 1234 else 1215 return errorSyntax(USAGE_I_CREATERAWVMDK, "Invalid parameter '%s'", argv[i]);1235 return errorSyntax(USAGE_I_CREATERAWVMDK, Internal::tr("Invalid parameter '%s'"), argv[i]); 1216 1236 } 1217 1237 1218 1238 if (filename.isEmpty()) 1219 return errorSyntax(USAGE_I_CREATERAWVMDK, "Mandatory parameter -filename missing");1239 return errorSyntax(USAGE_I_CREATERAWVMDK, Internal::tr("Mandatory parameter -filename missing")); 1220 1240 if (rawdisk.isEmpty()) 1221 return errorSyntax(USAGE_I_CREATERAWVMDK, "Mandatory parameter -rawdisk missing");1241 return errorSyntax(USAGE_I_CREATERAWVMDK, Internal::tr("Mandatory parameter -rawdisk missing")); 1222 1242 if (!pszPartitions && pszMBRFilename) 1223 return errorSyntax(USAGE_I_CREATERAWVMDK, "The parameter -mbr is only valid when the parameter -partitions is also present"); 1243 return errorSyntax(USAGE_I_CREATERAWVMDK, 1244 Internal::tr("The parameter -mbr is only valid when the parameter -partitions is also present")); 1224 1245 1225 1246 #ifdef RT_OS_DARWIN … … 1230 1251 if (RT_FAILURE(vrc)) 1231 1252 { 1232 RTMsgError( "Cannot open the raw disk '%s': %Rrc", rawdisk.c_str(), vrc);1253 RTMsgError(Internal::tr("Cannot open the raw disk '%s': %Rrc"), rawdisk.c_str(), vrc); 1233 1254 goto out; 1234 1255 } … … 1259 1280 else 1260 1281 { 1261 RTMsgError( "File '%s' is no fixed/removable medium device", rawdisk.c_str());1282 RTMsgError(Internal::tr("File '%s' is no fixed/removable medium device"), rawdisk.c_str()); 1262 1283 vrc = VERR_INVALID_PARAMETER; 1263 1284 goto out; … … 1276 1297 && !rawdisk.startsWith("\\\\.\\PhysicalDrive", Utf8Str::CaseInsensitive)) 1277 1298 { 1278 RTMsgError( "The -relative parameter is invalid for raw disk %s", rawdisk.c_str());1299 RTMsgError(Internal::tr("The -relative parameter is invalid for raw disk %s"), rawdisk.c_str()); 1279 1300 vrc = VERR_INVALID_PARAMETER; 1280 1301 goto out; … … 1290 1311 if (RT_FAILURE(RTFileQuerySize(hRawFile, &cbSize))) 1291 1312 { 1292 RTMsgError( "Cannot get the geometry of the raw disk '%s': %Rrc", rawdisk.c_str(), vrc);1313 RTMsgError(Internal::tr("Cannot get the geometry of the raw disk '%s': %Rrc"), rawdisk.c_str(), vrc); 1293 1314 goto out; 1294 1315 } … … 1297 1318 if (fRelative) 1298 1319 { 1299 RTMsgError( "The -relative parameter is invalid for raw images");1320 RTMsgError(Internal::tr("The -relative parameter is invalid for raw images")); 1300 1321 vrc = VERR_INVALID_PARAMETER; 1301 1322 goto out; … … 1331 1352 { 1332 1353 vrc = RTErrConvertFromErrno(errno); 1333 RTMsgError( "Cannot get the size of the raw disk '%s': %Rrc", rawdisk.c_str(), vrc);1354 RTMsgError(Internal::tr("Cannot get the size of the raw disk '%s': %Rrc"), rawdisk.c_str(), vrc); 1334 1355 goto out; 1335 1356 } … … 1341 1362 if (RT_FAILURE(vrc)) 1342 1363 { 1343 RTMsgError( "Failed to get size of file '%s': %Rrc", rawdisk.c_str(), vrc);1364 RTMsgError(Internal::tr("Failed to get size of file '%s': %Rrc"), rawdisk.c_str(), vrc); 1344 1365 goto out; 1345 1366 } 1346 1367 else if (fRelative) 1347 1368 { 1348 RTMsgError( "The -relative parameter is invalid for raw images");1369 RTMsgError(Internal::tr("The -relative parameter is invalid for raw images")); 1349 1370 vrc = VERR_INVALID_PARAMETER; 1350 1371 goto out; … … 1353 1374 else 1354 1375 { 1355 RTMsgError( "File '%s' is no block device", rawdisk.c_str());1376 RTMsgError(Internal::tr("File '%s' is no block device"), rawdisk.c_str()); 1356 1377 vrc = VERR_INVALID_PARAMETER; 1357 1378 goto out; … … 1361 1382 { 1362 1383 vrc = RTErrConvertFromErrno(errno); 1363 RTMsgError( "Failed to get file informtation for raw disk '%s': %Rrc",1384 RTMsgError(Internal::tr("Failed to get file informtation for raw disk '%s': %Rrc"), 1364 1385 rawdisk.c_str(), vrc); 1365 1386 } … … 1378 1399 else 1379 1400 { 1380 RTMsgError( "Cannot get the block size for file '%s': %Rrc", rawdisk.c_str(), vrc);1401 RTMsgError(Internal::tr("Cannot get the block size for file '%s': %Rrc", rawdisk.c_str()), vrc); 1381 1402 vrc = RTErrConvertFromErrno(errno); 1382 1403 goto out; … … 1386 1407 { 1387 1408 vrc = RTErrConvertFromErrno(errno); 1388 RTMsgError( "Cannot get the block count for file '%s': %Rrc", rawdisk.c_str(), vrc);1409 RTMsgError(Internal::tr("Cannot get the block count for file '%s': %Rrc"), rawdisk.c_str(), vrc); 1389 1410 goto out; 1390 1411 } … … 1396 1417 if (RT_FAILURE(vrc)) 1397 1418 { 1398 RTMsgError( "Failed to get size of file '%s': %Rrc", rawdisk.c_str(), vrc);1419 RTMsgError(Internal::tr("Failed to get size of file '%s': %Rrc"), rawdisk.c_str(), vrc); 1399 1420 goto out; 1400 1421 } … … 1402 1423 else 1403 1424 { 1404 RTMsgError( "File '%s' is neither block device nor regular file", rawdisk.c_str());1425 RTMsgError(Internal::tr("File '%s' is neither block device nor regular file"), rawdisk.c_str()); 1405 1426 vrc = VERR_INVALID_PARAMETER; 1406 1427 goto out; … … 1410 1431 { 1411 1432 vrc = RTErrConvertFromErrno(errno); 1412 RTMsgError( "Failed to get file informtation for raw disk '%s': %Rrc",1433 RTMsgError(Internal::tr("Failed to get file informtation for raw disk '%s': %Rrc"), 1413 1434 rawdisk.c_str(), vrc); 1414 1435 } … … 1425 1446 { 1426 1447 vrc = RTErrConvertFromErrno(errno); 1427 RTMsgError( "Cannot get the size of the raw disk '%s': %Rrc", rawdisk.c_str(), vrc);1448 RTMsgError(Internal::tr("Cannot get the size of the raw disk '%s': %Rrc"), rawdisk.c_str(), vrc); 1428 1449 goto out; 1429 1450 } … … 1434 1455 if (RT_FAILURE(vrc)) 1435 1456 { 1436 RTMsgError( "Failed to get size of file '%s': %Rrc", rawdisk.c_str(), vrc);1457 RTMsgError(Internal::tr("Failed to get size of file '%s': %Rrc"), rawdisk.c_str(), vrc); 1437 1458 goto out; 1438 1459 } … … 1440 1461 else 1441 1462 { 1442 RTMsgError( "File '%s' is no block or char device", rawdisk.c_str());1463 RTMsgError(Internal::tr("File '%s' is no block or char device"), rawdisk.c_str()); 1443 1464 vrc = VERR_INVALID_PARAMETER; 1444 1465 goto out; … … 1448 1469 { 1449 1470 vrc = RTErrConvertFromErrno(errno); 1450 RTMsgError( "Failed to get file informtation for raw disk '%s': %Rrc",1471 RTMsgError(Internal::tr("Failed to get file informtation for raw disk '%s': %Rrc"), 1451 1472 rawdisk.c_str(), vrc); 1452 1473 } … … 1463 1484 { 1464 1485 vrc = RTErrConvertFromErrno(errno); 1465 RTMsgError( "Cannot get the block count for file '%s': %Rrc", rawdisk.c_str(), vrc);1486 RTMsgError(Internal::tr("Cannot get the block count for file '%s': %Rrc"), rawdisk.c_str(), vrc); 1466 1487 goto out; 1467 1488 } … … 1471 1492 if (fRelative) 1472 1493 { 1473 RTMsgError( "The -relative parameter is invalid for raw images");1494 RTMsgError(Internal::tr("The -relative parameter is invalid for raw images")); 1474 1495 vrc = VERR_INVALID_PARAMETER; 1475 1496 goto out; … … 1479 1500 else 1480 1501 { 1481 RTMsgError( "File '%s' is neither character device nor regular file", rawdisk.c_str());1502 RTMsgError(Internal::tr("File '%s' is neither character device nor regular file"), rawdisk.c_str()); 1482 1503 vrc = VERR_INVALID_PARAMETER; 1483 1504 goto out; … … 1487 1508 { 1488 1509 vrc = RTErrConvertFromErrno(errno); 1489 RTMsgError( "Failed to get file informtation for raw disk '%s': %Rrc",1510 RTMsgError(Internal::tr("Failed to get file informtation for raw disk '%s': %Rrc"), 1490 1511 rawdisk.c_str(), vrc); 1491 1512 } … … 1496 1517 if (RT_FAILURE(vrc)) 1497 1518 { 1498 RTMsgError( "Cannot get the size of the raw disk '%s': %Rrc", rawdisk.c_str(), vrc);1519 RTMsgError(Internal::tr("Cannot get the size of the raw disk '%s': %Rrc"), rawdisk.c_str(), vrc); 1499 1520 goto out; 1500 1521 } … … 1504 1525 if (!cbSize || cbSize % 512) 1505 1526 { 1506 RTMsgError( "Detected size of raw disk '%s' is %RU64, an invalid value", rawdisk.c_str(), cbSize);1527 RTMsgError(Internal::tr("Detected size of raw disk '%s' is %RU64, an invalid value"), rawdisk.c_str(), cbSize); 1507 1528 vrc = VERR_INVALID_PARAMETER; 1508 1529 goto out; … … 1536 1557 if (RT_FAILURE(vrc)) 1537 1558 { 1538 RTMsgError( "Incorrect value in partitions parameter");1559 RTMsgError(Internal::tr("Incorrect value in partitions parameter")); 1539 1560 goto out; 1540 1561 } … … 1550 1571 else if (*p != '\0') 1551 1572 { 1552 RTMsgError( "Incorrect separator in partitions parameter");1573 RTMsgError(Internal::tr("Incorrect separator in partitions parameter")); 1553 1574 vrc = VERR_INVALID_PARAMETER; 1554 1575 goto out; … … 1560 1581 if (RT_FAILURE(vrc)) 1561 1582 { 1562 RTMsgError( "Cannot read the partition information from '%s'", rawdisk.c_str());1583 RTMsgError(Internal::tr("Cannot read the partition information from '%s'"), rawdisk.c_str()); 1563 1584 goto out; 1564 1585 } … … 1575 1596 * partitions error later during VMDK creation. So warn 1576 1597 * here and ignore what the user requested. */ 1577 RTMsgWarning("It is not possible (and necessary) to explicitly give access to the " 1578 "extended partition %u. If required, enable access to all logical " 1579 "partitions inside this extended partition.", 1598 RTMsgWarning(Internal::tr( 1599 "It is not possible (and necessary) to explicitly give access to the " 1600 "extended partition %u. If required, enable access to all logical " 1601 "partitions inside this extended partition."), 1580 1602 partitions.aPartitions[i].uIndex); 1581 1603 uPartitions &= ~RT_BIT(partitions.aPartitions[i].uIndex); … … 1594 1616 if (!pPartDesc) 1595 1617 { 1596 RTMsgError( "Out of memory allocating the partition list for '%s'", rawdisk.c_str());1618 RTMsgError(Internal::tr("Out of memory allocating the partition list for '%s'"), rawdisk.c_str()); 1597 1619 vrc = VERR_NO_MEMORY; 1598 1620 goto out; … … 1610 1632 if (!pPartData) 1611 1633 { 1612 RTMsgError("Out of memory allocating the partition descriptor for '%s'", rawdisk.c_str()); 1634 RTMsgError(Internal::tr("Out of memory allocating the partition descriptor for '%s'"), 1635 rawdisk.c_str()); 1613 1636 vrc = VERR_NO_MEMORY; 1614 1637 goto out; … … 1618 1641 if (RT_FAILURE(vrc)) 1619 1642 { 1620 RTMsgError("Cannot read partition data from raw device '%s': %Rrc", rawdisk.c_str(), vrc); 1643 RTMsgError(Internal::tr("Cannot read partition data from raw device '%s': %Rrc"), 1644 rawdisk.c_str(), vrc); 1621 1645 goto out; 1622 1646 } … … 1629 1653 if (RT_FAILURE(vrc)) 1630 1654 { 1631 RTMsgError("Cannot open replacement MBR file '%s' specified with -mbr: %Rrc", pszMBRFilename, vrc); 1655 RTMsgError(Internal::tr("Cannot open replacement MBR file '%s' specified with -mbr: %Rrc"), 1656 pszMBRFilename, vrc); 1632 1657 goto out; 1633 1658 } … … 1636 1661 if (RT_FAILURE(vrc)) 1637 1662 { 1638 RTMsgError( "Cannot read replacement MBR file '%s': %Rrc", pszMBRFilename, vrc);1663 RTMsgError(Internal::tr("Cannot read replacement MBR file '%s': %Rrc"), pszMBRFilename, vrc); 1639 1664 goto out; 1640 1665 } … … 1659 1684 if (!pPartDesc) 1660 1685 { 1661 RTMsgError( "Out of memory allocating the partition list for '%s'", rawdisk.c_str());1686 RTMsgError(Internal::tr("Out of memory allocating the partition list for '%s'"), rawdisk.c_str()); 1662 1687 vrc = VERR_NO_MEMORY; 1663 1688 goto out; … … 1702 1727 { 1703 1728 vrc = VERR_NO_STR_MEMORY; 1704 RTMsgError( "Cannot create reference to individual partition %u, rc=%Rrc",1729 RTMsgError(Internal::tr("Cannot create reference to individual partition %u, rc=%Rrc"), 1705 1730 partitions.aPartitions[i].uIndex, vrc); 1706 1731 goto out; … … 1717 1742 { 1718 1743 vrc = VERR_NO_STR_MEMORY; 1719 RTMsgError( "Cannot create reference to individual partition %u (numbered %u), rc=%Rrc",1744 RTMsgError(Internal::tr("Cannot create reference to individual partition %u (numbered %u), rc=%Rrc"), 1720 1745 partitions.aPartitions[i].uIndex, partitions.aPartitions[i].uIndexWin, vrc); 1721 1746 goto out; … … 1779 1804 if (RawDescriptor.enmPartitioningType == VDISKPARTTYPE_MBR) 1780 1805 { 1781 RTMsgError( "MBR/EPT overlaps with data area");1806 RTMsgError(Internal::tr("MBR/EPT overlaps with data area")); 1782 1807 vrc = VERR_INVALID_PARAMETER; 1783 1808 goto out; … … 1785 1810 if (RawDescriptor.cPartDescs != i+1) 1786 1811 { 1787 RTMsgError( "GPT overlaps with data area");1812 RTMsgError(Internal::tr("GPT overlaps with data area")); 1788 1813 vrc = VERR_INVALID_PARAMETER; 1789 1814 goto out; … … 1823 1848 if (RT_FAILURE(vrc)) 1824 1849 { 1825 RTMsgError( "Cannot create the virtual disk container: %Rrc", vrc);1850 RTMsgError(Internal::tr("Cannot create the virtual disk container: %Rrc"), vrc); 1826 1851 goto out; 1827 1852 } … … 1842 1867 if (RT_FAILURE(vrc)) 1843 1868 { 1844 RTMsgError( "Cannot create the raw disk VMDK: %Rrc", vrc);1869 RTMsgError(Internal::tr("Cannot create the raw disk VMDK: %Rrc"), vrc); 1845 1870 goto out; 1846 1871 } 1847 RTPrintf( "RAW host disk access VMDK file %s created successfully.\n", filename.c_str());1872 RTPrintf(Internal::tr("RAW host disk access VMDK file %s created successfully.\n"), filename.c_str()); 1848 1873 1849 1874 VDCloseAll(pDisk); … … 1867 1892 1868 1893 out: 1869 RTMsgError( "The raw disk vmdk file was not created");1894 RTMsgError(Internal::tr("The raw disk vmdk file was not created")); 1870 1895 return RT_SUCCESS(vrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 1871 1896 } … … 1883 1908 if (argc <= i + 1) 1884 1909 { 1885 return errorArgument( "Missing argument to '%s'", argv[i]);1910 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1886 1911 } 1887 1912 i++; … … 1892 1917 if (argc <= i + 1) 1893 1918 { 1894 return errorArgument( "Missing argument to '%s'", argv[i]);1919 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1895 1920 } 1896 1921 i++; … … 1899 1924 else 1900 1925 { 1901 return errorSyntax(USAGE_I_RENAMEVMDK, "Invalid parameter '%s'", argv[i]);1926 return errorSyntax(USAGE_I_RENAMEVMDK, Internal::tr("Invalid parameter '%s'"), argv[i]); 1902 1927 } 1903 1928 } 1904 1929 1905 1930 if (src.isEmpty()) 1906 return errorSyntax(USAGE_I_RENAMEVMDK, "Mandatory parameter -from missing");1931 return errorSyntax(USAGE_I_RENAMEVMDK, Internal::tr("Mandatory parameter -from missing")); 1907 1932 if (dst.isEmpty()) 1908 return errorSyntax(USAGE_I_RENAMEVMDK, "Mandatory parameter -to missing");1933 return errorSyntax(USAGE_I_RENAMEVMDK, Internal::tr("Mandatory parameter -to missing")); 1909 1934 1910 1935 PVDISK pDisk = NULL; … … 1921 1946 vrc = VDCreate(pVDIfs, VDTYPE_HDD, &pDisk); 1922 1947 if (RT_FAILURE(vrc)) 1923 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot create the virtual disk container: %Rrc", vrc);1948 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot create the virtual disk container: %Rrc"), vrc); 1924 1949 1925 1950 vrc = VDOpen(pDisk, "VMDK", src.c_str(), VD_OPEN_FLAGS_NORMAL, NULL); … … 1930 1955 NULL, NULL, NULL); 1931 1956 if (RT_FAILURE(vrc)) 1932 RTMsgError( "Cannot rename the image: %Rrc", vrc);1957 RTMsgError(Internal::tr("Cannot rename the image: %Rrc"), vrc); 1933 1958 } 1934 1959 else 1935 RTMsgError( "Cannot create the source image: %Rrc", vrc);1960 RTMsgError(Internal::tr("Cannot create the source image: %Rrc"), vrc); 1936 1961 VDCloseAll(pDisk); 1937 1962 return RT_SUCCESS(vrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 1953 1978 if (argc <= i + 1) 1954 1979 { 1955 return errorArgument( "Missing argument to '%s'", argv[i]);1980 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 1956 1981 } 1957 1982 i++; … … 1972 1997 else 1973 1998 { 1974 return errorSyntax(USAGE_I_CONVERTTORAW, "Invalid parameter '%s'", argv[i]);1999 return errorSyntax(USAGE_I_CONVERTTORAW, Internal::tr("Invalid parameter '%s'"), argv[i]); 1975 2000 } 1976 2001 } 1977 2002 1978 2003 if (src.isEmpty()) 1979 return errorSyntax(USAGE_I_CONVERTTORAW, "Mandatory filename parameter missing");2004 return errorSyntax(USAGE_I_CONVERTTORAW, Internal::tr("Mandatory filename parameter missing")); 1980 2005 if (dst.isEmpty()) 1981 return errorSyntax(USAGE_I_CONVERTTORAW, "Mandatory outputfile parameter missing");2006 return errorSyntax(USAGE_I_CONVERTTORAW, Internal::tr("Mandatory outputfile parameter missing")); 1982 2007 1983 2008 PVDISK pDisk = NULL; … … 1995 2020 vrc = VDCreate(pVDIfs, VDTYPE_HDD, &pDisk); 1996 2021 if (RT_FAILURE(vrc)) 1997 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot create the virtual disk container: %Rrc", vrc);2022 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot create the virtual disk container: %Rrc"), vrc); 1998 2023 1999 2024 /* Open raw output file. */ … … 2007 2032 { 2008 2033 VDCloseAll(pDisk); 2009 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot create destination file \"%s\": %Rrc", dst.c_str(), vrc); 2034 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot create destination file \"%s\": %Rrc"), 2035 dst.c_str(), vrc); 2010 2036 } 2011 2037 … … 2025 2051 } 2026 2052 if (RT_FAILURE(vrc)) 2027 RTMsgError("No file format specified and autodetect failed - please specify format: %Rrc", vrc); 2053 RTMsgError(Internal::tr("No file format specified and autodetect failed - please specify format: %Rrc"), 2054 vrc); 2028 2055 else 2029 RTMsgError( "Only converting harddisk images is supported");2056 RTMsgError(Internal::tr("Only converting harddisk images is supported")); 2030 2057 return RTEXITCODE_FAILURE; 2031 2058 } … … 2042 2069 RTFileDelete(dst.c_str()); 2043 2070 } 2044 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot open the source image: %Rrc", vrc);2071 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot open the source image: %Rrc"), vrc); 2045 2072 } 2046 2073 … … 2052 2079 if (pvBuf) 2053 2080 { 2054 RTStrmPrintf(g_pStdErr, "Converting image \"%s\" with size %RU64 bytes (%RU64MB) to raw...\n", src.c_str(), cbSize, (cbSize + _1M - 1) / _1M); 2081 RTStrmPrintf(g_pStdErr, Internal::tr("Converting image \"%s\" with size %RU64 bytes (%RU64MB) to raw...\n"), 2082 src.c_str(), cbSize, (cbSize + _1M - 1) / _1M); 2055 2083 while (offFile < cbSize) 2056 2084 { … … 2073 2101 RTFileDelete(dst.c_str()); 2074 2102 } 2075 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot copy image data: %Rrc", vrc);2103 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Cannot copy image data: %Rrc"), vrc); 2076 2104 } 2077 2105 } … … 2085 2113 RTFileDelete(dst.c_str()); 2086 2114 } 2087 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Out of memory allocating read buffer");2115 return RTMsgErrorExit(RTEXITCODE_FAILURE, Internal::tr("Out of memory allocating read buffer")); 2088 2116 } 2089 2117 … … 2113 2141 if (argc <= i + 1) 2114 2142 { 2115 return errorArgument( "Missing argument to '%s'", argv[i]);2143 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 2116 2144 } 2117 2145 i++; … … 2122 2150 if (argc <= i + 1) 2123 2151 { 2124 return errorArgument( "Missing argument to '%s'", argv[i]);2152 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 2125 2153 } 2126 2154 i++; … … 2137 2165 else 2138 2166 { 2139 return errorSyntax(USAGE_I_CONVERTHD, "Invalid parameter '%s'", argv[i]);2167 return errorSyntax(USAGE_I_CONVERTHD, Internal::tr("Invalid parameter '%s'"), argv[i]); 2140 2168 } 2141 2169 } 2142 2170 2143 2171 if (src.isEmpty()) 2144 return errorSyntax(USAGE_I_CONVERTHD, "Mandatory input image parameter missing");2172 return errorSyntax(USAGE_I_CONVERTHD, Internal::tr("Mandatory input image parameter missing")); 2145 2173 if (dst.isEmpty()) 2146 return errorSyntax(USAGE_I_CONVERTHD, "Mandatory output image parameter missing");2174 return errorSyntax(USAGE_I_CONVERTHD, Internal::tr("Mandatory output image parameter missing")); 2147 2175 2148 2176 … … 2166 2194 if (RT_FAILURE(vrc)) 2167 2195 { 2168 RTMsgError("No file format specified and autodetect failed - please specify format: %Rrc", vrc); 2196 RTMsgError(Internal::tr("No file format specified and autodetect failed - please specify format: %Rrc"), 2197 vrc); 2169 2198 break; 2170 2199 } … … 2176 2205 if (RT_FAILURE(vrc)) 2177 2206 { 2178 RTMsgError( "Cannot create the source virtual disk container: %Rrc", vrc);2207 RTMsgError(Internal::tr("Cannot create the source virtual disk container: %Rrc"), vrc); 2179 2208 break; 2180 2209 } … … 2184 2213 if (RT_FAILURE(vrc)) 2185 2214 { 2186 RTMsgError( "Cannot open the source image: %Rrc", vrc);2215 RTMsgError(Internal::tr("Cannot open the source image: %Rrc"), vrc); 2187 2216 break; 2188 2217 } … … 2195 2224 if (RT_FAILURE(vrc)) 2196 2225 { 2197 RTMsgError( "Cannot create the destination virtual disk container: %Rrc", vrc);2226 RTMsgError(Internal::tr("Cannot create the destination virtual disk container: %Rrc"), vrc); 2198 2227 break; 2199 2228 } 2200 2229 2201 2230 uint64_t cbSize = VDGetSize(pSrcDisk, VD_LAST_IMAGE); 2202 RTStrmPrintf(g_pStdErr, "Converting image \"%s\" with size %RU64 bytes (%RU64MB)...\n", src.c_str(), cbSize, (cbSize + _1M - 1) / _1M); 2231 RTStrmPrintf(g_pStdErr, Internal::tr("Converting image \"%s\" with size %RU64 bytes (%RU64MB)...\n"), 2232 src.c_str(), cbSize, (cbSize + _1M - 1) / _1M); 2203 2233 2204 2234 /* Create the output image */ … … 2208 2238 if (RT_FAILURE(vrc)) 2209 2239 { 2210 RTMsgError( "Cannot copy the image: %Rrc", vrc);2240 RTMsgError(Internal::tr("Cannot copy the image: %Rrc"), vrc); 2211 2241 break; 2212 2242 } … … 2245 2275 if (argc <= i + 1) 2246 2276 { 2247 return errorArgument( "Missing argument to '%s'", argv[i]);2277 return errorArgument(Internal::tr("Missing argument to '%s'"), argv[i]); 2248 2278 } 2249 2279 i++; … … 2256 2286 else 2257 2287 { 2258 return errorSyntax(USAGE_I_REPAIRHD, "Invalid parameter '%s'", argv[i]);2288 return errorSyntax(USAGE_I_REPAIRHD, Internal::tr("Invalid parameter '%s'"), argv[i]); 2259 2289 } 2260 2290 } 2261 2291 2262 2292 if (image.isEmpty()) 2263 return errorSyntax(USAGE_I_REPAIRHD, "Mandatory input image parameter missing");2293 return errorSyntax(USAGE_I_REPAIRHD, Internal::tr("Mandatory input image parameter missing")); 2264 2294 2265 2295 PVDINTERFACE pVDIfs = NULL; … … 2284 2314 if (RT_FAILURE(vrc) && (vrc != VERR_VD_IMAGE_CORRUPTED)) 2285 2315 { 2286 RTMsgError("No file format specified and autodetect failed - please specify format: %Rrc", vrc); 2316 RTMsgError(Internal::tr("No file format specified and autodetect failed - please specify format: %Rrc"), 2317 vrc); 2287 2318 break; 2288 2319 } … … 2335 2366 */ 2336 2367 if (argc < 1) 2337 return errorSyntax(USAGE_I_DEBUGLOG, "Missing VM name/UUID");2368 return errorSyntax(USAGE_I_DEBUGLOG, Internal::tr("Missing VM name/UUID")); 2338 2369 2339 2370 ComPtr<IMachine> ptrMachine; … … 2435 2466 /** @todo flags, groups destination. */ 2436 2467 if (fFlagsPresent || fGroupsPresent || fDestsPresent) 2437 RTMsgWarning( "One or more of the requested features are not implemented! Feel free to do this.");2468 RTMsgWarning(Internal::tr("One or more of the requested features are not implemented! Feel free to do this.")); 2438 2469 2439 2470 if (fEnablePresent && fEnable) … … 2451 2482 /* one parameter, the password to hash */ 2452 2483 if (argc != 1) 2453 return errorSyntax(USAGE_I_PASSWORDHASH, "password to hash required");2484 return errorSyntax(USAGE_I_PASSWORDHASH, Internal::tr("password to hash required")); 2454 2485 2455 2486 uint8_t abDigest[RTSHA256_HASH_SIZE]; … … 2457 2488 char pszDigest[RTSHA256_DIGEST_LEN + 1]; 2458 2489 RTSha256ToString(abDigest, pszDigest, sizeof(pszDigest)); 2459 RTPrintf( "Password hash: %s\n", pszDigest);2490 RTPrintf(Internal::tr("Password hash: %s\n"), pszDigest); 2460 2491 2461 2492 return RTEXITCODE_SUCCESS; … … 2470 2501 /* one parameter, guest name */ 2471 2502 if (argc < 1) 2472 return errorSyntax(USAGE_I_GUESTSTATS, "Missing VM name/UUID");2503 return errorSyntax(USAGE_I_GUESTSTATS, Internal::tr("Missing VM name/UUID")); 2473 2504 2474 2505 /* … … 2500 2531 2501 2532 if (argc > 1 && aUpdateInterval == 0) 2502 return errorSyntax(USAGE_I_GUESTSTATS, "Invalid update interval specified");2503 2504 RTPrintf( "argc=%d interval=%u\n", argc, aUpdateInterval);2533 return errorSyntax(USAGE_I_GUESTSTATS, Internal::tr("Invalid update interval specified")); 2534 2535 RTPrintf(Internal::tr("argc=%d interval=%u\n"), argc, aUpdateInterval); 2505 2536 2506 2537 ComPtr<IMachine> ptrMachine; … … 2555 2586 /* at least a command is required */ 2556 2587 if (a->argc < 1) 2557 return errorSyntax(USAGE_S_ALL, "Command missing");2588 return errorSyntax(USAGE_S_ALL, Internal::tr("Command missing")); 2558 2589 2559 2590 /* … … 2595 2626 2596 2627 /* default: */ 2597 return errorSyntax(USAGE_S_ALL, "Invalid command '%s'", a->argv[0]);2628 return errorSyntax(USAGE_S_ALL, Internal::tr("Invalid command '%s'"), a->argv[0]); 2598 2629 } 2599 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r91617 r92372 47 47 48 48 #include "VBoxManage.h" 49 50 49 51 50 /********************************************************************************************************************************* … … 82 81 #endif 83 82 83 DECLARE_TRANSLATION_CONTEXT(VBoxManage); 84 84 85 85 /********************************************************************************************************************************* … … 236 236 if (FAILED(hrc)) 237 237 { 238 RTStrmPrintf(g_pStdErr, "Progress object failure: %Rhrc\n", hrc);238 RTStrmPrintf(g_pStdErr, VBoxManage::tr("Progress object failure: %Rhrc\n"), hrc); 239 239 RTStrmFlush(g_pStdErr); 240 240 return hrc; … … 253 253 if (FAILED(hrc)) 254 254 { 255 RTStrmPrintf(g_pStdErr, "Failed to get progress description: %Rhrc\n", hrc);255 RTStrmPrintf(g_pStdErr, VBoxManage::tr("Failed to get progress description: %Rhrc\n"), hrc); 256 256 return hrc; 257 257 } … … 320 320 progress->COMGETTER(TimeRemaining)(&lSecsRem); 321 321 322 RTStrmPrintf(g_pStdErr, "(%u/%u) %ls %02u%% => %02u%% (%d s remaining)\n", ulOperation + 1, cOperations,322 RTStrmPrintf(g_pStdErr, VBoxManage::tr("(%u/%u) %ls %02u%% => %02u%% (%d s remaining)\n"), ulOperation + 1, cOperations, 323 323 bstrOperationDescription.raw(), ulCurrentOperationPercent, ulCurrentPercent, lSecsRem); 324 324 ulLastPercent = ulCurrentPercent; … … 390 390 } 391 391 else if (g_fCanceled) 392 RTStrmPrintf(g_pStdErr, "CANCELED\n");392 RTStrmPrintf(g_pStdErr, VBoxManage::tr("CANCELED\n")); 393 393 else 394 394 { 395 395 if (fDetailed) 396 RTStrmPrintf(g_pStdErr, "Progress state: %Rhrc\n", iRc);396 RTStrmPrintf(g_pStdErr, VBoxManage::tr("Progress state: %Rhrc\n"), iRc); 397 397 else if (fFlags != SHOW_PROGRESS_NONE) 398 398 RTStrmPrintf(g_pStdErr, "%Rhrc\n", iRc); … … 404 404 if (!fDetailed) 405 405 RTStrmPrintf(g_pStdErr, "\n"); 406 RTStrmPrintf(g_pStdErr, "Progress object failure: %Rhrc\n", hrc);406 RTStrmPrintf(g_pStdErr, VBoxManage::tr("Progress object failure: %Rhrc\n"), hrc); 407 407 } 408 408 RTStrmFlush(g_pStdErr); … … 508 508 { 509 509 if (i >= argc - 1) 510 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Password expected");510 return RTMsgErrorExit(RTEXITCODE_FAILURE, VBoxManage::tr("Password expected")); 511 511 /* password for certain settings */ 512 512 pszSettingsPw = argv[i + 1]; … … 516 516 { 517 517 if (i >= argc-1) 518 return RTMsgErrorExit(RTEXITCODE_FAILURE, "No password file specified");518 return RTMsgErrorExit(RTEXITCODE_FAILURE, VBoxManage::tr("No password file specified")); 519 519 pszSettingsPwFile = argv[i+1]; 520 520 iCmd += 2; … … 524 524 { 525 525 if (papszResponseFileArgs) 526 return RTMsgErrorExitFailure( "Only one response file allowed");526 return RTMsgErrorExitFailure(VBoxManage::tr("Only one response file allowed")); 527 527 528 528 /* Load response file, making sure it's valid UTF-8. */ … … 532 532 (void **)&pszResponseFile, &cbResponseFile); 533 533 if (RT_FAILURE(vrc)) 534 return RTMsgErrorExitFailure( "Error reading response file '%s': %Rrc", &argv[i][1], vrc);534 return RTMsgErrorExitFailure(VBoxManage::tr("Error reading response file '%s': %Rrc"), &argv[i][1], vrc); 535 535 vrc = RTStrValidateEncoding(pszResponseFile); 536 536 if (RT_FAILURE(vrc)) 537 537 { 538 538 RTFileReadAllFree(pszResponseFile, cbResponseFile); 539 return RTMsgErrorExitFailure( "Invalid response file ('%s') encoding: %Rrc", &argv[i][1], vrc);539 return RTMsgErrorExitFailure(VBoxManage::tr("Invalid response file ('%s') encoding: %Rrc"), &argv[i][1], vrc); 540 540 } 541 541 … … 545 545 RTFileReadAllFree(pszResponseFile, cbResponseFile); 546 546 if (RT_FAILURE(vrc)) 547 return RTMsgErrorExitFailure( "Failed to parse response file '%s' (bourne shell style): %Rrc", &argv[i][1], vrc);547 return RTMsgErrorExitFailure(VBoxManage::tr("Failed to parse response file '%s' (bourne shell style): %Rrc"), &argv[i][1], vrc); 548 548 549 549 /* Construct new argv+argc with the response file arguments inserted. */ … … 551 551 papszNewArgv = (char **)RTMemAllocZ((cNewArgs + 2) * sizeof(papszNewArgv[0])); 552 552 if (!papszNewArgv) 553 return RTMsgErrorExitFailure( "out of memory");553 return RTMsgErrorExitFailure(VBoxManage::tr("out of memory")); 554 554 memcpy(&papszNewArgv[0], &argv[0], sizeof(argv[0]) * (i + 1)); 555 555 memcpy(&papszNewArgv[i + 1], papszResponseFileArgs, sizeof(argv[0]) * cResponseFileArgs); … … 595 595 if (!strcmp(argv[iCmd], "commands")) 596 596 { 597 RTPrintf( "commands:\n");597 RTPrintf(VBoxManage::tr("commands:\n")); 598 598 for (unsigned i = 0; i < RT_ELEMENTS(g_aCommands); i++) 599 599 if ( i == 0 /* skip backwards compatibility entries */ … … 604 604 return RTEXITCODE_SUCCESS; 605 605 } 606 return errorSyntax(USAGE_S_ALL, "Invalid command '%s'", argv[iCmd]);606 return errorSyntax(USAGE_S_ALL, VBoxManage::tr("Invalid command '%s'"), argv[iCmd]); 607 607 } 608 608 … … 623 623 com::GetVBoxUserHomeDirectory(szHome, sizeof(szHome)); 624 624 return RTMsgErrorExit(RTEXITCODE_FAILURE, 625 "Failed to initialize COM because the global settings directory '%s' is not accessible!", szHome);625 VBoxManage::tr("Failed to initialize COM because the global settings directory '%s' is not accessible!"), szHome); 626 626 } 627 627 # endif 628 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to initialize COM! (hrc=%Rhrc)", hrc);628 return RTMsgErrorExit(RTEXITCODE_FAILURE, VBoxManage::tr("Failed to initialize COM! (hrc=%Rhrc)"), hrc); 629 629 } 630 630 … … 673 673 { 674 674 com::ErrorInfo info; 675 RTMsgError( "Failed to create a session object!");675 RTMsgError(VBoxManage::tr("Failed to create a session object!")); 676 676 if (!info.isFullAvailable() && !info.isBasicAvailable()) 677 677 com::GluePrintRCMessage(hrc); … … 683 683 { 684 684 com::ErrorInfo info; 685 RTMsgError( "Failed to create the VirtualBox object!");685 RTMsgError(VBoxManage::tr("Failed to create the VirtualBox object!")); 686 686 if (!info.isFullAvailable() && !info.isBasicAvailable()) 687 687 { 688 688 com::GluePrintRCMessage(hrc); 689 RTMsgError( "Most likely, the VirtualBox COM server is not running or failed to start.");689 RTMsgError(VBoxManage::tr("Most likely, the VirtualBox COM server is not running or failed to start.")); 690 690 } 691 691 else -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r91432 r92372 40 40 #endif 41 41 42 #ifdef VBOX_WITH_VBOXMANAGE_NLS 43 # include "VirtualBoxTranslator.h" 44 #endif 45 42 46 43 47 //////////////////////////////////////////////////////////////////////////////// … … 46 50 // 47 51 //////////////////////////////////////////////////////////////////////////////// 52 53 #ifdef VBOX_WITH_VBOXMANAGE_NLS 54 # define DECLARE_TRANSLATION_CONTEXT(ctx) \ 55 struct ctx \ 56 {\ 57 static const char *tr(const char *pszSource, const char *pszComment = NULL, const size_t aNum = ~(size_t)0) \ 58 { \ 59 return VirtualBoxTranslator::translate(NULL, #ctx, pszSource, pszComment, aNum); \ 60 } \ 61 } 62 #else 63 # define DECLARE_TRANSLATION_CONTEXT(ctx) \ 64 struct ctx \ 65 {\ 66 static const char *tr(const char *pszSource, const char *pszComment = NULL, const size_t aNum = ~(size_t)0) \ 67 { \ 68 NOREF(pszComment); \ 69 NOREF(aNum); \ 70 return pszSource; \ 71 } \ 72 } 73 #endif 74 48 75 49 76 /** @name Syntax diagram category, i.e. the command. -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r91204 r92372 60 60 #include "VBoxManage.h" 61 61 using namespace com; 62 63 DECLARE_TRANSLATION_CONTEXT(Appliance); 62 64 63 65 … … 211 213 if (enmApplType != LOCAL) 212 214 return errorSyntax(USAGE_EXPORTAPPLIANCE, 213 "Option \"%s\" can't be used together with \"--cloud\" option.",215 Appliance::tr("Option \"%s\" can't be used together with \"--cloud\" option."), 214 216 GetState.pDef->pszLong); 215 217 if (ValueUnion.u32 == (uint32_t)-1) 216 218 return errorSyntax(USAGE_EXPORTAPPLIANCE, 217 "Value of option \"%s\" is out of range.",219 Appliance::tr("Value of option \"%s\" is out of range."), 218 220 GetState.pDef->pszLong); 219 221 … … 224 226 case 'o': // --ostype 225 227 if (enmApplType == NOT_SET) 226 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys or --cloud option.", GetState.pDef->pszLong); 228 return errorSyntax(USAGE_EXPORTAPPLIANCE, 229 Appliance::tr("Option \"%s\" requires preceding --vsys or --cloud option."), 230 GetState.pDef->pszLong); 227 231 mapArgsMapsPerVsys[ulCurVsys]["ostype"] = ValueUnion.psz; 228 232 break; … … 230 234 case 'V': // --vmname 231 235 if (enmApplType == NOT_SET) 232 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys or --cloud option.", GetState.pDef->pszLong); 236 return errorSyntax(USAGE_IMPORTAPPLIANCE, 237 Appliance::tr("Option \"%s\" requires preceding --vsys or --cloud option."), 238 GetState.pDef->pszLong); 233 239 mapArgsMapsPerVsys[ulCurVsys]["vmname"] = ValueUnion.psz; 234 240 break; … … 236 242 case 'S': // --settingsfile 237 243 if (enmApplType != LOCAL) 238 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 244 return errorSyntax(USAGE_IMPORTAPPLIANCE, 245 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 246 GetState.pDef->pszLong); 239 247 mapArgsMapsPerVsys[ulCurVsys]["settingsfile"] = ValueUnion.psz; 240 248 break; … … 242 250 case 'p': // --basefolder 243 251 if (enmApplType == NOT_SET) 244 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys or --cloud option.", GetState.pDef->pszLong); 252 return errorSyntax(USAGE_IMPORTAPPLIANCE, 253 Appliance::tr("Option \"%s\" requires preceding --vsys or --cloud option."), 254 GetState.pDef->pszLong); 245 255 mapArgsMapsPerVsys[ulCurVsys]["basefolder"] = ValueUnion.psz; 246 256 break; … … 248 258 case 'g': // --group 249 259 if (enmApplType != LOCAL) 250 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 260 return errorSyntax(USAGE_IMPORTAPPLIANCE, 261 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 262 GetState.pDef->pszLong); 251 263 mapArgsMapsPerVsys[ulCurVsys]["group"] = ValueUnion.psz; 252 264 break; … … 254 266 case 'd': // --description 255 267 if (enmApplType == NOT_SET) 256 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys or --cloud option.", GetState.pDef->pszLong); 268 return errorSyntax(USAGE_IMPORTAPPLIANCE, 269 Appliance::tr("Option \"%s\" requires preceding --vsys or --cloud option."), 270 GetState.pDef->pszLong); 257 271 mapArgsMapsPerVsys[ulCurVsys]["description"] = ValueUnion.psz; 258 272 break; … … 260 274 case 'L': // --eula 261 275 if (enmApplType != LOCAL) 262 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 276 return errorSyntax(USAGE_IMPORTAPPLIANCE, 277 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 278 GetState.pDef->pszLong); 263 279 mapArgsMapsPerVsys[ulCurVsys]["eula"] = ValueUnion.psz; 264 280 break; … … 266 282 case 'm': // --memory 267 283 if (enmApplType == NOT_SET) 268 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys or --cloud option.", GetState.pDef->pszLong); 284 return errorSyntax(USAGE_IMPORTAPPLIANCE, 285 Appliance::tr("Option \"%s\" requires preceding --vsys or --cloud option."), 286 GetState.pDef->pszLong); 269 287 mapArgsMapsPerVsys[ulCurVsys]["memory"] = ValueUnion.psz; 270 288 break; … … 272 290 case 'c': // --cpus 273 291 if (enmApplType == NOT_SET) 274 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys or --cloud option.", GetState.pDef->pszLong); 292 return errorSyntax(USAGE_IMPORTAPPLIANCE, 293 Appliance::tr("Option \"%s\" requires preceding --vsys or --cloud option."), 294 GetState.pDef->pszLong); 275 295 mapArgsMapsPerVsys[ulCurVsys]["cpus"] = ValueUnion.psz; 276 296 break; … … 278 298 case 'u': // --unit 279 299 if (enmApplType != LOCAL) 280 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 300 return errorSyntax(USAGE_IMPORTAPPLIANCE, 301 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 302 GetState.pDef->pszLong); 281 303 if (ValueUnion.u32 == (uint32_t)-1) 282 304 return errorSyntax(USAGE_EXPORTAPPLIANCE, 283 "Value of option \"%s\" is out of range.",305 Appliance::tr("Value of option \"%s\" is out of range."), 284 306 GetState.pDef->pszLong); 285 307 … … 289 311 case 'x': // --ignore 290 312 if (enmApplType != LOCAL) 291 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 313 return errorSyntax(USAGE_IMPORTAPPLIANCE, 314 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 315 GetState.pDef->pszLong); 292 316 if (ulCurUnit == (uint32_t)-1) 293 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --unit option.", GetState.pDef->pszLong); 317 return errorSyntax(USAGE_IMPORTAPPLIANCE, 318 Appliance::tr("Option \"%s\" requires preceding --unit option."), 319 GetState.pDef->pszLong); 294 320 mapIgnoresMapsPerVsys[ulCurVsys][ulCurUnit] = true; 295 321 break; … … 297 323 case 'T': // --scsitype 298 324 if (enmApplType != LOCAL) 299 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 325 return errorSyntax(USAGE_IMPORTAPPLIANCE, 326 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 327 GetState.pDef->pszLong); 300 328 if (ulCurUnit == (uint32_t)-1) 301 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --unit option.", GetState.pDef->pszLong); 329 return errorSyntax(USAGE_IMPORTAPPLIANCE, 330 Appliance::tr("Option \"%s\" requires preceding --unit option."), 331 GetState.pDef->pszLong); 302 332 mapArgsMapsPerVsys[ulCurVsys][Utf8StrFmt("scsitype%u", ulCurUnit)] = ValueUnion.psz; 303 333 break; … … 305 335 case 'C': // --controller 306 336 if (enmApplType != LOCAL) 307 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 337 return errorSyntax(USAGE_IMPORTAPPLIANCE, 338 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 339 GetState.pDef->pszLong); 308 340 if (ulCurUnit == (uint32_t)-1) 309 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --unit option.", GetState.pDef->pszLong); 341 return errorSyntax(USAGE_IMPORTAPPLIANCE, 342 Appliance::tr("Option \"%s\" requires preceding --unit option."), 343 GetState.pDef->pszLong); 310 344 mapArgsMapsPerVsys[ulCurVsys][Utf8StrFmt("controller%u", ulCurUnit)] = ValueUnion.psz; 311 345 break; … … 313 347 case 'D': // --disk 314 348 if (enmApplType != LOCAL) 315 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 349 return errorSyntax(USAGE_IMPORTAPPLIANCE, 350 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 351 GetState.pDef->pszLong); 316 352 if (ulCurUnit == (uint32_t)-1) 317 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --unit option.", GetState.pDef->pszLong); 353 return errorSyntax(USAGE_IMPORTAPPLIANCE, 354 Appliance::tr("Option \"%s\" requires preceding --unit option."), 355 GetState.pDef->pszLong); 318 356 mapArgsMapsPerVsys[ulCurVsys][Utf8StrFmt("disk%u", ulCurUnit)] = ValueUnion.psz; 319 357 break; … … 321 359 case 'O': // --options 322 360 if (RT_FAILURE(parseImportOptions(ValueUnion.psz, &options))) 323 return errorArgument( "Invalid import options '%s'\n", ValueUnion.psz);361 return errorArgument(Appliance::tr("Invalid import options '%s'\n"), ValueUnion.psz); 324 362 break; 325 363 … … 331 369 if (enmApplType != CLOUD) 332 370 return errorSyntax(USAGE_IMPORTAPPLIANCE, 333 "Option \"%s\" can't be used together with \"--vsys\" option.",371 Appliance::tr("Option \"%s\" can't be used together with \"--vsys\" option."), 334 372 GetState.pDef->pszLong); 335 373 … … 340 378 case 'k': // --cloudprofile 341 379 if (enmApplType != CLOUD) 342 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.",380 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("Option \"%s\" requires preceding --cloud option."), 343 381 GetState.pDef->pszLong); 344 382 mapArgsMapsPerVsys[ulCurVsys]["cloudprofile"] = ValueUnion.psz; … … 347 385 case 'l': // --cloudinstanceid 348 386 if (enmApplType != CLOUD) 349 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.",387 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("Option \"%s\" requires preceding --cloud option."), 350 388 GetState.pDef->pszLong); 351 389 mapArgsMapsPerVsys[ulCurVsys]["cloudinstanceid"] = ValueUnion.psz; … … 354 392 case 'B': // --cloudbucket 355 393 if (enmApplType != CLOUD) 356 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.",394 return errorSyntax(USAGE_EXPORTAPPLIANCE, Appliance::tr("Option \"%s\" requires preceding --cloud option."), 357 395 GetState.pDef->pszLong); 358 396 mapArgsMapsPerVsys[ulCurVsys]["cloudbucket"] = ValueUnion.psz; … … 363 401 strOvfFilename = ValueUnion.psz; 364 402 else 365 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Invalid parameter '%s'", ValueUnion.psz);403 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("Invalid parameter '%s'"), ValueUnion.psz); 366 404 break; 367 405 … … 370 408 { 371 409 if (RT_C_IS_PRINT(c)) 372 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Invalid option -%c", c);410 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("Invalid option -%c"), c); 373 411 else 374 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Invalid option case %i", c);412 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("Invalid option case %i"), c); 375 413 } 376 414 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 377 return errorSyntax(USAGE_IMPORTAPPLIANCE, "unknown option: %s\n", ValueUnion.psz);415 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("unknown option: %s\n"), ValueUnion.psz); 378 416 else if (ValueUnion.pDef) 379 417 return errorSyntax(USAGE_IMPORTAPPLIANCE, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 380 418 else 381 return errorSyntax(USAGE_IMPORTAPPLIANCE, "error: %Rrs", c);419 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("error: %Rrs"), c); 382 420 } 383 421 } … … 385 423 /* Last check after parsing all arguments */ 386 424 if (strOvfFilename.isEmpty()) 387 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Not enough arguments for \"import\" command.");425 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("Not enough arguments for \"import\" command.")); 388 426 389 427 if (enmApplType == NOT_SET) … … 407 445 catch (...) 408 446 { 409 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Not enough arguments for import from the Cloud.");447 return errorSyntax(USAGE_IMPORTAPPLIANCE, Appliance::tr("Not enough arguments for import from the Cloud.")); 410 448 } 411 449 … … 430 468 431 469 rc = showProgress(progressRead); 432 CHECK_PROGRESS_ERROR_RET(progressRead, ( "Appliance read failed"), RTEXITCODE_FAILURE);470 CHECK_PROGRESS_ERROR_RET(progressRead, (Appliance::tr("Appliance read failed")), RTEXITCODE_FAILURE); 433 471 434 472 Bstr path; /* fetch the path, there is stuff like username/password removed if any */ … … 442 480 // call interpret(); this can yield both warnings and errors, so we need 443 481 // to tinker with the error info a bit 444 RTStrmPrintf(g_pStdErr, "Interpreting %ls...\n", path.raw());482 RTStrmPrintf(g_pStdErr, Appliance::tr("Interpreting %ls...\n"), path.raw()); 445 483 rc = pAppliance->Interpret(); 446 484 com::ErrorInfoKeeper eik; … … 474 512 if (retDisks.size() > 0) 475 513 { 476 RTPrintf( "Disks:\n");514 RTPrintf(Appliance::tr("Disks:\n")); 477 515 for (unsigned i = 0; i < retDisks.size(); i++) 478 516 RTPrintf(" %ls\n", retDisks[i]); … … 496 534 if (ulVsys >= cVirtualSystemDescriptions) 497 535 return errorSyntax(USAGE_IMPORTAPPLIANCE, 498 "Invalid index %RI32 with -vsys option; the OVF contains only %zu virtual system(s).",536 Appliance::tr("Invalid index %RI32 with -vsys option; the OVF contains only %zu virtual system(s)."), 499 537 ulVsys, cVirtualSystemDescriptions); 500 538 } … … 530 568 ComSafeArrayAsOutParam(aExtraConfigValues))); 531 569 532 RTPrintf( "Virtual system %u:\n", i);570 RTPrintf(Appliance::tr("Virtual system %u:\n"), i); 533 571 534 572 // look up the corresponding command line options, if any … … 560 598 { 561 599 bstrFinalValue = strOverride; 562 RTPrintf( "%2u: OS type specified with --ostype: \"%ls\"\n",600 RTPrintf(Appliance::tr("%2u: OS type specified with --ostype: \"%ls\"\n"), 563 601 a, bstrFinalValue.raw()); 564 602 } 565 603 else 566 RTPrintf("%2u: Suggested OS type: \"%ls\"" 567 "\n (change with \"--vsys %u --ostype <type>\"; use \"list ostypes\" to list all possible values)\n", 604 RTPrintf(Appliance::tr( 605 "%2u: Suggested OS type: \"%ls\"" 606 "\n (change with \"--vsys %u --ostype <type>\"; use \"list ostypes\" to list all possible values)\n"), 568 607 a, bstrFinalValue.raw(), i); 569 608 break; … … 573 612 { 574 613 bstrFinalValue = strOverride; 575 RTPrintf( "%2u: VM name specified with --vmname: \"%ls\"\n",614 RTPrintf(Appliance::tr("%2u: VM name specified with --vmname: \"%ls\"\n"), 576 615 a, bstrFinalValue.raw()); 577 616 } 578 617 else 579 RTPrintf("%2u: Suggested VM name \"%ls\"" 580 "\n (change with \"--vsys %u --vmname <name>\")\n", 618 RTPrintf(Appliance::tr( 619 "%2u: Suggested VM name \"%ls\"" 620 "\n (change with \"--vsys %u --vmname <name>\")\n"), 581 621 a, bstrFinalValue.raw(), i); 582 622 break; 583 623 584 624 case VirtualSystemDescriptionType_Product: 585 RTPrintf( "%2u: Product (ignored): %ls\n",625 RTPrintf(Appliance::tr("%2u: Product (ignored): %ls\n"), 586 626 a, aVBoxValues[a]); 587 627 break; 588 628 589 629 case VirtualSystemDescriptionType_ProductUrl: 590 RTPrintf( "%2u: ProductUrl (ignored): %ls\n",630 RTPrintf(Appliance::tr("%2u: ProductUrl (ignored): %ls\n"), 591 631 a, aVBoxValues[a]); 592 632 break; 593 633 594 634 case VirtualSystemDescriptionType_Vendor: 595 RTPrintf( "%2u: Vendor (ignored): %ls\n",635 RTPrintf(Appliance::tr("%2u: Vendor (ignored): %ls\n"), 596 636 a, aVBoxValues[a]); 597 637 break; 598 638 599 639 case VirtualSystemDescriptionType_VendorUrl: 600 RTPrintf( "%2u: VendorUrl (ignored): %ls\n",640 RTPrintf(Appliance::tr("%2u: VendorUrl (ignored): %ls\n"), 601 641 a, aVBoxValues[a]); 602 642 break; 603 643 604 644 case VirtualSystemDescriptionType_Version: 605 RTPrintf( "%2u: Version (ignored): %ls\n",645 RTPrintf(Appliance::tr("%2u: Version (ignored): %ls\n"), 606 646 a, aVBoxValues[a]); 607 647 break; … … 611 651 { 612 652 bstrFinalValue = strOverride; 613 RTPrintf( "%2u: Description specified with --description: \"%ls\"\n",653 RTPrintf(Appliance::tr("%2u: Description specified with --description: \"%ls\"\n"), 614 654 a, bstrFinalValue.raw()); 615 655 } 616 656 else 617 RTPrintf("%2u: Description \"%ls\"" 618 "\n (change with \"--vsys %u --description <desc>\")\n", 657 RTPrintf(Appliance::tr( 658 "%2u: Description \"%ls\"" 659 "\n (change with \"--vsys %u --description <desc>\")\n"), 619 660 a, bstrFinalValue.raw(), i); 620 661 break; … … 626 667 if (strOverride == "show") 627 668 { 628 RTPrintf("%2u: End-user license agreement" 629 "\n (accept with \"--vsys %u --eula accept\"):" 630 "\n\n%ls\n\n", 669 RTPrintf(Appliance::tr( 670 "%2u: End-user license agreement" 671 "\n (accept with \"--vsys %u --eula accept\"):" 672 "\n\n%ls\n\n"), 631 673 a, i, bstrFinalValue.raw()); 632 674 } 633 675 else if (strOverride == "accept") 634 676 { 635 RTPrintf( "%2u: End-user license agreement (accepted)\n",677 RTPrintf(Appliance::tr("%2u: End-user license agreement (accepted)\n"), 636 678 a); 637 679 --cLicensesInTheWay; … … 639 681 else 640 682 return errorSyntax(USAGE_IMPORTAPPLIANCE, 641 "Argument to --eula must be either \"show\" or \"accept\".");683 Appliance::tr("Argument to --eula must be either \"show\" or \"accept\".")); 642 684 } 643 685 else 644 RTPrintf("%2u: End-user license agreement" 645 "\n (display with \"--vsys %u --eula show\";" 646 "\n accept with \"--vsys %u --eula accept\")\n", 686 RTPrintf(Appliance::tr( 687 "%2u: End-user license agreement" 688 "\n (display with \"--vsys %u --eula show\";" 689 "\n accept with \"--vsys %u --eula accept\")\n"), 647 690 a, i, i); 648 691 break; … … 658 701 { 659 702 bstrFinalValue = strOverride; 660 RTPrintf( "%2u: No. of CPUs specified with --cpus: %ls\n",703 RTPrintf(Appliance::tr("%2u: No. of CPUs specified with --cpus: %ls\n"), 661 704 a, bstrFinalValue.raw()); 662 705 } 663 706 else 664 707 return errorSyntax(USAGE_IMPORTAPPLIANCE, 665 "Argument to --cpus option must be a number greater than %d and less than %d.",708 Appliance::tr("Argument to --cpus option must be a number greater than %d and less than %d."), 666 709 VMM_MIN_CPU_COUNT - 1, VMM_MAX_CPU_COUNT + 1); 667 710 } 668 711 else 669 RTPrintf( "%2u: Number of CPUs: %ls\n (change with \"--vsys %u --cpus <n>\")\n",712 RTPrintf(Appliance::tr("%2u: Number of CPUs: %ls\n (change with \"--vsys %u --cpus <n>\")\n"), 670 713 a, bstrFinalValue.raw(), i); 671 714 break; … … 679 722 { 680 723 bstrFinalValue = strOverride; 681 RTPrintf( "%2u: Guest memory specified with --memory: %ls MB\n",724 RTPrintf(Appliance::tr("%2u: Guest memory specified with --memory: %ls MB\n"), 682 725 a, bstrFinalValue.raw()); 683 726 } 684 727 else 685 728 return errorSyntax(USAGE_IMPORTAPPLIANCE, 686 "Argument to --memory option must be a non-negative number.");729 Appliance::tr("Argument to --memory option must be a non-negative number.")); 687 730 } 688 731 else 689 RTPrintf( "%2u: Guest memory: %ls MB\n (change with \"--vsys %u --memory <MB>\")\n",732 RTPrintf(Appliance::tr("%2u: Guest memory: %ls MB\n (change with \"--vsys %u --memory <MB>\")\n"), 690 733 a, bstrFinalValue.raw(), i); 691 734 break; … … 695 738 if (fIgnoreThis) 696 739 { 697 RTPrintf( "%2u: IDE controller, type %ls -- disabled\n",740 RTPrintf(Appliance::tr("%2u: IDE controller, type %ls -- disabled\n"), 698 741 a, 699 742 aVBoxValues[a]); … … 701 744 } 702 745 else 703 RTPrintf("%2u: IDE controller, type %ls" 704 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 746 RTPrintf(Appliance::tr( 747 "%2u: IDE controller, type %ls" 748 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 705 749 a, 706 750 aVBoxValues[a], … … 711 755 if (fIgnoreThis) 712 756 { 713 RTPrintf( "%2u: SATA controller, type %ls -- disabled\n",757 RTPrintf(Appliance::tr("%2u: SATA controller, type %ls -- disabled\n"), 714 758 a, 715 759 aVBoxValues[a]); … … 717 761 } 718 762 else 719 RTPrintf("%2u: SATA controller, type %ls" 720 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 763 RTPrintf(Appliance::tr( 764 "%2u: SATA controller, type %ls" 765 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 721 766 a, 722 767 aVBoxValues[a], … … 727 772 if (fIgnoreThis) 728 773 { 729 RTPrintf( "%2u: SAS controller, type %ls -- disabled\n",774 RTPrintf(Appliance::tr("%2u: SAS controller, type %ls -- disabled\n"), 730 775 a, 731 776 aVBoxValues[a]); … … 733 778 } 734 779 else 735 RTPrintf("%2u: SAS controller, type %ls" 736 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 780 RTPrintf(Appliance::tr( 781 "%2u: SAS controller, type %ls" 782 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 737 783 a, 738 784 aVBoxValues[a], … … 743 789 if (fIgnoreThis) 744 790 { 745 RTPrintf( "%2u: SCSI controller, type %ls -- disabled\n",791 RTPrintf(Appliance::tr("%2u: SCSI controller, type %ls -- disabled\n"), 746 792 a, 747 793 aVBoxValues[a]); … … 754 800 { 755 801 bstrFinalValue = strOverride; 756 RTPrintf( "%2u: SCSI controller, type set with --unit %u --scsitype: \"%ls\"\n",802 RTPrintf(Appliance::tr("%2u: SCSI controller, type set with --unit %u --scsitype: \"%ls\"\n"), 757 803 a, 758 804 a, … … 760 806 } 761 807 else 762 RTPrintf("%2u: SCSI controller, type %ls" 763 "\n (change with \"--vsys %u --unit %u --scsitype {BusLogic|LsiLogic}\";" 764 "\n disable with \"--vsys %u --unit %u --ignore\")\n", 808 RTPrintf(Appliance::tr( 809 "%2u: SCSI controller, type %ls" 810 "\n (change with \"--vsys %u --unit %u --scsitype {BusLogic|LsiLogic}\";" 811 "\n disable with \"--vsys %u --unit %u --ignore\")\n"), 765 812 a, 766 813 aVBoxValues[a], … … 772 819 if (fIgnoreThis) 773 820 { 774 RTPrintf( "%2u: VirtioSCSI controller, type %ls -- disabled\n",821 RTPrintf(Appliance::tr("%2u: VirtioSCSI controller, type %ls -- disabled\n"), 775 822 a, 776 823 aVBoxValues[a]); … … 778 825 } 779 826 else 780 RTPrintf("%2u: VirtioSCSI controller, type %ls" 781 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 827 RTPrintf(Appliance::tr( 828 "%2u: VirtioSCSI controller, type %ls" 829 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 782 830 a, 783 831 aVBoxValues[a], … … 788 836 if (fIgnoreThis) 789 837 { 790 RTPrintf( "%2u: Hard disk image: source image=%ls -- disabled\n",838 RTPrintf(Appliance::tr("%2u: Hard disk image: source image=%ls -- disabled\n"), 791 839 a, 792 840 aOvfValues[a]); … … 824 872 //print some error about incompatible command-line arguments 825 873 return errorSyntax(USAGE_IMPORTAPPLIANCE, 826 "Option --ImportToVDI shall not be used together with "827 "manually set target path.");874 Appliance::tr("Option --ImportToVDI shall not be used together with " 875 "manually set target path.")); 828 876 829 877 } 830 878 831 RTPrintf( "%2u: Hard disk image: source image=%ls, target path=%ls, %ls\n",879 RTPrintf(Appliance::tr("%2u: Hard disk image: source image=%ls, target path=%ls, %ls\n"), 832 880 a, 833 881 aOvfValues[a], … … 847 895 Bstr bstrExtraConfigValue = strOverride; 848 896 bstrExtraConfigValue.detachTo(&aExtraConfigValues[a]); 849 RTPrintf( "%2u: Hard disk image: source image=%ls, target path=%ls, %ls\n",897 RTPrintf(Appliance::tr("%2u: Hard disk image: source image=%ls, target path=%ls, %ls\n"), 850 898 a, 851 899 aOvfValues[a], … … 933 981 bstrFinalValue = strOverride; 934 982 935 RTPrintf("%2u: Hard disk image: source image=%ls, target path=%ls, %ls" 936 "\n (change target path with \"--vsys %u --unit %u --disk path\";" 937 "\n disable with \"--vsys %u --unit %u --ignore\")\n", 983 RTPrintf(Appliance::tr( 984 "%2u: Hard disk image: source image=%ls, target path=%ls, %ls" 985 "\n (change target path with \"--vsys %u --unit %u --disk path\";" 986 "\n disable with \"--vsys %u --unit %u --ignore\")\n"), 938 987 a, 939 988 aOvfValues[a], … … 948 997 if (fIgnoreThis) 949 998 { 950 RTPrintf( "%2u: CD-ROM -- disabled\n",999 RTPrintf(Appliance::tr("%2u: CD-ROM -- disabled\n"), 951 1000 a); 952 1001 aEnabled[a] = false; 953 1002 } 954 1003 else 955 RTPrintf("%2u: CD-ROM" 956 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 1004 RTPrintf(Appliance::tr( 1005 "%2u: CD-ROM" 1006 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 957 1007 a, i, a); 958 1008 break; … … 961 1011 if (fIgnoreThis) 962 1012 { 963 RTPrintf( "%2u: Floppy -- disabled\n",1013 RTPrintf(Appliance::tr("%2u: Floppy -- disabled\n"), 964 1014 a); 965 1015 aEnabled[a] = false; 966 1016 } 967 1017 else 968 RTPrintf("%2u: Floppy" 969 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 1018 RTPrintf(Appliance::tr( 1019 "%2u: Floppy" 1020 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 970 1021 a, i, a); 971 1022 break; 972 1023 973 1024 case VirtualSystemDescriptionType_NetworkAdapter: 974 RTPrintf( "%2u: Network adapter: orig %ls, config %ls, extra %ls\n", /// @todo implement once we have a plan for the back-end1025 RTPrintf(Appliance::tr("%2u: Network adapter: orig %ls, config %ls, extra %ls\n"), /// @todo implement once we have a plan for the back-end 975 1026 a, 976 1027 aOvfValues[a], … … 982 1033 if (fIgnoreThis) 983 1034 { 984 RTPrintf( "%2u: USB controller -- disabled\n",1035 RTPrintf(Appliance::tr("%2u: USB controller -- disabled\n"), 985 1036 a); 986 1037 aEnabled[a] = false; 987 1038 } 988 1039 else 989 RTPrintf("%2u: USB controller" 990 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 1040 RTPrintf(Appliance::tr( 1041 "%2u: USB controller" 1042 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 991 1043 a, i, a); 992 1044 break; … … 995 1047 if (fIgnoreThis) 996 1048 { 997 RTPrintf( "%2u: Sound card \"%ls\" -- disabled\n",1049 RTPrintf(Appliance::tr("%2u: Sound card \"%ls\" -- disabled\n"), 998 1050 a, 999 1051 aOvfValues[a]); … … 1001 1053 } 1002 1054 else 1003 RTPrintf("%2u: Sound card (appliance expects \"%ls\", can change on import)" 1004 "\n (disable with \"--vsys %u --unit %u --ignore\")\n", 1055 RTPrintf(Appliance::tr( 1056 "%2u: Sound card (appliance expects \"%ls\", can change on import)" 1057 "\n (disable with \"--vsys %u --unit %u --ignore\")\n"), 1005 1058 a, 1006 1059 aOvfValues[a], … … 1013 1066 { 1014 1067 bstrFinalValue = strOverride; 1015 RTPrintf( "%2u: VM settings file name specified with --settingsfile: \"%ls\"\n",1068 RTPrintf(Appliance::tr("%2u: VM settings file name specified with --settingsfile: \"%ls\"\n"), 1016 1069 a, bstrFinalValue.raw()); 1017 1070 } 1018 1071 else 1019 RTPrintf("%2u: Suggested VM settings file name \"%ls\"" 1020 "\n (change with \"--vsys %u --settingsfile <filename>\")\n", 1072 RTPrintf(Appliance::tr( 1073 "%2u: Suggested VM settings file name \"%ls\"" 1074 "\n (change with \"--vsys %u --settingsfile <filename>\")\n"), 1021 1075 a, bstrFinalValue.raw(), i); 1022 1076 break; … … 1026 1080 { 1027 1081 bstrFinalValue = strOverride; 1028 RTPrintf( "%2u: VM base folder specified with --basefolder: \"%ls\"\n",1082 RTPrintf(Appliance::tr("%2u: VM base folder specified with --basefolder: \"%ls\"\n"), 1029 1083 a, bstrFinalValue.raw()); 1030 1084 } 1031 1085 else 1032 RTPrintf("%2u: Suggested VM base folder \"%ls\"" 1033 "\n (change with \"--vsys %u --basefolder <path>\")\n", 1086 RTPrintf(Appliance::tr( 1087 "%2u: Suggested VM base folder \"%ls\"" 1088 "\n (change with \"--vsys %u --basefolder <path>\")\n"), 1034 1089 a, bstrFinalValue.raw(), i); 1035 1090 break; … … 1039 1094 { 1040 1095 bstrFinalValue = strOverride; 1041 RTPrintf( "%2u: VM group specified with --group: \"%ls\"\n",1096 RTPrintf(Appliance::tr("%2u: VM group specified with --group: \"%ls\"\n"), 1042 1097 a, bstrFinalValue.raw()); 1043 1098 } 1044 1099 else 1045 RTPrintf("%2u: Suggested VM group \"%ls\"" 1046 "\n (change with \"--vsys %u --group <group>\")\n", 1100 RTPrintf(Appliance::tr( 1101 "%2u: Suggested VM group \"%ls\"" 1102 "\n (change with \"--vsys %u --group <group>\")\n"), 1047 1103 a, bstrFinalValue.raw(), i); 1048 1104 break; 1049 1105 1050 1106 case VirtualSystemDescriptionType_CloudInstanceShape: 1051 RTPrintf( "%2u: Suggested cloud shape \"%ls\"\n",1107 RTPrintf(Appliance::tr("%2u: Suggested cloud shape \"%ls\"\n"), 1052 1108 a, bstrFinalValue.raw()); 1053 1109 break; … … 1057 1113 { 1058 1114 bstrFinalValue = strOverride; 1059 RTPrintf( "%2u: Cloud bucket id specified with --cloudbucket: \"%ls\"\n",1115 RTPrintf(Appliance::tr("%2u: Cloud bucket id specified with --cloudbucket: \"%ls\"\n"), 1060 1116 a, bstrFinalValue.raw()); 1061 1117 } 1062 1118 else 1063 RTPrintf("%2u: Suggested cloud bucket id \"%ls\"" 1064 "\n (change with \"--cloud %u --cloudbucket <id>\")\n", 1119 RTPrintf(Appliance::tr( 1120 "%2u: Suggested cloud bucket id \"%ls\"" 1121 "\n (change with \"--cloud %u --cloudbucket <id>\")\n"), 1065 1122 a, bstrFinalValue.raw(), i); 1066 1123 break; … … 1070 1127 { 1071 1128 bstrFinalValue = strOverride; 1072 RTPrintf( "%2u: Cloud profile name specified with --cloudprofile: \"%ls\"\n",1129 RTPrintf(Appliance::tr("%2u: Cloud profile name specified with --cloudprofile: \"%ls\"\n"), 1073 1130 a, bstrFinalValue.raw()); 1074 1131 } 1075 1132 else 1076 RTPrintf("%2u: Suggested cloud profile name \"%ls\"" 1077 "\n (change with \"--cloud %u --cloudprofile <id>\")\n", 1133 RTPrintf(Appliance::tr( 1134 "%2u: Suggested cloud profile name \"%ls\"" 1135 "\n (change with \"--cloud %u --cloudprofile <id>\")\n"), 1078 1136 a, bstrFinalValue.raw(), i); 1079 1137 break; … … 1083 1141 { 1084 1142 bstrFinalValue = strOverride; 1085 RTPrintf( "%2u: Cloud instance id specified with --cloudinstanceid: \"%ls\"\n",1143 RTPrintf(Appliance::tr("%2u: Cloud instance id specified with --cloudinstanceid: \"%ls\"\n"), 1086 1144 a, bstrFinalValue.raw()); 1087 1145 } 1088 1146 else 1089 RTPrintf("%2u: Suggested cloud instance id \"%ls\"" 1090 "\n (change with \"--cloud %u --cloudinstanceid <id>\")\n", 1147 RTPrintf(Appliance::tr( 1148 "%2u: Suggested cloud instance id \"%ls\"" 1149 "\n (change with \"--cloud %u --cloudinstanceid <id>\")\n"), 1091 1150 a, bstrFinalValue.raw(), i); 1092 1151 break; 1093 1152 1094 1153 case VirtualSystemDescriptionType_CloudImageId: 1095 RTPrintf( "%2u: Suggested cloud base image id \"%ls\"\n",1154 RTPrintf(Appliance::tr("%2u: Suggested cloud base image id \"%ls\"\n"), 1096 1155 a, bstrFinalValue.raw()); 1097 1156 break; … … 1139 1198 1140 1199 if (cLicensesInTheWay == 1) 1141 RTMsgError( "Cannot import until the license agreement listed above is accepted.");1200 RTMsgError(Appliance::tr("Cannot import until the license agreement listed above is accepted.")); 1142 1201 else if (cLicensesInTheWay > 1) 1143 RTMsgError("Cannot import until the %c license agreements listed above are accepted.", cLicensesInTheWay); 1202 RTMsgError(Appliance::tr("Cannot import until the %c license agreements listed above are accepted."), 1203 cLicensesInTheWay); 1144 1204 1145 1205 if (!cLicensesInTheWay && fExecute) … … 1151 1211 1152 1212 rc = showProgress(progress); 1153 CHECK_PROGRESS_ERROR_RET(progress, ( "Appliance import failed"), RTEXITCODE_FAILURE);1213 CHECK_PROGRESS_ERROR_RET(progress, (Appliance::tr("Appliance import failed")), RTEXITCODE_FAILURE); 1154 1214 1155 1215 if (SUCCEEDED(rc)) 1156 RTPrintf( "Successfully imported the appliance.\n");1216 RTPrintf(Appliance::tr("Successfully imported the appliance.\n")); 1157 1217 } 1158 1218 } // end if (aVirtualSystemDescriptions.size() > 0) … … 1271 1331 case 'o': // --output 1272 1332 if (strOutputFile.length()) 1273 return errorSyntax(USAGE_EXPORTAPPLIANCE, "You can only specify --output once.");1333 return errorSyntax(USAGE_EXPORTAPPLIANCE, Appliance::tr("You can only specify --output once.")); 1274 1334 else 1275 1335 strOutputFile = ValueUnion.psz; … … 1306 1366 if (enmApplType != LOCAL) 1307 1367 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1308 "Option \"%s\" can't be used together with \"--cloud\" option.",1368 Appliance::tr("Option \"%s\" can't be used together with \"--cloud\" option."), 1309 1369 GetState.pDef->pszLong); 1310 1370 if (ValueUnion.u32 == (uint32_t)-1) 1311 1371 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1312 "Value of option \"%s\" is out of range.",1372 Appliance::tr("Value of option \"%s\" is out of range."), 1313 1373 GetState.pDef->pszLong); 1314 1374 … … 1318 1378 case 'V': // --vmname 1319 1379 if (enmApplType == NOT_SET) 1320 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys or --cloud option.", 1380 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1381 Appliance::tr("Option \"%s\" requires preceding --vsys or --cloud option."), 1321 1382 GetState.pDef->pszLong); 1322 1383 mapArgsMapsPerVsys[ulCurVsys]["vmname"] = ValueUnion.psz; … … 1325 1386 case 'p': // --product 1326 1387 if (enmApplType != LOCAL) 1327 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1388 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1389 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1390 GetState.pDef->pszLong); 1328 1391 mapArgsMapsPerVsys[ulCurVsys]["product"] = ValueUnion.psz; 1329 1392 break; … … 1331 1394 case 'P': // --producturl 1332 1395 if (enmApplType != LOCAL) 1333 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1396 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1397 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1398 GetState.pDef->pszLong); 1334 1399 mapArgsMapsPerVsys[ulCurVsys]["producturl"] = ValueUnion.psz; 1335 1400 break; … … 1337 1402 case 'n': // --vendor 1338 1403 if (enmApplType != LOCAL) 1339 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1404 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1405 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1406 GetState.pDef->pszLong); 1340 1407 mapArgsMapsPerVsys[ulCurVsys]["vendor"] = ValueUnion.psz; 1341 1408 break; … … 1343 1410 case 'N': // --vendorurl 1344 1411 if (enmApplType != LOCAL) 1345 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1412 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1413 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1414 GetState.pDef->pszLong); 1346 1415 mapArgsMapsPerVsys[ulCurVsys]["vendorurl"] = ValueUnion.psz; 1347 1416 break; … … 1349 1418 case 'v': // --version 1350 1419 if (enmApplType != LOCAL) 1351 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1420 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1421 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1422 GetState.pDef->pszLong); 1352 1423 mapArgsMapsPerVsys[ulCurVsys]["version"] = ValueUnion.psz; 1353 1424 break; … … 1355 1426 case 'd': // --description 1356 1427 if (enmApplType != LOCAL) 1357 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1428 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1429 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1430 GetState.pDef->pszLong); 1358 1431 mapArgsMapsPerVsys[ulCurVsys]["description"] = ValueUnion.psz; 1359 1432 break; … … 1361 1434 case 'e': // --eula 1362 1435 if (enmApplType != LOCAL) 1363 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1436 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1437 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1438 GetState.pDef->pszLong); 1364 1439 mapArgsMapsPerVsys[ulCurVsys]["eula"] = ValueUnion.psz; 1365 1440 break; … … 1367 1442 case 'E': // --eulafile 1368 1443 if (enmApplType != LOCAL) 1369 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys option.", GetState.pDef->pszLong); 1444 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1445 Appliance::tr("Option \"%s\" requires preceding --vsys option."), 1446 GetState.pDef->pszLong); 1370 1447 mapArgsMapsPerVsys[ulCurVsys]["eulafile"] = ValueUnion.psz; 1371 1448 break; … … 1373 1450 case 'O': // --options 1374 1451 if (RT_FAILURE(parseExportOptions(ValueUnion.psz, &options))) 1375 return errorArgument( "Invalid export options '%s'\n", ValueUnion.psz);1452 return errorArgument(Appliance::tr("Invalid export options '%s'\n"), ValueUnion.psz); 1376 1453 break; 1377 1454 … … 1383 1460 if (enmApplType != CLOUD) 1384 1461 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1385 "Option \"%s\" can't be used together with \"--vsys\" option.",1462 Appliance::tr("Option \"%s\" can't be used together with \"--vsys\" option."), 1386 1463 GetState.pDef->pszLong); 1387 1464 if (ValueUnion.u32 == (uint32_t)-1) 1388 1465 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1389 "Value of option \"%s\" is out of range.",1466 Appliance::tr("Value of option \"%s\" is out of range."), 1390 1467 GetState.pDef->pszLong); 1391 1468 … … 1396 1473 case 'S': // --cloudshape 1397 1474 if (enmApplType != CLOUD) 1398 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1475 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1476 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1399 1477 GetState.pDef->pszLong); 1400 1478 mapArgsMapsPerVsys[ulCurVsys]["cloudshape"] = ValueUnion.psz; … … 1403 1481 case 'D': // --clouddomain 1404 1482 if (enmApplType != CLOUD) 1405 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1483 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1484 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1406 1485 GetState.pDef->pszLong); 1407 1486 mapArgsMapsPerVsys[ulCurVsys]["clouddomain"] = ValueUnion.psz; … … 1410 1489 case 'R': // --clouddisksize 1411 1490 if (enmApplType != CLOUD) 1412 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1491 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1492 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1413 1493 GetState.pDef->pszLong); 1414 1494 mapArgsMapsPerVsys[ulCurVsys]["clouddisksize"] = ValueUnion.psz; … … 1417 1497 case 'B': // --cloudbucket 1418 1498 if (enmApplType != CLOUD) 1419 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1499 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1500 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1420 1501 GetState.pDef->pszLong); 1421 1502 mapArgsMapsPerVsys[ulCurVsys]["cloudbucket"] = ValueUnion.psz; … … 1424 1505 case 'Q': // --cloudocivcn 1425 1506 if (enmApplType != CLOUD) 1426 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1507 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1508 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1427 1509 GetState.pDef->pszLong); 1428 1510 mapArgsMapsPerVsys[ulCurVsys]["cloudocivcn"] = ValueUnion.psz; … … 1431 1513 case 'A': // --cloudpublicip 1432 1514 if (enmApplType != CLOUD) 1433 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1515 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1516 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1434 1517 GetState.pDef->pszLong); 1435 1518 mapArgsMapsPerVsys[ulCurVsys]["cloudpublicip"] = ValueUnion.psz; … … 1438 1521 case 'i': /* --cloudprivateip */ 1439 1522 if (enmApplType != CLOUD) 1440 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1523 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1524 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1441 1525 GetState.pDef->pszLong); 1442 1526 mapArgsMapsPerVsys[ulCurVsys]["cloudprivateip"] = ValueUnion.psz; … … 1445 1529 case 'F': // --cloudprofile 1446 1530 if (enmApplType != CLOUD) 1447 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1531 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1532 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1448 1533 GetState.pDef->pszLong); 1449 1534 mapArgsMapsPerVsys[ulCurVsys]["cloudprofile"] = ValueUnion.psz; … … 1452 1537 case 'T': // --cloudocisubnet 1453 1538 if (enmApplType != CLOUD) 1454 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1539 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1540 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1455 1541 GetState.pDef->pszLong); 1456 1542 mapArgsMapsPerVsys[ulCurVsys]["cloudocisubnet"] = ValueUnion.psz; … … 1459 1545 case 'K': // --cloudkeepobject 1460 1546 if (enmApplType != CLOUD) 1461 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1547 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1548 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1462 1549 GetState.pDef->pszLong); 1463 1550 mapArgsMapsPerVsys[ulCurVsys]["cloudkeepobject"] = ValueUnion.psz; … … 1466 1553 case 'L': // --cloudlaunchinstance 1467 1554 if (enmApplType != CLOUD) 1468 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1555 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1556 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1469 1557 GetState.pDef->pszLong); 1470 1558 mapArgsMapsPerVsys[ulCurVsys]["cloudlaunchinstance"] = ValueUnion.psz; … … 1473 1561 case 'M': /* --cloudlaunchmode */ 1474 1562 if (enmApplType != CLOUD) 1475 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1563 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1564 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1476 1565 GetState.pDef->pszLong); 1477 1566 mapArgsMapsPerVsys[ulCurVsys]["cloudlaunchmode"] = ValueUnion.psz; … … 1480 1569 case 'I': // --cloudinitscriptpath 1481 1570 if (enmApplType != CLOUD) 1482 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --cloud option.", 1571 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1572 Appliance::tr("Option \"%s\" requires preceding --cloud option."), 1483 1573 GetState.pDef->pszLong); 1484 1574 mapArgsMapsPerVsys[ulCurVsys]["cloudinitscriptpath"] = ValueUnion.psz; … … 1501 1591 { 1502 1592 if (RT_C_IS_GRAPH(c)) 1503 return errorSyntax(USAGE_EXPORTAPPLIANCE, "unhandled option: -%c", c);1593 return errorSyntax(USAGE_EXPORTAPPLIANCE, Appliance::tr("unhandled option: -%c"), c); 1504 1594 else 1505 return errorSyntax(USAGE_EXPORTAPPLIANCE, "unhandled option: %i", c);1595 return errorSyntax(USAGE_EXPORTAPPLIANCE, Appliance::tr("unhandled option: %i"), c); 1506 1596 } 1507 1597 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 1508 return errorSyntax(USAGE_EXPORTAPPLIANCE, "unknown option: %s", ValueUnion.psz);1598 return errorSyntax(USAGE_EXPORTAPPLIANCE, Appliance::tr("unknown option: %s"), ValueUnion.psz); 1509 1599 else if (ValueUnion.pDef) 1510 1600 return errorSyntax(USAGE_EXPORTAPPLIANCE, "%s: %Rrs", ValueUnion.pDef->pszLong, c); … … 1521 1611 1522 1612 if (llMachines.empty()) 1523 return errorSyntax(USAGE_EXPORTAPPLIANCE, "At least one machine must be specified with the export command."); 1613 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1614 Appliance::tr("At least one machine must be specified with the export command.")); 1524 1615 1525 1616 /* Last check after parsing all arguments */ 1526 1617 if (strOutputFile.isEmpty()) 1527 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Missing --output argument with export command.");1618 return errorSyntax(USAGE_EXPORTAPPLIANCE, Appliance::tr("Missing --output argument with export command.")); 1528 1619 1529 1620 if (enmApplType == NOT_SET) … … 1540 1631 if (ulVsys >= llMachines.size()) 1541 1632 return errorSyntax(USAGE_EXPORTAPPLIANCE, 1542 "Invalid index %RI32 with -vsys option; you specified only %zu virtual system(s).",1633 Appliance::tr("Invalid index %RI32 with -vsys option; you specified only %zu virtual system(s)."), 1543 1634 ulVsys, llMachines.size()); 1544 1635 } … … 1628 1719 else 1629 1720 { 1630 RTMsgError( "Cannot read license file \"%s\" which should be included in the virtual system %u.",1721 RTMsgError(Appliance::tr("Cannot read license file \"%s\" which should be included in the virtual system %u."), 1631 1722 itD->second.c_str(), i); 1632 1723 return RTEXITCODE_FAILURE; … … 1691 1782 { 1692 1783 com::SafeArray<BSTR> aPasswords(aIdentifiers.size()); 1693 RTPrintf( "Enter the passwords for the following identifiers to export the apppliance:\n");1784 RTPrintf(Appliance::tr("Enter the passwords for the following identifiers to export the apppliance:\n")); 1694 1785 for (unsigned idxId = 0; idxId < aIdentifiers.size(); idxId++) 1695 1786 { … … 1698 1789 Bstr bstrId = aIdentifiers[idxId]; 1699 1790 1700 RTEXITCODE rcExit = readPasswordFromConsole(&strPassword, "Password ID %s:", Utf8Str(bstrId).c_str()); 1791 RTEXITCODE rcExit = readPasswordFromConsole(&strPassword, Appliance::tr("Password ID %s:"), 1792 Utf8Str(bstrId).c_str()); 1701 1793 if (rcExit == RTEXITCODE_FAILURE) 1702 1794 { … … 1727 1819 1728 1820 rc = showProgress(progress); 1729 CHECK_PROGRESS_ERROR_RET(progress, ( "Appliance write failed"), RTEXITCODE_FAILURE);1821 CHECK_PROGRESS_ERROR_RET(progress, (Appliance::tr("Appliance write failed")), RTEXITCODE_FAILURE); 1730 1822 1731 1823 if (SUCCEEDED(rc)) 1732 RTPrintf( "Successfully exported %d machine(s).\n", llMachines.size());1824 RTPrintf(Appliance::tr("Successfully exported %d machine(s).\n"), llMachines.size()); 1733 1825 1734 1826 /* … … 1786 1878 ComObjPtr<ICloudClient> oCloudClient; 1787 1879 CHECK_ERROR_BREAK(pCloudProfile, CreateCloudClient(oCloudClient.asOutParam())); 1788 RTPrintf( "Creating a cloud instance...\n");1880 RTPrintf(Appliance::tr("Creating a cloud instance...\n")); 1789 1881 1790 1882 ComPtr<IProgress> progress1; 1791 1883 CHECK_ERROR_BREAK(oCloudClient, LaunchVM(pVSD, progress1.asOutParam())); 1792 1884 rc = showProgress(progress1); 1793 CHECK_PROGRESS_ERROR_RET(progress1, ("Creating the cloud instance failed"), RTEXITCODE_FAILURE); 1885 CHECK_PROGRESS_ERROR_RET(progress1, (Appliance::tr("Creating the cloud instance failed")), 1886 RTEXITCODE_FAILURE); 1794 1887 1795 1888 if (SUCCEEDED(rc)) … … 1802 1895 ComSafeArrayAsOutParam(aExtraConfigValues))); 1803 1896 1804 RTPrintf( "A cloud instance with id '%s' (provider '%s') was created\n",1897 RTPrintf(Appliance::tr("A cloud instance with id '%s' (provider '%s') was created\n"), 1805 1898 Utf8Str(Bstr(aVBoxValues[0]).raw()).c_str(), 1806 1899 Utf8Str(bstrCloudProviderShortName.raw()).c_str()); … … 1855 1948 int rc = RTVfsFileOpenNormal(pszOva, RTFILE_O_OPEN | RTFILE_O_READWRITE | RTFILE_O_DENY_WRITE, &hVfsFileOva); 1856 1949 if (RT_FAILURE(rc)) 1857 return RTMsgErrorExitFailure( "Failed to open OVA '%s' for updating: %Rrc", pszOva, rc);1950 return RTMsgErrorExitFailure(Appliance::tr("Failed to open OVA '%s' for updating: %Rrc"), pszOva, rc); 1858 1951 1859 1952 RTVFSFSSTREAM hVfsFssOva; … … 1861 1954 RTVfsFileRelease(hVfsFileOva); 1862 1955 if (RT_FAILURE(rc)) 1863 return RTMsgErrorExitFailure( "Failed to open OVA '%s' as a TAR file: %Rrc", pszOva, rc);1956 return RTMsgErrorExitFailure(Appliance::tr("Failed to open OVA '%s' as a TAR file: %Rrc"), pszOva, rc); 1864 1957 *phVfsFssOva = hVfsFssOva; 1865 1958 … … 1868 1961 */ 1869 1962 if (iVerbosity >= 2) 1870 RTMsgInfo( "Scanning OVA '%s' for a manifest and signature...", pszOva);1963 RTMsgInfo(Appliance::tr("Scanning OVA '%s' for a manifest and signature..."), pszOva); 1871 1964 char *pszSignatureName = NULL; 1872 1965 for (;;) … … 1884 1977 rc = VINF_SUCCESS; 1885 1978 else 1886 RTMsgError( "RTVfsFsStrmNext returned %Rrc", rc);1979 RTMsgError(Appliance::tr("RTVfsFsStrmNext returned %Rrc"), rc); 1887 1980 break; 1888 1981 } … … 1900 1993 { 1901 1994 if (*phVfsManifest != NIL_RTVFSFILE) 1902 rc = RTMsgErrorRc(VERR_DUPLICATE, "OVA contains multiple manifests! first: %s second: %s",1995 rc = RTMsgErrorRc(VERR_DUPLICATE, Appliance::tr("OVA contains multiple manifests! first: %s second: %s"), 1903 1996 pStrManifestName->c_str(), pszName); 1904 1997 else if (pszSignatureName) 1905 rc = RTMsgErrorRc(VERR_WRONG_ORDER, "Unsupported OVA file ordering! Signature file ('%s') as succeeded by '%s'.", 1998 rc = RTMsgErrorRc(VERR_WRONG_ORDER, 1999 Appliance::tr("Unsupported OVA file ordering! Signature file ('%s') as succeeded by '%s'."), 1906 2000 pszSignatureName, pszName); 1907 2001 else 1908 2002 { 1909 2003 if (iVerbosity >= 2) 1910 RTMsgInfo( "Found manifest file: %s", pszName);2004 RTMsgInfo(Appliance::tr("Found manifest file: %s"), pszName); 1911 2005 rc = pStrManifestName->assignNoThrow(pszName); 1912 2006 if (RT_SUCCESS(rc)) … … 1917 2011 RTVfsIoStrmRelease(hVfsIos); /* consumes stream handle. */ 1918 2012 if (RT_FAILURE(rc)) 1919 rc = RTMsgErrorRc(VERR_DUPLICATE, "Failed to memorize the manifest: %Rrc", rc);2013 rc = RTMsgErrorRc(VERR_DUPLICATE, Appliance::tr("Failed to memorize the manifest: %Rrc"), rc); 1920 2014 } 1921 2015 else 1922 RTMsgError( "Out of memory!");2016 RTMsgError(Appliance::tr("Out of memory!")); 1923 2017 } 1924 2018 } … … 1928 2022 { 1929 2023 if (*phVfsOldSignature != NIL_RTVFSOBJ) 1930 rc = RTMsgErrorRc(VERR_WRONG_ORDER, "Multiple signature files! (%s)", pszName);2024 rc = RTMsgErrorRc(VERR_WRONG_ORDER, Appliance::tr("Multiple signature files! (%s)"), pszName); 1931 2025 else 1932 2026 { 1933 2027 if (iVerbosity >= 2) 1934 RTMsgInfo( "Found existing signature file: %s", pszName);2028 RTMsgInfo(Appliance::tr("Found existing signature file: %s"), pszName); 1935 2029 pszSignatureName = pszName; 1936 2030 *phVfsOldSignature = hVfsObj; … … 1940 2034 } 1941 2035 else if (pszSignatureName) 1942 rc = RTMsgErrorRc(VERR_WRONG_ORDER, "Unsupported OVA file ordering! Signature file ('%s') as succeeded by '%s'.", 2036 rc = RTMsgErrorRc(VERR_WRONG_ORDER, 2037 Appliance::tr("Unsupported OVA file ordering! Signature file ('%s') as succeeded by '%s'."), 1943 2038 pszSignatureName, pszName); 1944 2039 … … 1956 2051 */ 1957 2052 if (RT_SUCCESS(rc) && *phVfsManifest == NIL_RTVFSFILE) 1958 rc = RTMsgErrorRc(VERR_NOT_FOUND, "The OVA contains no manifest and cannot be signed!");2053 rc = RTMsgErrorRc(VERR_NOT_FOUND, Appliance::tr("The OVA contains no manifest and cannot be signed!")); 1959 2054 else if (RT_SUCCESS(rc) && *phVfsOldSignature != NIL_RTVFSOBJ && !fReSign) 1960 2055 rc = RTMsgErrorRc(VERR_ALREADY_EXISTS, 1961 "The OVA is already signed ('%s')! (Use the --force option to force re-signing it.)",2056 Appliance::tr("The OVA is already signed ('%s')! (Use the --force option to force re-signing it.)"), 1962 2057 pszSignatureName); 1963 2058 … … 1979 2074 { 1980 2075 if (iVerbosity > 1) 1981 RTMsgInfo( "Writing '%s' to the OVA...", pszSignatureName);2076 RTMsgInfo(Appliance::tr("Writing '%s' to the OVA..."), pszSignatureName); 1982 2077 1983 2078 /* … … 1989 2084 rc = RTZipTarFsStreamTruncate(hVfsFssOva, hVfsOldSignature, false /*fAfter*/); 1990 2085 if (RT_FAILURE(rc)) 1991 return RTMsgErrorRc(rc, "RTZipTarFsStreamTruncate failed on '%s': %Rrc", pszOva, rc);2086 return RTMsgErrorRc(rc, Appliance::tr("RTZipTarFsStreamTruncate failed on '%s': %Rrc"), pszOva, rc); 1992 2087 } 1993 2088 … … 1998 2093 rc = RTVfsFileSeek(hVfsFileSignature, 0, RTFILE_SEEK_BEGIN, NULL); 1999 2094 if (RT_FAILURE(rc)) 2000 return RTMsgErrorRc(rc, "RTVfsFileSeek(hVfsFileSignature) failed: %Rrc", rc);2095 return RTMsgErrorRc(rc, Appliance::tr("RTVfsFileSeek(hVfsFileSignature) failed: %Rrc"), rc); 2001 2096 2002 2097 RTVFSOBJ hVfsObj = RTVfsObjFromFile(hVfsFileSignature); … … 2004 2099 RTVfsObjRelease(hVfsObj); 2005 2100 if (RT_FAILURE(rc)) 2006 return RTMsgErrorRc(rc, "RTVfsFsStrmAdd('%s') failed on '%s': %Rrc", pszSignatureName, pszOva, rc);2101 return RTMsgErrorRc(rc, Appliance::tr("RTVfsFsStrmAdd('%s') failed on '%s': %Rrc"), pszSignatureName, pszOva, rc); 2007 2102 2008 2103 /* … … 2011 2106 rc = RTVfsFsStrmEnd(hVfsFssOva); 2012 2107 if (RT_FAILURE(rc)) 2013 return RTMsgErrorRc(rc, "RTVfsFsStrmEnd failed on '%s': %Rrc", pszOva, rc);2108 return RTMsgErrorRc(rc, Appliance::tr("RTVfsFsStrmEnd failed on '%s': %Rrc"), pszOva, rc); 2014 2109 2015 2110 return VINF_SUCCESS; … … 2047 2142 { 2048 2143 if (iVerbosity > 2 && pszTag == NULL) 2049 RTMsgInfo( " Successfully decoded the PKCS#7/CMS signature...");2144 RTMsgInfo(Appliance::tr(" Successfully decoded the PKCS#7/CMS signature...")); 2050 2145 2051 2146 /* … … 2063 2158 { 2064 2159 if (iVerbosity > 1 && pszTag != NULL) 2065 RTMsgInfo( " Successfully verified the PKCS#7/CMS signature");2160 RTMsgInfo(Appliance::tr(" Successfully verified the PKCS#7/CMS signature")); 2066 2161 } 2067 2162 else 2068 rc = RTMsgErrorRc(rc, "Failed to verify the PKCS#7/CMS signature: %Rrc%RTeim", rc, &pErrInfo->Core); 2163 rc = RTMsgErrorRc(rc, Appliance::tr("Failed to verify the PKCS#7/CMS signature: %Rrc%RTeim"), 2164 rc, &pErrInfo->Core); 2069 2165 } 2070 2166 else 2071 RTMsgError( "RTCrPkcs7SignedData_CheckSanity failed on PKCS#7/CMS signature: %Rrc%RTeim",2167 RTMsgError(Appliance::tr("RTCrPkcs7SignedData_CheckSanity failed on PKCS#7/CMS signature: %Rrc%RTeim"), 2072 2168 rc, &pErrInfo->Core); 2073 2169 2074 2170 } 2075 2171 else 2076 rc = RTMsgErrorRc(VERR_WRONG_TYPE, "PKCS#7/CMS signature inner ContentType isn't 'data' but: %s",2172 rc = RTMsgErrorRc(VERR_WRONG_TYPE, Appliance::tr("PKCS#7/CMS signature inner ContentType isn't 'data' but: %s"), 2077 2173 pSignedData->ContentInfo.ContentType.szObjId); 2078 2174 } 2079 2175 else 2080 rc = RTMsgErrorRc(VERR_WRONG_TYPE, "PKCS#7/CMD signature is not 'signedData': %s", pContentInfo->ContentType.szObjId); 2176 rc = RTMsgErrorRc(VERR_WRONG_TYPE, Appliance::tr("PKCS#7/CMD signature is not 'signedData': %s"), 2177 pContentInfo->ContentType.szObjId); 2081 2178 return rc; 2082 2179 } … … 2118 2215 } 2119 2216 else 2120 rc = RTMsgErrorRc(rc, "RTCrPkcs7ContentInfo_Clone failed: %Rrc", rc);2217 rc = RTMsgErrorRc(rc, Appliance::tr("RTCrPkcs7ContentInfo_Clone failed: %Rrc"), rc); 2121 2218 } 2122 2219 } 2123 2220 else 2124 RTMsgError("RTCrPkcs7ContentInfo_DecodeAsn1 failed to decode PKCS#7/CMS signature: %Rrc%RTemi", rc, &pErrInfo->Core); 2221 RTMsgError(Appliance::tr("RTCrPkcs7ContentInfo_DecodeAsn1 failed to decode PKCS#7/CMS signature: %Rrc%RTemi"), 2222 rc, &pErrInfo->Core); 2125 2223 2126 2224 RTCrPkcs7ContentInfo_Delete(&ContentInfo); … … 2152 2250 return RTMsgErrorRc(rc, "RTVfsFileQuerySize/manifest: %Rrc", rc); 2153 2251 if (cbManifest > _4M) 2154 return RTMsgErrorRc(VERR_OUT_OF_RANGE, "Manifest is too big: %#RX64 bytes, max 4MiB", cbManifest); 2252 return RTMsgErrorRc(VERR_OUT_OF_RANGE, Appliance::tr("Manifest is too big: %#RX64 bytes, max 4MiB", "", cbManifest), 2253 cbManifest); 2155 2254 2156 2255 void *pvManifest = RTMemAllocZ(cbManifest + 1); 2157 2256 if (!pvManifest) 2158 return RTMsgErrorRc(VERR_NO_MEMORY, "Out of memory!");2257 return RTMsgErrorRc(VERR_NO_MEMORY, Appliance::tr("Out of memory!")); 2159 2258 2160 2259 rc = RTVfsFileReadAt(hVfsFileManifest, 0, pvManifest, (size_t)cbManifest, NULL); … … 2176 2275 if (RT_FAILURE(rc)) 2177 2276 { 2178 RTMsgError( "RTCrStoreCertAddFromFile failed on '%s': %Rrc%#RTeim", pszFile, rc, &pErrInfo->Core);2277 RTMsgError(Appliance::tr("RTCrStoreCertAddFromFile failed on '%s': %Rrc%#RTeim"), pszFile, rc, &pErrInfo->Core); 2179 2278 break; 2180 2279 } … … 2182 2281 } 2183 2282 else 2184 RTMsgError( "RTCrStoreCreateInMem failed: %Rrc", rc);2283 RTMsgError(Appliance::tr("RTCrStoreCreateInMem failed: %Rrc"), rc); 2185 2284 } 2186 2285 if (RT_SUCCESS(rc)) … … 2213 2312 { 2214 2313 if (iVerbosity > 1) 2215 RTMsgInfo( "Created PKCS#7/CMS signature: %zu bytes, %s.",2314 RTMsgInfo(Appliance::tr("Created PKCS#7/CMS signature: %zu bytes, %s."), 2216 2315 cbResult, RTCrDigestTypeToName(enmDigestType)); 2217 2316 if (enmDigestType == RTDIGESTTYPE_SHA1) 2218 RTMsgWarning( "Using SHA-1 instead of SHA-3 for the PKCS#7/CMS signature.");2317 RTMsgWarning(Appliance::tr("Using SHA-1 instead of SHA-3 for the PKCS#7/CMS signature.")); 2219 2318 2220 2319 /* … … 2225 2324 } 2226 2325 else 2227 RTMsgError( "RTCrPemWriteBlobToVfsFile failed: %Rrc", rc);2326 RTMsgError(Appliance::tr("RTCrPemWriteBlobToVfsFile failed: %Rrc"), rc); 2228 2327 } 2229 2328 RTMemFree(pvResult); 2230 2329 } 2231 2330 else 2232 rc = RTMsgErrorRc(VERR_NO_MEMORY, "Out of memory!");2331 rc = RTMsgErrorRc(VERR_NO_MEMORY, Appliance::tr("Out of memory!")); 2233 2332 } 2234 2333 else 2235 RTMsgError( "RTCrPkcs7SimpleSignSignedData failed: %Rrc%#RTeim", rc, &pErrInfo->Core);2334 RTMsgError(Appliance::tr("RTCrPkcs7SimpleSignSignedData failed: %Rrc%#RTeim"), rc, &pErrInfo->Core); 2236 2335 } 2237 2336 } 2238 2337 else 2239 RTMsgError( "RTVfsFileReadAt failed: %Rrc", rc);2338 RTMsgError(Appliance::tr("RTVfsFileReadAt failed: %Rrc"), rc); 2240 2339 RTMemFree(pvManifest); 2241 2340 return rc; … … 2290 2389 default: 2291 2390 return RTMsgErrorRc(VERR_INVALID_PARAMETER, 2292 "Unsupported digest type: %s", RTCrDigestTypeToName(enmDigestType));2391 Appliance::tr("Unsupported digest type: %s"), RTCrDigestTypeToName(enmDigestType)); 2293 2392 } 2294 2393 … … 2299 2398 int rc = RTCrDigestCreateByType(&hDigest, enmDigestType); 2300 2399 if (RT_FAILURE(rc)) 2301 return RTMsgErrorRc(rc, "Failed to create digest for %s: %Rrc", RTCrDigestTypeToName(enmDigestType), rc);2400 return RTMsgErrorRc(rc, Appliance::tr("Failed to create digest for %s: %Rrc"), RTCrDigestTypeToName(enmDigestType), rc); 2302 2401 2303 2402 rc = RTCrDigestUpdateFromVfsFile(hDigest, hVfsFileManifest, true /*fRewindFile*/); … … 2325 2424 { 2326 2425 if (iVerbosity > 1) 2327 RTMsgInfo("Created OVA signature: %zu bytes, %s", cbSignature, RTCrDigestTypeToName(enmDigestType)); 2426 RTMsgInfo(Appliance::tr("Created OVA signature: %zu bytes, %s"), cbSignature, 2427 RTCrDigestTypeToName(enmDigestType)); 2328 2428 2329 2429 /* … … 2337 2437 { 2338 2438 if (iVerbosity > 2) 2339 RTMsgInfo( " Successfully decoded and verified the OVA signature.\n");2439 RTMsgInfo(Appliance::tr(" Successfully decoded and verified the OVA signature.\n")); 2340 2440 2341 2441 /* … … 2368 2468 } 2369 2469 else 2370 RTMsgError("Failed to write certificate to signature file: %Rrc%#RTeim", rc, &pErrInfo->Core); 2470 RTMsgError(Appliance::tr("Failed to write certificate to signature file: %Rrc%#RTeim"), 2471 rc, &pErrInfo->Core); 2371 2472 } 2372 2473 else 2373 RTMsgError( "Failed to produce signature file: %Rrc", rc);2474 RTMsgError(Appliance::tr("Failed to produce signature file: %Rrc"), rc); 2374 2475 RTVfsFileRelease(hVfsFileSignature); 2375 2476 } 2376 2477 else 2377 RTMsgError( "RTVfsMemFileCreate failed: %Rrc", rc);2478 RTMsgError(Appliance::tr("RTVfsMemFileCreate failed: %Rrc"), rc); 2378 2479 } 2379 2480 else 2380 RTMsgError("Encountered a problem when validating the signature we just created: %Rrc%#RTeim\n" 2381 "Plase make sure the certificate and private key matches.", rc, &pErrInfo->Core); 2481 RTMsgError(Appliance::tr( 2482 "Encountered a problem when validating the signature we just created: %Rrc%#RTeim\n" 2483 "Plase make sure the certificate and private key matches."), 2484 rc, &pErrInfo->Core); 2382 2485 } 2383 2486 else 2384 RTMsgError( "2nd RTCrPkixPubKeySignDigest call failed: %Rrc%#RTeim", rc, pErrInfo->Core);2487 RTMsgError(Appliance::tr("2nd RTCrPkixPubKeySignDigest call failed: %Rrc%#RTeim"), rc, pErrInfo->Core); 2385 2488 RTMemFree(pvSignature); 2386 2489 } 2387 2490 else 2388 rc = RTMsgErrorRc(VERR_NO_MEMORY, "Out of memory!");2491 rc = RTMsgErrorRc(VERR_NO_MEMORY, Appliance::tr("Out of memory!")); 2389 2492 } 2390 2493 else 2391 RTMsgError( "RTCrPkixPubKeySignDigest failed: %Rrc%#RTeim", rc, pErrInfo->Core);2494 RTMsgError(Appliance::tr("RTCrPkixPubKeySignDigest failed: %Rrc%#RTeim"), rc, pErrInfo->Core); 2392 2495 } 2393 2496 else 2394 RTMsgError( "Failed to create digest %s: %Rrc", RTCrDigestTypeToName(enmDigestType), rc);2497 RTMsgError(Appliance::tr("Failed to create digest %s: %Rrc"), RTCrDigestTypeToName(enmDigestType), rc); 2395 2498 RTCrDigestRelease(hDigest); 2396 2499 return rc; … … 2456 2559 case 'p': 2457 2560 if (strPrivateKeyPassword.isNotEmpty()) 2458 RTMsgWarning( "Password is given more than once.");2561 RTMsgWarning(Appliance::tr("Password is given more than once.")); 2459 2562 strPrivateKeyPassword = ValueUnion.psz; 2460 2563 break; … … 2463 2566 { 2464 2567 if (strPrivateKeyPassword.isNotEmpty()) 2465 RTMsgWarning( "Password is given more than once.");2568 RTMsgWarning(Appliance::tr("Password is given more than once.")); 2466 2569 RTEXITCODE rcExit = readPasswordFile(ValueUnion.psz, &strPrivateKeyPassword); 2467 2570 if (rcExit == RTEXITCODE_SUCCESS) … … 2481 2584 enmDigestType = RTDIGESTTYPE_SHA512; 2482 2585 else 2483 return RTMsgErrorExitFailure( "Unknown digest type: %s", ValueUnion.psz);2586 return RTMsgErrorExitFailure(Appliance::tr("Unknown digest type: %s"), ValueUnion.psz); 2484 2587 break; 2485 2588 … … 2494 2597 case 'i': 2495 2598 if (cIntermediateCerts >= RT_ELEMENTS(apszIntermediateCerts)) 2496 return RTMsgErrorExitFailure( "Too many intermediate certificates: max %zu",2599 return RTMsgErrorExitFailure(Appliance::tr("Too many intermediate certificates: max %zu"), 2497 2600 RT_ELEMENTS(apszIntermediateCerts)); 2498 2601 apszIntermediateCerts[cIntermediateCerts++] = ValueUnion.psz; … … 2530 2633 /* Required paramaters: */ 2531 2634 if (!pszOva || !*pszOva) 2532 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "No OVA file was specified!");2635 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Appliance::tr("No OVA file was specified!")); 2533 2636 if (!pszCertificate || !*pszCertificate) 2534 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "No signing certificate (--certificate=<file>) was specified!");2637 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Appliance::tr("No signing certificate (--certificate=<file>) was specified!")); 2535 2638 if (!pszPrivateKey || !*pszPrivateKey) 2536 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "No signing private key (--private-key=<file>) was specified!");2639 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Appliance::tr("No signing private key (--private-key=<file>) was specified!")); 2537 2640 2538 2641 /* Check that input files exists before we commence: */ 2539 2642 if (!RTFileExists(pszOva)) 2540 return RTMsgErrorExitFailure( "The specified OVA file was not found: %s", pszOva);2643 return RTMsgErrorExitFailure(Appliance::tr("The specified OVA file was not found: %s"), pszOva); 2541 2644 if (!RTFileExists(pszCertificate)) 2542 return RTMsgErrorExitFailure( "The specified certificate file was not found: %s", pszCertificate);2645 return RTMsgErrorExitFailure(Appliance::tr("The specified certificate file was not found: %s"), pszCertificate); 2543 2646 if (!RTFileExists(pszPrivateKey)) 2544 return RTMsgErrorExitFailure( "The specified private key file was not found: %s", pszPrivateKey);2647 return RTMsgErrorExitFailure(Appliance::tr("The specified private key file was not found: %s"), pszPrivateKey); 2545 2648 2546 2649 /* … … 2563 2666 RTErrInfoInitStatic(&ErrInfo)); 2564 2667 if (RT_FAILURE(rc)) 2565 return RTMsgErrorExitFailure("Error reading certificate from '%s': %Rrc%#RTeim", pszCertificate, rc, &ErrInfo.Core); 2668 return RTMsgErrorExitFailure(Appliance::tr("Error reading certificate from '%s': %Rrc%#RTeim"), 2669 pszCertificate, rc, &ErrInfo.Core); 2566 2670 2567 2671 RTCRKEY hPrivateKey = NIL_RTCRKEY; … … 2571 2675 { 2572 2676 if (iVerbosity > 1) 2573 RTMsgInfo( "Successfully read the certificate and private key.");2677 RTMsgInfo(Appliance::tr("Successfully read the certificate and private key.")); 2574 2678 2575 2679 /* … … 2597 2701 hVfsFileSignature, hVfsOldSignature, iVerbosity); 2598 2702 if (RT_SUCCESS(rc) && iVerbosity > 0) 2599 RTMsgInfo( "Successfully signed '%s'.", pszOva);2703 RTMsgInfo(Appliance::tr("Successfully signed '%s'."), pszOva); 2600 2704 } 2601 2705 } … … 2603 2707 } 2604 2708 else 2605 RTPrintf( "Error reading the private key from %s: %Rrc%#RTeim", pszPrivateKey, rc, &ErrInfo.Core);2709 RTPrintf(Appliance::tr("Error reading the private key from %s: %Rrc%#RTeim"), pszPrivateKey, rc, &ErrInfo.Core); 2606 2710 RTCrX509Certificate_Delete(&Certificate); 2607 2711 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageBandwidthControl.cpp
r82968 r92372 40 40 using namespace com; 41 41 42 DECLARE_TRANSLATION_CONTEXT(BWControl); 42 43 43 44 // funcs … … 64 65 break; 65 66 case VWRN_NUMBER_TOO_BIG: 66 return "Limit is too big\n";67 return BWControl::tr("Limit is too big\n"); 67 68 case VWRN_TRAILING_CHARS: 68 69 switch (*pszNext) … … 74 75 case 'm': iMultiplier = 125000; break; 75 76 case 'k': iMultiplier = 125; break; 76 default: return "Invalid unit suffix. Valid suffixes are: k, m, g, K, M, G\n";77 default: return BWControl::tr("Invalid unit suffix. Valid suffixes are: k, m, g, K, M, G\n"); 77 78 } 78 79 break; 79 80 case VWRN_TRAILING_SPACES: 80 return "Trailing spaces in limit!\n";81 return BWControl::tr("Trailing spaces in limit!\n"); 81 82 case VERR_NO_DIGITS: 82 return "No digits in limit specifier\n";83 return BWControl::tr("No digits in limit specifier\n"); 83 84 default: 84 return "Invalid limit specifier\n";85 return BWControl::tr("Invalid limit specifier\n"); 85 86 } 86 87 if (*pLimit < 0) 87 return "Limit cannot be negative\n";88 return BWControl::tr("Limit cannot be negative\n"); 88 89 if (*pLimit > INT64_MAX / iMultiplier) 89 return "Limit is too big\n";90 return BWControl::tr("Limit is too big\n"); 90 91 *pLimit *= iMultiplier; 91 92 … … 112 113 if (name.isEmpty()) 113 114 { 114 errorArgument( "Bandwidth group name must not be empty!\n");115 errorArgument(BWControl::tr("Bandwidth group name must not be empty!\n")); 115 116 return RTEXITCODE_FAILURE; 116 117 } … … 172 173 else 173 174 { 174 errorArgument( "Invalid bandwidth group type\n");175 errorArgument(BWControl::tr("Invalid bandwidth group type\n")); 175 176 return RTEXITCODE_FAILURE; 176 177 } … … 312 313 313 314 if (a->argc < 2) 314 return errorSyntax(USAGE_BANDWIDTHCONTROL, "Too few parameters");315 return errorSyntax(USAGE_BANDWIDTHCONTROL, BWControl::tr("Too few parameters")); 315 316 else if (a->argc > 7) 316 return errorSyntax(USAGE_BANDWIDTHCONTROL, "Too many parameters");317 return errorSyntax(USAGE_BANDWIDTHCONTROL, BWControl::tr("Too many parameters")); 317 318 318 319 /* try to find the given machine */ … … 335 336 if (fRunTime) 336 337 { 337 errorArgument( "Bandwidth groups cannot be created while the VM is running\n");338 errorArgument(BWControl::tr("Bandwidth groups cannot be created while the VM is running\n")); 338 339 goto leave; 339 340 } … … 344 345 if (fRunTime) 345 346 { 346 errorArgument( "Bandwidth groups cannot be deleted while the VM is running\n");347 errorArgument(BWControl::tr("Bandwidth groups cannot be deleted while the VM is running\n")); 347 348 goto leave; 348 349 } … … 355 356 else 356 357 { 357 errorSyntax(USAGE_BANDWIDTHCONTROL, "Invalid parameter '%s'", Utf8Str(a->argv[1]).c_str());358 errorSyntax(USAGE_BANDWIDTHCONTROL, BWControl::tr("Invalid parameter '%s'"), Utf8Str(a->argv[1]).c_str()); 358 359 rc = E_FAIL; 359 360 } … … 371 372 372 373 #endif /* !VBOX_ONLY_DOCS */ 373 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r91157 r92372 42 42 using namespace com;//at least for Bstr 43 43 44 DECLARE_TRANSLATION_CONTEXT(Cloud); 45 44 46 45 47 /** … … 70 72 if (bstrProvider.isEmpty()) 71 73 { 72 errorSyntax(USAGE_S_NEWCMD, "Parameter --provider is required");74 errorSyntax(USAGE_S_NEWCMD, Cloud::tr("Parameter --provider is required")); 73 75 return E_FAIL; 74 76 } 75 77 if (bstrProfile.isEmpty()) 76 78 { 77 errorSyntax(USAGE_S_NEWCMD, "Parameter --profile is required");79 errorSyntax(USAGE_S_NEWCMD, Cloud::tr("Parameter --profile is required")); 78 80 return E_FAIL; 79 81 } … … 160 162 machineStates.push_back(CloudMachineState_Terminating); 161 163 else 162 return errorArgument( "Unknown cloud instance state \"%s\"", pszState);164 return errorArgument(Cloud::tr("Unknown cloud instance state \"%s\""), pszState); 163 165 break; 164 166 } … … 207 209 else 208 210 { 209 RTPrintf("Parameter \'compartment\' is empty or absent.\n" 210 "Trying to get the compartment from the passed cloud profile \'%s\'\n", pCommonOpts->profile.pszProfileName); 211 RTPrintf(Cloud::tr("Parameter \'compartment\' is empty or absent.\n" 212 "Trying to get the compartment from the passed cloud profile \'%s\'\n"), 213 pCommonOpts->profile.pszProfileName); 211 214 Bstr bStrCompartmentId; 212 215 CHECK_ERROR2_RET(hrc, pCloudProfile, … … 215 218 strCompartmentId = bStrCompartmentId; 216 219 if (strCompartmentId.isNotEmpty()) 217 RTPrintf( "Found the compartment \'%s\':\n", strCompartmentId.c_str());220 RTPrintf(Cloud::tr("Found the compartment \'%s\':\n"), strCompartmentId.c_str()); 218 221 else 219 return errorSyntax(USAGE_S_NEWCMD, "Parameter --compartment-id is required");222 return errorSyntax(USAGE_S_NEWCMD, Cloud::tr("Parameter --compartment-id is required")); 220 223 } 221 224 … … 234 237 ComPtr<IProgress> pProgress; 235 238 236 RTPrintf( "Reply is in the form \'instance name\' = \'instance id\'\n");239 RTPrintf(Cloud::tr("Reply is in the form \'instance name\' = \'instance id\'\n")); 237 240 238 241 CHECK_ERROR2_RET(hrc, oCloudClient, … … 243 246 RTEXITCODE_FAILURE); 244 247 showProgress(pProgress); 245 CHECK_PROGRESS_ERROR_RET(pProgress, ( "Failed to list instances"), RTEXITCODE_FAILURE);248 CHECK_PROGRESS_ERROR_RET(pProgress, (Cloud::tr("Failed to list instances")), RTEXITCODE_FAILURE); 246 249 247 250 CHECK_ERROR2_RET(hrc, … … 252 255 RTEXITCODE_FAILURE); 253 256 254 RTPrintf( "The list of the instances for the cloud profile \'%ls\' \nand compartment \'%s\':\n",257 RTPrintf(Cloud::tr("The list of the instances for the cloud profile \'%ls\' \nand compartment \'%s\':\n"), 255 258 bstrProfileName.raw(), strCompartmentId.c_str()); 256 259 size_t cIds = arrayVMIds.size(); … … 320 323 imageStates.push_back(CloudImageState_Provisioning); 321 324 else 322 return errorArgument( "Unknown cloud image state \"%s\"", pszState);325 return errorArgument(Cloud::tr("Unknown cloud image state \"%s\""), pszState); 323 326 break; 324 327 } … … 368 371 else 369 372 { 370 RTPrintf("Parameter \'compartment\' is empty or absent.\n" 371 "Trying to get the compartment from the passed cloud profile \'%s\'\n", pCommonOpts->profile.pszProfileName); 373 RTPrintf(Cloud::tr("Parameter \'compartment\' is empty or absent.\n" 374 "Trying to get the compartment from the passed cloud profile \'%s\'\n"), 375 pCommonOpts->profile.pszProfileName); 372 376 Bstr bStrCompartmentId; 373 377 CHECK_ERROR2_RET(hrc, pCloudProfile, … … 376 380 strCompartmentId = bStrCompartmentId; 377 381 if (strCompartmentId.isNotEmpty()) 378 RTPrintf( "Found the compartment \'%s\':\n", strCompartmentId.c_str());382 RTPrintf(Cloud::tr("Found the compartment \'%s\':\n"), strCompartmentId.c_str()); 379 383 else 380 return errorSyntax(USAGE_S_NEWCMD, "Parameter --compartment-id is required");384 return errorSyntax(USAGE_S_NEWCMD, Cloud::tr("Parameter --compartment-id is required")); 381 385 } 382 386 … … 395 399 ComPtr<IProgress> pProgress; 396 400 397 RTPrintf( "Reply is in the form \'image name\' = \'image id\'\n");401 RTPrintf(Cloud::tr("Reply is in the form \'image name\' = \'image id\'\n")); 398 402 CHECK_ERROR2_RET(hrc, oCloudClient, 399 403 ListImages(ComSafeArrayAsInParam(imageStates), … … 403 407 RTEXITCODE_FAILURE); 404 408 showProgress(pProgress); 405 CHECK_PROGRESS_ERROR_RET(pProgress, ( "Failed to list images"), RTEXITCODE_FAILURE);409 CHECK_PROGRESS_ERROR_RET(pProgress, (Cloud::tr("Failed to list images")), RTEXITCODE_FAILURE); 406 410 407 411 CHECK_ERROR2_RET(hrc, … … 412 416 RTEXITCODE_FAILURE); 413 417 414 RTPrintf( "The list of the images for the cloud profile \'%ls\' \nand compartment \'%s\':\n",418 RTPrintf(Cloud::tr("The list of the images for the cloud profile \'%ls\' \nand compartment \'%s\':\n"), 415 419 bstrProfileName.raw(), strCompartmentId.c_str()); 416 420 size_t cNames = arrayVMNames.size(); … … 469 473 if (a->argc == iFirst) 470 474 { 471 RTPrintf( "Empty command parameter list, show help.\n");475 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 472 476 printHelp(g_pStdOut); 473 477 return RTEXITCODE_SUCCESS; … … 540 544 if (a->argc == iFirst) 541 545 { 542 RTPrintf( "Empty command parameter list, show help.\n");546 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 543 547 printHelp(g_pStdOut); 544 548 return RTEXITCODE_SUCCESS; … … 639 643 640 644 if (strPublicSSHKey.isEmpty()) 641 RTPrintf( "Warning!!! Public SSH key doesn't present in the passed arguments...\n");645 RTPrintf(Cloud::tr("Warning!!! Public SSH key doesn't present in the passed arguments...\n")); 642 646 643 647 if (strImageId.isNotEmpty() && strBootVolumeId.isNotEmpty()) 644 return errorArgument( "Parameters --image-id and --boot-volume-id are mutually exclusive. "645 "Only one of them must be presented.");648 return errorArgument(Cloud::tr("Parameters --image-id and --boot-volume-id are mutually exclusive. " 649 "Only one of them must be presented.")); 646 650 647 651 if (strImageId.isEmpty() && strBootVolumeId.isEmpty()) 648 return errorArgument( "Missing parameter --image-id or --boot-volume-id. One of them must be presented.");652 return errorArgument(Cloud::tr("Missing parameter --image-id or --boot-volume-id. One of them must be presented.")); 649 653 650 654 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 668 672 * or in the inappropriate state. So the check can be omitted. 669 673 */ 670 RTPrintf( "Checking the cloud image with id \'%s\'...\n", strImageId.c_str());674 RTPrintf(Cloud::tr("Checking the cloud image with id \'%s\'...\n"), strImageId.c_str()); 671 675 CHECK_ERROR2_RET(hrc, oCloudClient, 672 676 GetImageInfo(Bstr(strImageId).raw(), … … 676 680 677 681 hrc = showProgress(pProgress); 678 CHECK_PROGRESS_ERROR_RET(pProgress, ( "Checking the cloud image failed"), RTEXITCODE_FAILURE);682 CHECK_PROGRESS_ERROR_RET(pProgress, (Cloud::tr("Checking the cloud image failed")), RTEXITCODE_FAILURE); 679 683 680 684 pProgress.setNull(); … … 682 686 683 687 if (strImageId.isNotEmpty()) 684 RTPrintf( "Creating cloud instance with name \'%s\' from the image \'%s\'...\n",688 RTPrintf(Cloud::tr("Creating cloud instance with name \'%s\' from the image \'%s\'...\n"), 685 689 strDisplayName.c_str(), strImageId.c_str()); 686 690 else 687 RTPrintf( "Creating cloud instance with name \'%s\' from the boot volume \'%s\'...\n",691 RTPrintf(Cloud::tr("Creating cloud instance with name \'%s\' from the boot volume \'%s\'...\n"), 688 692 strDisplayName.c_str(), strBootVolumeId.c_str()); 689 693 … … 691 695 692 696 hrc = showProgress(pProgress); 693 CHECK_PROGRESS_ERROR_RET(pProgress, ( "Creating cloud instance failed"), RTEXITCODE_FAILURE);697 CHECK_PROGRESS_ERROR_RET(pProgress, (Cloud::tr("Creating cloud instance failed")), RTEXITCODE_FAILURE); 694 698 695 699 if (SUCCEEDED(hrc)) 696 RTPrintf( "Cloud instance was created successfully\n");700 RTPrintf(Cloud::tr("Cloud instance was created successfully\n")); 697 701 698 702 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 723 727 if (a->argc == iFirst) 724 728 { 725 RTPrintf( "Empty command parameter list, show help.\n");729 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 726 730 printHelp(g_pStdOut); 727 731 return RTEXITCODE_SUCCESS; … … 738 742 { 739 743 if (strInstanceId.isNotEmpty()) 740 return errorArgument( "Duplicate parameter: --id");744 return errorArgument(Cloud::tr("Duplicate parameter: --id")); 741 745 742 746 strInstanceId = ValueUnion.psz; 743 747 if (strInstanceId.isEmpty()) 744 return errorArgument( "Empty parameter: --id");748 return errorArgument(Cloud::tr("Empty parameter: --id")); 745 749 746 750 break; … … 764 768 765 769 if (strInstanceId.isEmpty()) 766 return errorArgument( "Missing parameter: --id");770 return errorArgument(Cloud::tr("Missing parameter: --id")); 767 771 768 772 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 772 776 CreateCloudClient(oCloudClient.asOutParam()), 773 777 RTEXITCODE_FAILURE); 774 RTPrintf( "Getting information about cloud instance with id %s...\n", strInstanceId.c_str());775 RTPrintf( "Reply is in the form \'setting name\' = \'value\'\n");778 RTPrintf(Cloud::tr("Getting information about cloud instance with id %s...\n"), strInstanceId.c_str()); 779 RTPrintf(Cloud::tr("Reply is in the form \'setting name\' = \'value\'\n")); 776 780 777 781 ComPtr<IAppliance> pAppliance; … … 794 798 795 799 hrc = showProgress(progress); 796 CHECK_PROGRESS_ERROR_RET(progress, ( "Getting information about cloud instance failed"), RTEXITCODE_FAILURE);797 798 RTPrintf( "Cloud instance info (provider '%s'):\n",800 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Getting information about cloud instance failed")), RTEXITCODE_FAILURE); 801 802 RTPrintf(Cloud::tr("Cloud instance info (provider '%s'):\n"), 799 803 pCommonOpts->provider.pszProviderName); 800 804 … … 807 811 const size_t vsdHReadableArraySize = 13;//the number of items in the vsdHReadableArray 808 812 vsdHReadable vsdHReadableArray[vsdHReadableArraySize] = { 809 {VirtualSystemDescriptionType_CloudDomain, "Availability domain = %ls\n", "Availability domain wasn't found\n"},810 {VirtualSystemDescriptionType_Name, "Instance displayed name = %ls\n", "Instance displayed name wasn't found\n"},811 {VirtualSystemDescriptionType_CloudInstanceState, "Instance state = %ls\n", "Instance state wasn't found\n"},812 {VirtualSystemDescriptionType_CloudInstanceId, "Instance Id = %ls\n", "Instance Id wasn't found\n"},813 {VirtualSystemDescriptionType_CloudInstanceDisplayName, "Instance name = %ls\n", "Instance name wasn't found\n"},814 {VirtualSystemDescriptionType_CloudImageId, "Bootable image Id = %ls\n",815 "Image Id whom the instance is booted up wasn't found\n"},816 {VirtualSystemDescriptionType_CloudInstanceShape, "Shape of the instance = %ls\n",817 "The shape of the instance wasn't found\n"},818 {VirtualSystemDescriptionType_OS, "Type of guest OS = %ls\n", "Type of guest OS wasn't found\n"},819 {VirtualSystemDescriptionType_Memory, "RAM = %ls MB\n", "Value for RAM wasn't found\n"},820 {VirtualSystemDescriptionType_CPU, "CPUs = %ls\n", "Numbers of CPUs weren't found\n"},821 {VirtualSystemDescriptionType_CloudPublicIP, "Instance public IP = %ls\n", "Public IP wasn't found\n"},822 {VirtualSystemDescriptionType_Miscellaneous, "%ls\n", "Free-form tags or metadata weren't found\n"},823 {VirtualSystemDescriptionType_CloudInitScriptPath, "%ls\n", "Cloud-init script wasn't found\n"}813 {VirtualSystemDescriptionType_CloudDomain, Cloud::tr("Availability domain = %ls\n"), Cloud::tr("Availability domain wasn't found\n")}, 814 {VirtualSystemDescriptionType_Name, Cloud::tr("Instance displayed name = %ls\n"), Cloud::tr("Instance displayed name wasn't found\n")}, 815 {VirtualSystemDescriptionType_CloudInstanceState, Cloud::tr("Instance state = %ls\n"), Cloud::tr("Instance state wasn't found\n")}, 816 {VirtualSystemDescriptionType_CloudInstanceId, Cloud::tr("Instance Id = %ls\n"), Cloud::tr("Instance Id wasn't found\n")}, 817 {VirtualSystemDescriptionType_CloudInstanceDisplayName, Cloud::tr("Instance name = %ls\n"), Cloud::tr("Instance name wasn't found\n")}, 818 {VirtualSystemDescriptionType_CloudImageId, Cloud::tr("Bootable image Id = %ls\n"), 819 Cloud::tr("Image Id whom the instance is booted up wasn't found\n")}, 820 {VirtualSystemDescriptionType_CloudInstanceShape, Cloud::tr("Shape of the instance = %ls\n"), 821 Cloud::tr("The shape of the instance wasn't found\n")}, 822 {VirtualSystemDescriptionType_OS, Cloud::tr("Type of guest OS = %ls\n"), Cloud::tr("Type of guest OS wasn't found\n")}, 823 {VirtualSystemDescriptionType_Memory, Cloud::tr("RAM = %ls MB\n"), Cloud::tr("Value for RAM wasn't found\n")}, 824 {VirtualSystemDescriptionType_CPU, Cloud::tr("CPUs = %ls\n"), Cloud::tr("Numbers of CPUs weren't found\n")}, 825 {VirtualSystemDescriptionType_CloudPublicIP, Cloud::tr("Instance public IP = %ls\n"), Cloud::tr("Public IP wasn't found\n")}, 826 {VirtualSystemDescriptionType_Miscellaneous, "%ls\n", Cloud::tr("Free-form tags or metadata weren't found\n")}, 827 {VirtualSystemDescriptionType_CloudInitScriptPath, "%ls\n", Cloud::tr("Cloud-init script wasn't found\n")} 824 828 }; 825 829 … … 875 879 if (a->argc == iFirst) 876 880 { 877 RTPrintf( "Empty command parameter list, show help.\n");881 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 878 882 printHelp(g_pStdOut); 879 883 return RTEXITCODE_SUCCESS; … … 890 894 { 891 895 if (strInstanceId.isNotEmpty()) 892 return errorArgument( "Duplicate parameter: --id");896 return errorArgument(Cloud::tr("Duplicate parameter: --id")); 893 897 894 898 strInstanceId = ValueUnion.psz; 895 899 if (strInstanceId.isEmpty()) 896 return errorArgument( "Empty parameter: --id");900 return errorArgument(Cloud::tr("Empty parameter: --id")); 897 901 898 902 break; … … 916 920 917 921 if (strInstanceId.isEmpty()) 918 return errorArgument( "Missing parameter: --id");922 return errorArgument(Cloud::tr("Missing parameter: --id")); 919 923 920 924 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 924 928 CreateCloudClient(oCloudClient.asOutParam()), 925 929 RTEXITCODE_FAILURE); 926 RTPrintf( "Starting cloud instance with id %s...\n", strInstanceId.c_str());930 RTPrintf(Cloud::tr("Starting cloud instance with id %s...\n"), strInstanceId.c_str()); 927 931 928 932 ComPtr<IProgress> progress; … … 931 935 RTEXITCODE_FAILURE); 932 936 hrc = showProgress(progress); 933 CHECK_PROGRESS_ERROR_RET(progress, ( "Starting the cloud instance failed"), RTEXITCODE_FAILURE);937 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Starting the cloud instance failed")), RTEXITCODE_FAILURE); 934 938 935 939 if (SUCCEEDED(hrc)) 936 RTPrintf( "Cloud instance with id %s (provider = '%s', profile = '%s') was started\n",940 RTPrintf(Cloud::tr("Cloud instance with id %s (provider = '%s', profile = '%s') was started\n"), 937 941 strInstanceId.c_str(), 938 942 pCommonOpts->provider.pszProviderName, … … 958 962 if (a->argc == iFirst) 959 963 { 960 RTPrintf( "Empty command parameter list, show help.\n");964 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 961 965 printHelp(g_pStdOut); 962 966 return RTEXITCODE_SUCCESS; … … 973 977 { 974 978 if (strInstanceId.isNotEmpty()) 975 return errorArgument( "Duplicate parameter: --id");979 return errorArgument(Cloud::tr("Duplicate parameter: --id")); 976 980 977 981 strInstanceId = ValueUnion.psz; 978 982 if (strInstanceId.isEmpty()) 979 return errorArgument( "Empty parameter: --id");983 return errorArgument(Cloud::tr("Empty parameter: --id")); 980 984 981 985 break; … … 999 1003 1000 1004 if (strInstanceId.isEmpty()) 1001 return errorArgument( "Missing parameter: --id");1005 return errorArgument(Cloud::tr("Missing parameter: --id")); 1002 1006 1003 1007 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 1007 1011 CreateCloudClient(oCloudClient.asOutParam()), 1008 1012 RTEXITCODE_FAILURE); 1009 RTPrintf( "Pausing cloud instance with id %s...\n", strInstanceId.c_str());1013 RTPrintf(Cloud::tr("Pausing cloud instance with id %s...\n"), strInstanceId.c_str()); 1010 1014 1011 1015 ComPtr<IProgress> progress; … … 1014 1018 RTEXITCODE_FAILURE); 1015 1019 hrc = showProgress(progress); 1016 CHECK_PROGRESS_ERROR_RET(progress, ( "Pause the cloud instance failed"), RTEXITCODE_FAILURE);1020 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Pause the cloud instance failed")), RTEXITCODE_FAILURE); 1017 1021 1018 1022 if (SUCCEEDED(hrc)) 1019 RTPrintf( "Cloud instance with id %s (provider = '%s', profile = '%s') was paused\n",1023 RTPrintf(Cloud::tr("Cloud instance with id %s (provider = '%s', profile = '%s') was paused\n"), 1020 1024 strInstanceId.c_str(), 1021 1025 pCommonOpts->provider.pszProviderName, … … 1041 1045 if (a->argc == iFirst) 1042 1046 { 1043 RTPrintf( "Empty command parameter list, show help.\n");1047 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1044 1048 printHelp(g_pStdOut); 1045 1049 return RTEXITCODE_SUCCESS; … … 1056 1060 { 1057 1061 if (strInstanceId.isNotEmpty()) 1058 return errorArgument( "Duplicate parameter: --id");1062 return errorArgument(Cloud::tr("Duplicate parameter: --id")); 1059 1063 1060 1064 strInstanceId = ValueUnion.psz; 1061 1065 if (strInstanceId.isEmpty()) 1062 return errorArgument( "Empty parameter: --id");1066 return errorArgument(Cloud::tr("Empty parameter: --id")); 1063 1067 1064 1068 break; … … 1082 1086 1083 1087 if (strInstanceId.isEmpty()) 1084 return errorArgument( "Missing parameter: --id");1088 return errorArgument(Cloud::tr("Missing parameter: --id")); 1085 1089 1086 1090 … … 1091 1095 CreateCloudClient(oCloudClient.asOutParam()), 1092 1096 RTEXITCODE_FAILURE); 1093 RTPrintf( "Terminating cloud instance with id %s...\n", strInstanceId.c_str());1097 RTPrintf(Cloud::tr("Terminating cloud instance with id %s...\n"), strInstanceId.c_str()); 1094 1098 1095 1099 ComPtr<IProgress> progress; … … 1098 1102 RTEXITCODE_FAILURE); 1099 1103 hrc = showProgress(progress); 1100 CHECK_PROGRESS_ERROR_RET(progress, ( "Termination the cloud instance failed"), RTEXITCODE_FAILURE);1104 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Termination the cloud instance failed")), RTEXITCODE_FAILURE); 1101 1105 1102 1106 if (SUCCEEDED(hrc)) 1103 RTPrintf( "Cloud instance with id %s (provider = '%s', profile = '%s') was terminated\n",1107 RTPrintf(Cloud::tr("Cloud instance with id %s (provider = '%s', profile = '%s') was terminated\n"), 1104 1108 strInstanceId.c_str(), 1105 1109 pCommonOpts->provider.pszProviderName, … … 1139 1143 if (a->argc == iFirst) 1140 1144 { 1141 RTPrintf( "Empty command parameter list, show help.\n");1145 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1142 1146 printHelp(g_pStdOut); 1143 1147 return RTEXITCODE_SUCCESS; … … 1216 1220 if (a->argc == iFirst) 1217 1221 { 1218 RTPrintf( "Empty command parameter list, show help.\n");1222 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1219 1223 printHelp(g_pStdOut); 1220 1224 return RTEXITCODE_SUCCESS; … … 1274 1278 1275 1279 if (strInstanceId.isNotEmpty() && strObjectName.isNotEmpty()) 1276 return errorArgument( "Conflicting parameters: --instance-id and --object-name can't be used together. Choose one.");1280 return errorArgument(Cloud::tr("Conflicting parameters: --instance-id and --object-name can't be used together. Choose one.")); 1277 1281 1278 1282 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 1283 1287 RTEXITCODE_FAILURE); 1284 1288 if (strInstanceId.isNotEmpty()) 1285 RTPrintf( "Creating cloud image with name \'%s\' from the instance \'%s\'...\n",1289 RTPrintf(Cloud::tr("Creating cloud image with name \'%s\' from the instance \'%s\'...\n"), 1286 1290 strDisplayName.c_str(), strInstanceId.c_str()); 1287 1291 else 1288 RTPrintf( "Creating cloud image with name \'%s\' from the object \'%s\' in the bucket \'%s\'...\n",1292 RTPrintf(Cloud::tr("Creating cloud image with name \'%s\' from the object \'%s\' in the bucket \'%s\'...\n"), 1289 1293 strDisplayName.c_str(), strObjectName.c_str(), strBucketName.c_str()); 1290 1294 … … 1294 1298 RTEXITCODE_FAILURE); 1295 1299 hrc = showProgress(progress); 1296 CHECK_PROGRESS_ERROR_RET(progress, ( "Creating cloud image failed"), RTEXITCODE_FAILURE);1300 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Creating cloud image failed")), RTEXITCODE_FAILURE); 1297 1301 1298 1302 if (SUCCEEDED(hrc)) 1299 RTPrintf( "Cloud image was created successfully\n");1303 RTPrintf(Cloud::tr("Cloud image was created successfully\n")); 1300 1304 1301 1305 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 1323 1327 if (a->argc == iFirst) 1324 1328 { 1325 RTPrintf( "Empty command parameter list, show help.\n");1329 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1326 1330 printHelp(g_pStdOut); 1327 1331 return RTEXITCODE_SUCCESS; … … 1343 1347 { 1344 1348 if (strBucketName.isNotEmpty()) 1345 return errorArgument( "Duplicate parameter: --bucket-name");1349 return errorArgument(Cloud::tr("Duplicate parameter: --bucket-name")); 1346 1350 1347 1351 strBucketName = ValueUnion.psz; 1348 1352 if (strBucketName.isEmpty()) 1349 return errorArgument( "Empty parameter: --bucket-name");1353 return errorArgument(Cloud::tr("Empty parameter: --bucket-name")); 1350 1354 1351 1355 break; … … 1355 1359 { 1356 1360 if (strObjectName.isNotEmpty()) 1357 return errorArgument( "Duplicate parameter: --object-name");1361 return errorArgument(Cloud::tr("Duplicate parameter: --object-name")); 1358 1362 1359 1363 strObjectName = ValueUnion.psz; 1360 1364 if (strObjectName.isEmpty()) 1361 return errorArgument( "Empty parameter: --object-name");1365 return errorArgument(Cloud::tr("Empty parameter: --object-name")); 1362 1366 1363 1367 break; … … 1367 1371 { 1368 1372 if (strImageId.isNotEmpty()) 1369 return errorArgument( "Duplicate parameter: --id");1373 return errorArgument(Cloud::tr("Duplicate parameter: --id")); 1370 1374 1371 1375 strImageId = ValueUnion.psz; 1372 1376 if (strImageId.isEmpty()) 1373 return errorArgument( "Empty parameter: --id");1377 return errorArgument(Cloud::tr("Empty parameter: --id")); 1374 1378 1375 1379 break; … … 1379 1383 { 1380 1384 if (strDisplayName.isNotEmpty()) 1381 return errorArgument( "Duplicate parameter: --display-name");1385 return errorArgument(Cloud::tr("Duplicate parameter: --display-name")); 1382 1386 1383 1387 strDisplayName = ValueUnion.psz; 1384 1388 if (strDisplayName.isEmpty()) 1385 return errorArgument( "Empty parameter: --display-name");1389 return errorArgument(Cloud::tr("Empty parameter: --display-name")); 1386 1390 1387 1391 break; … … 1391 1395 { 1392 1396 if (strLaunchMode.isNotEmpty()) 1393 return errorArgument( "Duplicate parameter: --launch-mode");1397 return errorArgument(Cloud::tr("Duplicate parameter: --launch-mode")); 1394 1398 1395 1399 strLaunchMode = ValueUnion.psz; 1396 1400 if (strLaunchMode.isEmpty()) 1397 return errorArgument( "Empty parameter: --launch-mode");1401 return errorArgument(Cloud::tr("Empty parameter: --launch-mode")); 1398 1402 1399 1403 break; … … 1421 1425 BstrFmt("image-id=%s", strImageId.c_str()).detachTo(parameters.appendedRaw()); 1422 1426 else 1423 return errorArgument( "Missing parameter: --id");1427 return errorArgument(Cloud::tr("Missing parameter: --id")); 1424 1428 1425 1429 if (strBucketName.isNotEmpty()) 1426 1430 BstrFmt("bucket-name=%s", strBucketName.c_str()).detachTo(parameters.appendedRaw()); 1427 1431 else 1428 return errorArgument( "Missing parameter: --bucket-name");1432 return errorArgument(Cloud::tr("Missing parameter: --bucket-name")); 1429 1433 1430 1434 if (strObjectName.isNotEmpty()) … … 1446 1450 1447 1451 if (strObjectName.isNotEmpty()) 1448 RTPrintf( "Exporting image \'%s\' to the Cloud with name \'%s\'...\n",1452 RTPrintf(Cloud::tr("Exporting image \'%s\' to the Cloud with name \'%s\'...\n"), 1449 1453 strImageId.c_str(), strObjectName.c_str()); 1450 1454 else 1451 RTPrintf( "Exporting image \'%s\' to the Cloud with default name\n",1455 RTPrintf(Cloud::tr("Exporting image \'%s\' to the Cloud with default name\n"), 1452 1456 strImageId.c_str()); 1453 1457 … … 1477 1481 { 1478 1482 fFound = true; 1479 RTPrintf( "Image %s was found\n", strImageId.c_str());1483 RTPrintf(Cloud::tr("Image %s was found\n"), strImageId.c_str()); 1480 1484 break; 1481 1485 } … … 1484 1488 if (!fFound) 1485 1489 { 1486 RTPrintf( "Process of exporting the image to the Cloud was interrupted. The image wasn't found.\n");1490 RTPrintf(Cloud::tr("Process of exporting the image to the Cloud was interrupted. The image wasn't found.\n")); 1487 1491 return RTEXITCODE_FAILURE; 1488 1492 } … … 1493 1497 RTEXITCODE_FAILURE); 1494 1498 hrc = showProgress(progress); 1495 CHECK_PROGRESS_ERROR_RET(progress, ( "Export the image to the Cloud failed"), RTEXITCODE_FAILURE);1499 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Export the image to the Cloud failed")), RTEXITCODE_FAILURE); 1496 1500 1497 1501 if (SUCCEEDED(hrc)) 1498 RTPrintf( "Export the image to the Cloud was successfull\n");1502 RTPrintf(Cloud::tr("Export the image to the Cloud was successfull\n")); 1499 1503 1500 1504 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 1519 1523 if (a->argc == iFirst) 1520 1524 { 1521 RTPrintf( "Empty command parameter list, show help.\n");1525 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1522 1526 printHelp(g_pStdOut); 1523 1527 return RTEXITCODE_SUCCESS; … … 1570 1574 CreateCloudClient(oCloudClient.asOutParam()), 1571 1575 RTEXITCODE_FAILURE); 1572 RTPrintf( "Creating an object \'%s\' from the cloud image \'%s\'...\n", strObjectName.c_str(), strImageId.c_str());1576 RTPrintf(Cloud::tr("Creating an object \'%s\' from the cloud image \'%s\'...\n"), strObjectName.c_str(), strImageId.c_str()); 1573 1577 1574 1578 ComPtr<IProgress> progress; … … 1577 1581 RTEXITCODE_FAILURE); 1578 1582 hrc = showProgress(progress); 1579 CHECK_PROGRESS_ERROR_RET(progress, ( "Cloud image import failed"), RTEXITCODE_FAILURE);1583 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Cloud image import failed")), RTEXITCODE_FAILURE); 1580 1584 1581 1585 if (SUCCEEDED(hrc)) 1582 1586 { 1583 RTPrintf( "Cloud image was imported successfully. Find the downloaded object with the name %s "1584 "in the system temp folder (find the possible environment variables like TEMP, TMP and etc.)\n",1587 RTPrintf(Cloud::tr("Cloud image was imported successfully. Find the downloaded object with the name %s " 1588 "in the system temp folder (find the possible environment variables like TEMP, TMP and etc.)\n"), 1585 1589 strObjectName.c_str()); 1586 1590 } … … 1605 1609 if (a->argc == iFirst) 1606 1610 { 1607 RTPrintf( "Empty command parameter list, show help.\n");1611 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1608 1612 printHelp(g_pStdOut); 1609 1613 return RTEXITCODE_SUCCESS; … … 1642 1646 CreateCloudClient(oCloudClient.asOutParam()), 1643 1647 RTEXITCODE_FAILURE); 1644 RTPrintf( "Getting information about the cloud image with id \'%s\'...\n", strImageId.c_str());1648 RTPrintf(Cloud::tr("Getting information about the cloud image with id \'%s\'...\n"), strImageId.c_str()); 1645 1649 1646 1650 ComPtr<IStringArray> infoArray; … … 1648 1652 ComPtr<IProgress> pProgress; 1649 1653 1650 RTPrintf( "Reply is in the form \'image property\' = \'value\'\n");1654 RTPrintf(Cloud::tr("Reply is in the form \'image property\' = \'value\'\n")); 1651 1655 CHECK_ERROR2_RET(hrc, oCloudClient, 1652 1656 GetImageInfo(Bstr(strImageId).raw(), … … 1656 1660 1657 1661 hrc = showProgress(pProgress); 1658 CHECK_PROGRESS_ERROR_RET(pProgress, ( "Getting information about the cloud image failed"), RTEXITCODE_FAILURE);1662 CHECK_PROGRESS_ERROR_RET(pProgress, (Cloud::tr("Getting information about the cloud image failed")), RTEXITCODE_FAILURE); 1659 1663 1660 1664 CHECK_ERROR2_RET(hrc, … … 1662 1666 RTEXITCODE_FAILURE); 1663 1667 1664 RTPrintf( "General information about the image:\n");1668 RTPrintf(Cloud::tr("General information about the image:\n")); 1665 1669 size_t cParamNames = pStrInfoArray.size(); 1666 1670 for (size_t k = 0; k < cParamNames; k++) … … 1697 1701 if (a->argc == iFirst) 1698 1702 { 1699 RTPrintf( "Empty command parameter list, show help.\n");1703 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1700 1704 printHelp(g_pStdOut); 1701 1705 return RTEXITCODE_SUCCESS; … … 1712 1716 { 1713 1717 if (strImageId.isNotEmpty()) 1714 return errorArgument( "Duplicate parameter: --id");1718 return errorArgument(Cloud::tr("Duplicate parameter: --id")); 1715 1719 1716 1720 strImageId = ValueUnion.psz; 1717 1721 if (strImageId.isEmpty()) 1718 return errorArgument( "Empty parameter: --id");1722 return errorArgument(Cloud::tr("Empty parameter: --id")); 1719 1723 1720 1724 break; … … 1739 1743 1740 1744 if (strImageId.isEmpty()) 1741 return errorArgument( "Missing parameter: --id");1745 return errorArgument(Cloud::tr("Missing parameter: --id")); 1742 1746 1743 1747 … … 1748 1752 CreateCloudClient(oCloudClient.asOutParam()), 1749 1753 RTEXITCODE_FAILURE); 1750 RTPrintf( "Deleting cloud image with id %s...\n", strImageId.c_str());1754 RTPrintf(Cloud::tr("Deleting cloud image with id %s...\n"), strImageId.c_str()); 1751 1755 1752 1756 ComPtr<IProgress> progress; … … 1755 1759 RTEXITCODE_FAILURE); 1756 1760 hrc = showProgress(progress); 1757 CHECK_PROGRESS_ERROR_RET(progress, ( "Deleting cloud image failed"), RTEXITCODE_FAILURE);1761 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Deleting cloud image failed")), RTEXITCODE_FAILURE); 1758 1762 1759 1763 if (SUCCEEDED(hrc)) 1760 RTPrintf( "Cloud image with was deleted successfully\n");1764 RTPrintf(Cloud::tr("Cloud image with was deleted successfully\n")); 1761 1765 1762 1766 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 1793 1797 if (a->argc == iFirst) 1794 1798 { 1795 RTPrintf( "Empty command parameter list, show help.\n");1799 RTPrintf(Cloud::tr("Empty command parameter list, show help.\n")); 1796 1800 printHelp(g_pStdOut); 1797 1801 return RTEXITCODE_SUCCESS; … … 1941 1945 1942 1946 if (options.strNetworkName.isEmpty()) 1943 return errorArgument( "Missing --name parameter");1947 return errorArgument(Cloud::tr("Missing --name parameter")); 1944 1948 if (options.strNetworkId.isEmpty()) 1945 return errorArgument( "Missing --network-id parameter");1949 return errorArgument(Cloud::tr("Missing --network-id parameter")); 1946 1950 1947 1951 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 1955 1959 RTEXITCODE rc = createUpdateCloudNetworkCommon(cloudNetwork, options, pCommonOpts); 1956 1960 if (RT_SUCCESS(rc)) 1957 RTPrintf( "Cloud network was created successfully\n");1961 RTPrintf(Cloud::tr("Cloud network was created successfully\n")); 1958 1962 1959 1963 return rc; … … 1992 1996 1993 1997 if (strNetworkName.isEmpty()) 1994 return errorArgument( "Missing --name parameter");1998 return errorArgument(Cloud::tr("Missing --name parameter")); 1995 1999 1996 2000 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 2000 2004 RTEXITCODE_FAILURE); 2001 2005 2002 RTPrintf( "Name: %ls\n", strNetworkName.raw());2006 RTPrintf(Cloud::tr("Name: %ls\n"), strNetworkName.raw()); 2003 2007 BOOL fEnabled = FALSE; 2004 2008 cloudNetwork->COMGETTER(Enabled)(&fEnabled); 2005 RTPrintf( "State: %s\n", fEnabled ? "Enabled" : "Disabled");2009 RTPrintf(Cloud::tr("State: %s\n"), fEnabled ? Cloud::tr("Enabled") : Cloud::tr("Disabled")); 2006 2010 Bstr Provider; 2007 2011 cloudNetwork->COMGETTER(Provider)(Provider.asOutParam()); 2008 RTPrintf( "CloudProvider: %ls\n", Provider.raw());2012 RTPrintf(Cloud::tr("CloudProvider: %ls\n"), Provider.raw()); 2009 2013 Bstr Profile; 2010 2014 cloudNetwork->COMGETTER(Profile)(Profile.asOutParam()); 2011 RTPrintf( "CloudProfile: %ls\n", Profile.raw());2015 RTPrintf(Cloud::tr("CloudProfile: %ls\n"), Profile.raw()); 2012 2016 Bstr NetworkId; 2013 2017 cloudNetwork->COMGETTER(NetworkId)(NetworkId.asOutParam()); 2014 RTPrintf( "CloudNetworkId: %ls\n", NetworkId.raw());2018 RTPrintf(Cloud::tr("CloudNetworkId: %ls\n"), NetworkId.raw()); 2015 2019 Bstr netName = BstrFmt("cloud-%ls", strNetworkName.raw()); 2016 RTPrintf( "VBoxNetworkName: %ls\n\n", netName.raw());2020 RTPrintf(Cloud::tr("VBoxNetworkName: %ls\n\n"), netName.raw()); 2017 2021 2018 2022 return RTEXITCODE_SUCCESS; … … 2066 2070 2067 2071 if (options.strNetworkName.isEmpty()) 2068 return errorArgument( "Missing --name parameter");2072 return errorArgument(Cloud::tr("Missing --name parameter")); 2069 2073 2070 2074 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 2076 2080 RTEXITCODE rc = createUpdateCloudNetworkCommon(cloudNetwork, options, pCommonOpts); 2077 2081 if (RT_SUCCESS(rc)) 2078 RTPrintf( "Cloud network %ls was updated successfully\n", options.strNetworkName.raw());2082 RTPrintf(Cloud::tr("Cloud network %ls was updated successfully\n"), options.strNetworkName.raw()); 2079 2083 2080 2084 return rc; … … 2113 2117 2114 2118 if (strNetworkName.isEmpty()) 2115 return errorArgument( "Missing --name parameter");2119 return errorArgument(Cloud::tr("Missing --name parameter")); 2116 2120 2117 2121 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 2126 2130 2127 2131 if (SUCCEEDED(hrc)) 2128 RTPrintf( "Cloud network %ls was deleted successfully\n", strNetworkName.raw());2132 RTPrintf(Cloud::tr("Cloud network %ls was deleted successfully\n"), strNetworkName.raw()); 2129 2133 2130 2134 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 2158 2162 if (RT_FAILURE(rc)) 2159 2163 { 2160 RTStrmPrintf(g_pStdErr, "Failed to compose path to the unattended installer script templates (%Rrc)", rc);2164 RTStrmPrintf(g_pStdErr, Cloud::tr("Failed to compose path to the unattended installer script templates (%Rrc)"), rc); 2161 2165 RTStrmFlush(g_pStdErr); 2162 2166 } … … 2283 2287 Bstr guestAdditionsISO; 2284 2288 hrc = virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam()); 2285 if (errorOccured(hrc, "Failed to obtain system properties."))2289 if (errorOccured(hrc, Cloud::tr("Failed to obtain system properties."))) 2286 2290 return hrc; 2287 2291 if (aProxy.isNotEmpty()) … … 2290 2294 { 2291 2295 hrc = systemProperties->COMGETTER(ProxyMode)(&enmProxyMode); 2292 if (errorOccured(hrc, "Failed to obtain proxy mode."))2296 if (errorOccured(hrc, Cloud::tr("Failed to obtain proxy mode."))) 2293 2297 return hrc; 2294 2298 switch (enmProxyMode) … … 2299 2303 case ProxyMode_Manual: 2300 2304 hrc = systemProperties->COMGETTER(ProxyURL)(strProxy.asOutParam()); 2301 if (errorOccured(hrc, "Failed to obtain proxy URL."))2305 if (errorOccured(hrc, Cloud::tr("Failed to obtain proxy URL."))) 2302 2306 return hrc; 2303 2307 break; … … 2305 2309 hrc = getSystemProxyForUrl("https://dl.fedoraproject.org", strProxy); 2306 2310 if (FAILED(hrc)) 2307 errorOccured(hrc, "Failed to get system proxy for https://dl.fedoraproject.org. Will use direct connection.");2311 errorOccured(hrc, Cloud::tr("Failed to get system proxy for https://dl.fedoraproject.org. Will use direct connection.")); 2308 2312 break; 2309 2313 default: /* To get rid of ProxyMode_32BitHack 'warning' */ … … 2314 2318 } 2315 2319 hrc = systemProperties->COMGETTER(DefaultMachineFolder)(defaultMachineFolder.asOutParam()); 2316 if (errorOccured(hrc, "Failed to obtain default machine folder."))2320 if (errorOccured(hrc, Cloud::tr("Failed to obtain default machine folder."))) 2317 2321 return hrc; 2318 2322 if (aGuestAdditionsIso.isEmpty()) 2319 2323 { 2320 2324 hrc = systemProperties->COMGETTER(DefaultAdditionsISO)(guestAdditionsISO.asOutParam()); 2321 if (errorOccured(hrc, "Failed to obtain default guest additions ISO path."))2325 if (errorOccured(hrc, Cloud::tr("Failed to obtain default guest additions ISO path."))) 2322 2326 return hrc; 2323 2327 if (guestAdditionsISO.isEmpty()) 2324 2328 { 2325 errorOccured(E_INVALIDARG, "The default guest additions ISO path is empty nor it is provided as --guest-additions-iso parameter. Cannot proceed without it.");2329 errorOccured(E_INVALIDARG, Cloud::tr("The default guest additions ISO path is empty nor it is provided as --guest-additions-iso parameter. Cannot proceed without it.")); 2326 2330 return E_INVALIDARG; 2327 2331 } … … 2334 2338 if (RT_FAILURE(rc)) 2335 2339 { 2336 RTStrmPrintf(g_pStdErr, "Failed to compose a path to the local gateway image (%Rrc)", rc);2340 RTStrmPrintf(g_pStdErr, Cloud::tr("Failed to compose a path to the local gateway image (%Rrc)"), rc); 2337 2341 RTStrmFlush(g_pStdErr); 2338 2342 return E_FAIL; … … 2342 2346 if (SUCCEEDED(hrc)) 2343 2347 { 2344 RTPrintf( "Local gateway image already exists, skipping image preparation step.\n");2345 return hrc; 2346 } 2347 2348 RTPrintf( "Preparing unattended install of temporary local gateway machine from %ls...\n", aGatewayIso.raw());2348 RTPrintf(Cloud::tr("Local gateway image already exists, skipping image preparation step.\n")); 2349 return hrc; 2350 } 2351 2352 RTPrintf(Cloud::tr("Preparing unattended install of temporary local gateway machine from %ls...\n"), aGatewayIso.raw()); 2349 2353 /* The image does not exist, let's try to open the provided ISO file. */ 2350 2354 ComPtr<IMedium> iso; 2351 2355 hrc = virtualBox->OpenMedium(aGatewayIso.raw(), DeviceType_DVD, AccessMode_ReadOnly, FALSE, iso.asOutParam()); 2352 if (errorOccured(hrc, "Failed to open %ls.", aGatewayIso.raw()))2356 if (errorOccured(hrc, Cloud::tr("Failed to open %ls."), aGatewayIso.raw())) 2353 2357 return hrc; 2354 2358 … … 2357 2361 groups.push_back(Bstr("/gateways").mutableRaw()); 2358 2362 hrc = virtualBox->CreateMachine(NULL, strGatewayVM.raw(), ComSafeArrayAsInParam(groups), Bstr("Oracle_64").raw(), Bstr("").raw(), machine.asOutParam()); 2359 if (errorOccured(hrc, "Failed to create '%ls'.", strGatewayVM.raw()))2363 if (errorOccured(hrc, Cloud::tr("Failed to create '%ls'."), strGatewayVM.raw())) 2360 2364 return hrc; 2361 2365 /* Initial configuration */ 2362 2366 hrc = machine->ApplyDefaults(NULL); 2363 if (errorOccured(hrc, "Failed to apply defaults to '%ls'.", strGatewayVM.raw()))2367 if (errorOccured(hrc, Cloud::tr("Failed to apply defaults to '%ls'."), strGatewayVM.raw())) 2364 2368 return hrc; 2365 2369 2366 2370 hrc = machine->COMSETTER(CPUCount)(2); 2367 if (errorOccured(hrc, "Failed to adjust CPU count for '%ls'.", strGatewayVM.raw()))2371 if (errorOccured(hrc, Cloud::tr("Failed to adjust CPU count for '%ls'."), strGatewayVM.raw())) 2368 2372 return hrc; 2369 2373 2370 2374 hrc = machine->COMSETTER(MemorySize)(512/*MB*/); 2371 if (errorOccured(hrc, "Failed to adjust memory size for '%ls'.", strGatewayVM.raw()))2375 if (errorOccured(hrc, Cloud::tr("Failed to adjust memory size for '%ls'."), strGatewayVM.raw())) 2372 2376 return hrc; 2373 2377 … … 2375 2379 ComPtr<IAudioAdapter> audioAdapter; 2376 2380 hrc = machine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam()); 2377 if (errorOccured(hrc, "Failed to set attachment type for the second network adapter."))2381 if (errorOccured(hrc, Cloud::tr("Failed to set attachment type for the second network adapter."))) 2378 2382 return hrc; 2379 2383 2380 2384 hrc = audioAdapter->COMSETTER(Enabled)(FALSE); 2381 if (errorOccured(hrc, "Failed to disable the audio adapter."))2385 if (errorOccured(hrc, Cloud::tr("Failed to disable the audio adapter."))) 2382 2386 return hrc; 2383 2387 audioAdapter.setNull(); 2384 2388 2385 2389 hrc = virtualBox->RegisterMachine(machine); 2386 if (errorOccured(hrc, "Failed to register '%ls'.", strGatewayVM.raw()))2390 if (errorOccured(hrc, Cloud::tr("Failed to register '%ls'."), strGatewayVM.raw())) 2387 2391 return hrc; 2388 2392 2389 2393 hrc = virtualBox->CreateMedium(Bstr("VDI").raw(), strGatewayImage.raw(), AccessMode_ReadWrite, DeviceType_HardDisk, hd.asOutParam()); 2390 if (errorOccured(hrc, "Failed to create %ls.", strGatewayImage.raw()))2394 if (errorOccured(hrc, Cloud::tr("Failed to create %ls."), strGatewayImage.raw())) 2391 2395 return hrc; 2392 2396 … … 2399 2403 ComSafeArrayAsInParam(mediumVariant), 2400 2404 progress.asOutParam()); 2401 if (errorOccured(hrc, "Failed to create base storage for local gateway image."))2405 if (errorOccured(hrc, Cloud::tr("Failed to create base storage for local gateway image."))) 2402 2406 return hrc; 2403 2407 2404 2408 hrc = showProgress(progress); 2405 CHECK_PROGRESS_ERROR_RET(progress, ( "Failed to create base storage for local gateway image."), hrc);2409 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Failed to create base storage for local gateway image.")), hrc); 2406 2410 2407 2411 ComPtr<ISession> session; 2408 2412 hrc = session.createInprocObject(CLSID_Session); 2409 2413 hrc = machine->LockMachine(session, LockType_Write); 2410 if (errorOccured(hrc, "Failed to lock '%ls' for modifications.", strGatewayVM.raw()))2414 if (errorOccured(hrc, Cloud::tr("Failed to lock '%ls' for modifications."), strGatewayVM.raw())) 2411 2415 return hrc; 2412 2416 2413 2417 ComPtr<IMachine> sessionMachine; 2414 2418 hrc = session->COMGETTER(Machine)(sessionMachine.asOutParam()); 2415 if (errorOccured(hrc, "Failed to obtain a mutable machine."))2419 if (errorOccured(hrc, Cloud::tr("Failed to obtain a mutable machine."))) 2416 2420 return hrc; 2417 2421 2418 2422 hrc = sessionMachine->AttachDevice(Bstr("SATA").raw(), 0, 0, DeviceType_HardDisk, hd); 2419 if (errorOccured(hrc, "Failed to attach HD to '%ls'.", strGatewayVM.raw()))2423 if (errorOccured(hrc, Cloud::tr("Failed to attach HD to '%ls'."), strGatewayVM.raw())) 2420 2424 return hrc; 2421 2425 2422 2426 hrc = sessionMachine->AttachDevice(Bstr("IDE").raw(), 0, 0, DeviceType_DVD, iso); 2423 if (errorOccured(hrc, "Failed to attach ISO to '%ls'.", strGatewayVM.raw()))2427 if (errorOccured(hrc, Cloud::tr("Failed to attach ISO to '%ls'."), strGatewayVM.raw())) 2424 2428 return hrc; 2425 2429 2426 2430 /* Save settings */ 2427 2431 hrc = sessionMachine->SaveSettings(); 2428 if (errorOccured(hrc, "Failed to save '%ls' settings.", strGatewayVM.raw()))2432 if (errorOccured(hrc, Cloud::tr("Failed to save '%ls' settings."), strGatewayVM.raw())) 2429 2433 return hrc; 2430 2434 session->UnlockMachine(); … … 2433 2437 ComPtr<IUnattended> unattended; 2434 2438 hrc = virtualBox->CreateUnattendedInstaller(unattended.asOutParam()); 2435 if (errorOccured(hrc, "Failed to create unattended installer."))2439 if (errorOccured(hrc, Cloud::tr("Failed to create unattended installer."))) 2436 2440 return hrc; 2437 2441 2438 2442 hrc = unattended->COMSETTER(Machine)(machine); 2439 if (errorOccured(hrc, "Failed to set machine for the unattended installer."))2443 if (errorOccured(hrc, Cloud::tr("Failed to set machine for the unattended installer."))) 2440 2444 return hrc; 2441 2445 2442 2446 hrc = unattended->COMSETTER(IsoPath)(aGatewayIso.raw()); 2443 if (errorOccured(hrc, "Failed to set machine for the unattended installer."))2447 if (errorOccured(hrc, Cloud::tr("Failed to set machine for the unattended installer."))) 2444 2448 return hrc; 2445 2449 2446 2450 hrc = unattended->COMSETTER(User)(strUser.raw()); 2447 if (errorOccured(hrc, "Failed to set user for the unattended installer."))2451 if (errorOccured(hrc, Cloud::tr("Failed to set user for the unattended installer."))) 2448 2452 return hrc; 2449 2453 2450 2454 hrc = unattended->COMSETTER(Password)(strPassword.raw()); 2451 if (errorOccured(hrc, "Failed to set password for the unattended installer."))2455 if (errorOccured(hrc, Cloud::tr("Failed to set password for the unattended installer."))) 2452 2456 return hrc; 2453 2457 2454 2458 hrc = unattended->COMSETTER(FullUserName)(strUser.raw()); 2455 if (errorOccured(hrc, "Failed to set full user name for the unattended installer."))2459 if (errorOccured(hrc, Cloud::tr("Failed to set full user name for the unattended installer."))) 2456 2460 return hrc; 2457 2461 2458 2462 hrc = unattended->COMSETTER(InstallGuestAdditions)(TRUE); 2459 if (errorOccured(hrc, "Failed to enable guest addtions for the unattended installer."))2463 if (errorOccured(hrc, Cloud::tr("Failed to enable guest addtions for the unattended installer."))) 2460 2464 return hrc; 2461 2465 2462 2466 hrc = unattended->COMSETTER(AdditionsIsoPath)(guestAdditionsISO.raw()); 2463 if (errorOccured(hrc, "Failed to set guest addtions ISO path for the unattended installer."))2467 if (errorOccured(hrc, Cloud::tr("Failed to set guest addtions ISO path for the unattended installer."))) 2464 2468 return hrc; 2465 2469 2466 2470 hrc = unattended->COMSETTER(ScriptTemplatePath)(strInstallerScript.raw()); 2467 if (errorOccured(hrc, "Failed to set script template for the unattended installer."))2471 if (errorOccured(hrc, Cloud::tr("Failed to set script template for the unattended installer."))) 2468 2472 return hrc; 2469 2473 2470 2474 hrc = unattended->COMSETTER(PostInstallScriptTemplatePath)(strPostInstallScript.raw()); 2471 if (errorOccured(hrc, "Failed to set post install script template for the unattended installer."))2475 if (errorOccured(hrc, Cloud::tr("Failed to set post install script template for the unattended installer."))) 2472 2476 return hrc; 2473 2477 … … 2475 2479 { 2476 2480 hrc = unattended->COMSETTER(Proxy)(strProxy.raw()); 2477 if (errorOccured(hrc, "Failed to set post install script template for the unattended installer."))2481 if (errorOccured(hrc, Cloud::tr("Failed to set post install script template for the unattended installer."))) 2478 2482 return hrc; 2479 2483 } 2480 2484 2481 2485 hrc = unattended->Prepare(); 2482 if (errorOccured(hrc, "Failed to prepare unattended installation."))2486 if (errorOccured(hrc, Cloud::tr("Failed to prepare unattended installation."))) 2483 2487 return hrc; 2484 2488 2485 2489 hrc = unattended->ConstructMedia(); 2486 if (errorOccured(hrc, "Failed to construct media for unattended installation."))2490 if (errorOccured(hrc, Cloud::tr("Failed to construct media for unattended installation."))) 2487 2491 return hrc; 2488 2492 2489 2493 hrc = unattended->ReconfigureVM(); 2490 if (errorOccured(hrc, "Failed to reconfigure %ls for unattended installation.", strGatewayVM.raw()))2494 if (errorOccured(hrc, Cloud::tr("Failed to reconfigure %ls for unattended installation."), strGatewayVM.raw())) 2491 2495 return hrc; 2492 2496 … … 2497 2501 RTPrintf(" %32s = " a_szFmt "\n", a_szText, Value); \ 2498 2502 else \ 2499 RTPrintf( " %32s = failed: %Rhrc\n", a_szText, hrc2); \2503 RTPrintf(Cloud::tr(" %32s = failed: %Rhrc\n"), a_szText, hrc2); \ 2500 2504 } while (0) 2501 2505 #define SHOW_STR_ATTR(a_Attr, a_szText) do { \ … … 2505 2509 RTPrintf(" %32s = %ls\n", a_szText, bstrString.raw()); \ 2506 2510 else \ 2507 RTPrintf( " %32s = failed: %Rhrc\n", a_szText, hrc2); \2511 RTPrintf(Cloud::tr(" %32s = failed: %Rhrc\n"), a_szText, hrc2); \ 2508 2512 } while (0) 2509 2513 … … 2542 2546 unattended.setNull(); 2543 2547 2544 RTPrintf( "Performing unattended install of temporary local gateway...\n");2548 RTPrintf(Cloud::tr("Performing unattended install of temporary local gateway...\n")); 2545 2549 2546 2550 hrc = machine->LaunchVMProcess(session, Bstr("gui").raw(), ComSafeArrayNullInParam(), progress.asOutParam()); 2547 if (errorOccured(hrc, "Failed to launch '%ls'.", strGatewayVM.raw()))2551 if (errorOccured(hrc, Cloud::tr("Failed to launch '%ls'."), strGatewayVM.raw())) 2548 2552 return hrc; 2549 2553 2550 2554 hrc = progress->WaitForCompletion(-1); 2551 if (errorOccured(hrc, "Failed to launch '%ls'.", strGatewayVM.raw()))2555 if (errorOccured(hrc, Cloud::tr("Failed to launch '%ls'."), strGatewayVM.raw())) 2552 2556 return hrc; 2553 2557 … … 2560 2564 RTThreadSleep(1000); /* One second */ 2561 2565 hrc = machine->COMGETTER(State)(&machineState); 2562 if (errorOccured(hrc, "Failed to get machine state."))2566 if (errorOccured(hrc, Cloud::tr("Failed to get machine state."))) 2563 2567 break; 2564 2568 RTPrintf("\r%c", progressChars[i++ % sizeof(progressChars)]); 2565 2569 if (machineState == MachineState_Aborted) 2566 2570 { 2567 errorOccured(E_ABORT, "Temporary local gateway VM has aborted.");2571 errorOccured(E_ABORT, Cloud::tr("Temporary local gateway VM has aborted.")); 2568 2572 return E_ABORT; 2569 2573 } … … 2573 2577 if (machineState != MachineState_PoweredOff) 2574 2578 { 2575 errorOccured(E_ABORT, "Timed out (40min) while waiting for unattended install to finish.");2579 errorOccured(E_ABORT, Cloud::tr("Timed out (40min) while waiting for unattended install to finish.")); 2576 2580 return E_ABORT; 2577 2581 } … … 2579 2583 RTThreadSleep(5000); /* Five seconds */ 2580 2584 2581 RTPrintf( "\rDone.\n");2585 RTPrintf(Cloud::tr("\rDone.\n")); 2582 2586 2583 2587 hrc = machine->LockMachine(session, LockType_Write); 2584 if (errorOccured(hrc, "Failed to lock '%ls' for modifications.", strGatewayVM.raw()))2585 return hrc; 2586 2587 RTPrintf( "Detaching local gateway image...\n");2588 if (errorOccured(hrc, Cloud::tr("Failed to lock '%ls' for modifications."), strGatewayVM.raw())) 2589 return hrc; 2590 2591 RTPrintf(Cloud::tr("Detaching local gateway image...\n")); 2588 2592 hrc = session->COMGETTER(Machine)(sessionMachine.asOutParam()); 2589 if (errorOccured(hrc, "Failed to obtain a mutable machine."))2593 if (errorOccured(hrc, Cloud::tr("Failed to obtain a mutable machine."))) 2590 2594 return hrc; 2591 2595 2592 2596 hrc = sessionMachine->DetachDevice(Bstr("SATA").raw(), 0, 0); 2593 if (errorOccured(hrc, "Failed to detach HD to '%ls'.", strGatewayVM.raw()))2597 if (errorOccured(hrc, Cloud::tr("Failed to detach HD to '%ls'."), strGatewayVM.raw())) 2594 2598 return hrc; 2595 2599 … … 2599 2603 /* Save settings */ 2600 2604 hrc = sessionMachine->SaveSettings(); 2601 if (errorOccured(hrc, "Failed to save '%ls' settings.", strGatewayVM.raw()))2605 if (errorOccured(hrc, Cloud::tr("Failed to save '%ls' settings."), strGatewayVM.raw())) 2602 2606 return hrc; 2603 2607 session->UnlockMachine(); … … 2605 2609 #if 0 2606 2610 /** @todo Unregistering the temporary VM makes the image mutable again. Find out the way around it! */ 2607 RTPrintf( "Unregistering temporary local gateway machine...\n");2611 RTPrintf(Cloud::tr("Unregistering temporary local gateway machine...\n")); 2608 2612 SafeIfaceArray<IMedium> media; 2609 2613 hrc = machine->Unregister(CleanupMode_DetachAllReturnNone, ComSafeArrayAsOutParam(media)); 2610 if (errorOccured(hrc, "Failed to unregister '%ls'.", strGatewayVM.raw()))2614 if (errorOccured(hrc, Cloud::tr("Failed to unregister '%ls'."), strGatewayVM.raw())) 2611 2615 return hrc; 2612 2616 hrc = machine->DeleteConfig(ComSafeArrayAsInParam(media), progress.asOutParam()); 2613 if (errorOccured(hrc, "Failed to delete config for '%ls'.", strGatewayVM.raw()))2617 if (errorOccured(hrc, Cloud::tr("Failed to delete config for '%ls'."), strGatewayVM.raw())) 2614 2618 return hrc; 2615 2619 hrc = progress->WaitForCompletion(-1); 2616 if (errorOccured(hrc, "Failed to delete config for '%ls'.", strGatewayVM.raw()))2620 if (errorOccured(hrc, Cloud::tr("Failed to delete config for '%ls'."), strGatewayVM.raw())) 2617 2621 return hrc; 2618 2622 #endif 2619 2623 2620 RTPrintf( "Making local gateway image immutable...\n");2624 RTPrintf(Cloud::tr("Making local gateway image immutable...\n")); 2621 2625 hrc = virtualBox->OpenMedium(strGatewayImage.raw(), DeviceType_HardDisk, AccessMode_ReadWrite, FALSE, hd.asOutParam()); 2622 if (errorOccured(hrc, "Failed to open '%ls'.", strGatewayImage.raw()))2626 if (errorOccured(hrc, Cloud::tr("Failed to open '%ls'."), strGatewayImage.raw())) 2623 2627 return hrc; 2624 2628 hd->COMSETTER(Type)(MediumType_Immutable); 2625 if (errorOccured(hrc, "Failed to make '%ls' immutable.", strGatewayImage.raw()))2629 if (errorOccured(hrc, Cloud::tr("Failed to make '%ls' immutable."), strGatewayImage.raw())) 2626 2630 return hrc; 2627 2631 … … 2706 2710 2707 2711 if (strLocalGatewayIso.isEmpty()) 2708 return errorArgument( "Missing --local-gateway-iso parameter");2712 return errorArgument(Cloud::tr("Missing --local-gateway-iso parameter")); 2709 2713 2710 2714 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 2714 2718 return RTEXITCODE_FAILURE; 2715 2719 2716 RTPrintf( "Setting up tunnel network in the cloud...\n");2720 RTPrintf(Cloud::tr("Setting up tunnel network in the cloud...\n")); 2717 2721 2718 2722 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 2740 2744 2741 2745 hrc = showProgress(progress); 2742 CHECK_PROGRESS_ERROR_RET(progress, ( "Setting up cloud network environment failed"), RTEXITCODE_FAILURE);2746 CHECK_PROGRESS_ERROR_RET(progress, (Cloud::tr("Setting up cloud network environment failed")), RTEXITCODE_FAILURE); 2743 2747 2744 2748 Bstr tunnelNetworkId; 2745 2749 hrc = cloudNetworkEnv->COMGETTER(TunnelNetworkId)(tunnelNetworkId.asOutParam()); 2746 RTPrintf( "Cloud network environment was set up successfully. Tunnel network id is: %ls\n", tunnelNetworkId.raw());2750 RTPrintf(Cloud::tr("Cloud network environment was set up successfully. Tunnel network id is: %ls\n"), tunnelNetworkId.raw()); 2747 2751 2748 2752 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloudMachine.cpp
r91351 r92372 26 26 #include <algorithm> 27 27 #include <vector> 28 29 DECLARE_TRANSLATION_CONTEXT(CloudMachine); 28 30 29 31 … … 168 170 if (aProviders.size() == 0) 169 171 { 170 RTMsgError( "cloud: no providers available");172 RTMsgError(CloudMachine::tr("cloud: no providers available")); 171 173 return VERR_NOT_FOUND; 172 174 } … … 174 176 if (aProviders.size() > 1) 175 177 { 176 RTMsgError( "cloud: multiple providers available,"177 " '--provider' option is required");178 RTMsgError(CloudMachine::tr("cloud: multiple providers available," 179 " '--provider' option is required")); 178 180 return VERR_MISSING; 179 181 } … … 227 229 if (aProfiles.size() == 0) 228 230 { 229 RTMsgError( "cloud: no profiles exist");231 RTMsgError(CloudMachine::tr("cloud: no profiles exist")); 230 232 return VERR_NOT_FOUND; 231 233 } … … 233 235 if (aProfiles.size() > 1) 234 236 { 235 RTMsgError( "cloud: multiple profiles exist,"236 " '--profile' option is required");237 RTMsgError(CloudMachine::tr("cloud: multiple profiles exist," 238 " '--profile' option is required")); 237 239 return VERR_MISSING; 238 240 } … … 359 361 hrc); 360 362 361 RTMsgError( "ambiguous name: %ls and %ls", bstrId1.raw(), bstrId2.raw());363 RTMsgError(CloudMachine::tr("ambiguous name: %ls and %ls"), bstrId1.raw(), bstrId2.raw()); 362 364 return VBOX_E_OBJECT_NOT_FOUND; 363 365 } … … 415 417 { 416 418 return RTMsgErrorExit(RTEXITCODE_SYNTAX, 417 "only one machine can be specified");419 CloudMachine::tr("only one machine can be specified")); 418 420 } 419 421 … … 463 465 if (RT_FAILURE(rc)) 464 466 { 465 RTMsgError( "not a valid uuid: %s", pcszId);467 RTMsgError(CloudMachine::tr("not a valid uuid: %s"), pcszId); 466 468 return VERR_PARSE_ERROR; 467 469 } … … 526 528 if (a->pcszSpec == NULL) 527 529 { 528 RTMsgErrorExit(RTEXITCODE_SYNTAX, "machine not specified");530 RTMsgErrorExit(RTEXITCODE_SYNTAX, CloudMachine::tr("machine not specified")); 529 531 return E_FAIL; 530 532 } … … 532 534 if (a->pcszSpec[0] == '\0') 533 535 { 534 RTMsgError( "machine name is empty");536 RTMsgError(CloudMachine::tr("machine name is empty")); 535 537 return E_FAIL; 536 538 } … … 543 545 { 544 546 if (hrc == VBOX_E_OBJECT_NOT_FOUND) 545 RTMsgError( "unable to find machine with id %s", a->pcszSpec);547 RTMsgError(CloudMachine::tr("unable to find machine with id %s"), a->pcszSpec); 546 548 return hrc; 547 549 } … … 553 555 { 554 556 if (hrc == VBOX_E_OBJECT_NOT_FOUND) 555 RTMsgError( "unable to find machine with name %s", a->pcszSpec);557 RTMsgError(CloudMachine::tr("unable to find machine with name %s"), a->pcszSpec); 556 558 return hrc; 557 559 } … … 563 565 { 564 566 if (hrc == VBOX_E_OBJECT_NOT_FOUND) 565 RTMsgError( "unable to find machine %s", a->pcszSpec);567 RTMsgError(CloudMachine::tr("unable to find machine %s"), a->pcszSpec); 566 568 return hrc; 567 569 } … … 635 637 iFirst, RTGETOPTINIT_FLAGS_NO_STD_OPTS); 636 638 AssertRCReturn(rc, RTMsgErrorExit(RTEXITCODE_INIT, 637 "cloud machine: RTGetOptInit: %Rra", rc));639 CloudMachine::tr("cloud machine: RTGetOptInit: %Rra"), rc)); 638 640 639 641 int ch; … … 650 652 if (ch == VINF_GETOPT_NOT_OPTION) 651 653 return RTMsgErrorExit(RTEXITCODE_SYNTAX, 652 "Invalid sub-command: %s", Val.psz);654 CloudMachine::tr("Invalid sub-command: %s"), Val.psz); 653 655 654 656 /* … … 696 698 default: /* should never happen */ 697 699 return RTMsgErrorExit(RTEXITCODE_INIT, 698 "cloud machine: internal error: %d", ch);700 CloudMachine::tr("cloud machine: internal error: %d"), ch); 699 701 } 700 702 } 701 703 702 704 return RTMsgErrorExit(RTEXITCODE_SYNTAX, 703 "cloud machine: command required\n"704 "Try '--help' for more information.");705 CloudMachine::tr("cloud machine: command required\n" 706 "Try '--help' for more information.")); 705 707 } 706 708 … … 753 755 if (a->pcszSpec != NULL) 754 756 return RTMsgErrorExit(RTEXITCODE_SYNTAX, 755 "cloud machine list: unexpected machine argument");757 CloudMachine::tr("cloud machine list: unexpected machine argument")); 756 758 757 759 … … 761 763 iFirst, RTGETOPTINIT_FLAGS_NO_STD_OPTS); 762 764 AssertRCReturn(rc, RTMsgErrorExit(RTEXITCODE_INIT, 763 "cloud machine list: RTGetOptInit: %Rra", rc));765 CloudMachine::tr("cloud machine list: RTGetOptInit: %Rra"), rc)); 764 766 765 767 int ch; … … 785 787 case VINF_GETOPT_NOT_OPTION: 786 788 return RTMsgErrorExit(RTEXITCODE_SYNTAX, 787 "Invalid sub-command: %s", Val.psz);789 CloudMachine::tr("Invalid sub-command: %s"), Val.psz); 788 790 789 791 default: … … 983 985 if (!fAccessible) 984 986 { 985 RTMsgError( "machine is not accessible"); // XXX: Id?987 RTMsgError(CloudMachine::tr("machine is not accessible")); // XXX: Id? 986 988 987 989 ComPtr<IVirtualBoxErrorInfo> pErrorInfo; … … 1013 1015 switch (enmState) { 1014 1016 case CloudMachineState_Invalid: 1015 RTPrintf( "State: Invalid (%RU32)\n", CloudMachineState_Invalid);1017 RTPrintf(CloudMachine::tr("State: Invalid (%RU32)\n"), CloudMachineState_Invalid); 1016 1018 break; 1017 1019 1018 1020 case CloudMachineState_Provisioning: 1019 RTPrintf( "State: Provisioning (%RU32)\n", CloudMachineState_Provisioning);1021 RTPrintf(CloudMachine::tr("State: Provisioning (%RU32)\n"), CloudMachineState_Provisioning); 1020 1022 break; 1021 1023 1022 1024 case CloudMachineState_Running: 1023 RTPrintf( "State: Running (%RU32)\n", CloudMachineState_Running);1025 RTPrintf(CloudMachine::tr("State: Running (%RU32)\n"), CloudMachineState_Running); 1024 1026 break; 1025 1027 1026 1028 case CloudMachineState_Starting: 1027 RTPrintf( "State: Starting (%RU32)\n", CloudMachineState_Starting);1029 RTPrintf(CloudMachine::tr("State: Starting (%RU32)\n"), CloudMachineState_Starting); 1028 1030 break; 1029 1031 1030 1032 case CloudMachineState_Stopping: 1031 RTPrintf( "State: Stopping (%RU32)\n", CloudMachineState_Stopping);1033 RTPrintf(CloudMachine::tr("State: Stopping (%RU32)\n"), CloudMachineState_Stopping); 1032 1034 break; 1033 1035 1034 1036 case CloudMachineState_Stopped: 1035 RTPrintf( "State: Stopped (%RU32)\n", CloudMachineState_Stopped);1037 RTPrintf(CloudMachine::tr("State: Stopped (%RU32)\n"), CloudMachineState_Stopped); 1036 1038 break; 1037 1039 1038 1040 case CloudMachineState_CreatingImage: 1039 RTPrintf( "State: CreatingImage (%RU32)\n", CloudMachineState_CreatingImage);1041 RTPrintf(CloudMachine::tr("State: CreatingImage (%RU32)\n"), CloudMachineState_CreatingImage); 1040 1042 break; 1041 1043 1042 1044 case CloudMachineState_Terminating: 1043 RTPrintf( "State: Terminating (%RU32)\n", CloudMachineState_Terminating);1045 RTPrintf(CloudMachine::tr("State: Terminating (%RU32)\n"), CloudMachineState_Terminating); 1044 1046 break; 1045 1047 1046 1048 case CloudMachineState_Terminated: 1047 RTPrintf( "State: Terminated (%RU32)\n", CloudMachineState_Terminated);1049 RTPrintf(CloudMachine::tr("State: Terminated (%RU32)\n"), CloudMachineState_Terminated); 1048 1050 break; 1049 1051 1050 1052 default: 1051 RTPrintf( "State: Unknown state (%RU32)\n", enmState);1053 RTPrintf(CloudMachine::tr("State: Unknown state (%RU32)\n"), enmState); 1052 1054 } 1053 1055 … … 1058 1060 if (RT_UNLIKELY(pDetails.isNull())) 1059 1061 { 1060 RTMsgError( "null details"); /* better error message? */1062 RTMsgError(CloudMachine::tr("null details")); /* better error message? */ 1061 1063 return E_FAIL; 1062 1064 } … … 1105 1107 { 1106 1108 RTStrmPrintf(g_pStdErr, 1107 "%ls: unable to convert to boolean value\n", bstrLabel.raw()); 1109 CloudMachine::tr("%ls: unable to convert to boolean value\n"), 1110 bstrLabel.raw()); 1108 1111 break; 1109 1112 } … … 1130 1133 { 1131 1134 RTStrmPrintf(g_pStdErr, 1132 "%ls: unable to convert to string value\n", bstrLabel.raw()); 1135 CloudMachine::tr("%ls: unable to convert to string value\n"), 1136 bstrLabel.raw()); 1133 1137 break; 1134 1138 } … … 1171 1175 { 1172 1176 RTStrmPrintf(g_pStdErr, 1173 "%ls: unable to convert to integer value\n", bstrLabel.raw()); 1177 CloudMachine::tr("%ls: unable to convert to integer value\n"), 1178 bstrLabel.raw()); 1174 1179 break; 1175 1180 } … … 1196 1201 { 1197 1202 RTStrmPrintf(g_pStdErr, 1198 "%ls: unable to convert to choice value\n", bstrLabel.raw()); 1203 CloudMachine::tr("%ls: unable to convert to choice value\n"), 1204 bstrLabel.raw()); 1199 1205 break; 1200 1206 } … … 1205 1211 { 1206 1212 RTStrmPrintf(g_pStdOut, 1207 "%ls: values: %Rhra", bstrLabel.raw(), hrc); 1213 CloudMachine::tr("%ls: values: %Rhra"), 1214 bstrLabel.raw(), hrc); 1208 1215 break; 1209 1216 } … … 1214 1221 { 1215 1222 RTStrmPrintf(g_pStdOut, 1216 "%ls: selectedIndex: %Rhra", bstrLabel.raw(), hrc); 1223 CloudMachine::tr("%ls: selectedIndex: %Rhra"), 1224 bstrLabel.raw(), hrc); 1217 1225 break; 1218 1226 } … … 1221 1229 { 1222 1230 RTStrmPrintf(g_pStdOut, 1223 "%ls: selected index %RI64 out of range [0, %zu)\n",1231 CloudMachine::tr("%ls: selected index %RI64 out of range [0, %zu)\n"), 1224 1232 bstrLabel.raw(), (int64_t)idxSelected, aValues.size()); 1225 1233 break; … … 1233 1241 default: 1234 1242 { 1235 RTStrmPrintf(g_pStdOut, "unknown value type %RU32\n", enmType);1243 RTStrmPrintf(g_pStdOut, CloudMachine::tr("unknown value type %RU32\n"), enmType); 1236 1244 break; 1237 1245 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r89597 r92372 41 41 42 42 #include <list> 43 44 DECLARE_TRANSLATION_CONTEXT(CloudVM); 43 45 44 46 VMProcPriority_T nameToVMProcPriority(const char *pszName); … … 61 63 && u32 <= cMaxNum) 62 64 return (unsigned)u32; 63 errorArgument( "Invalid %s number '%s'", name, psz);65 errorArgument(CloudVM::tr("Invalid %s number '%s'"), name, psz); 64 66 return 0; 65 67 } … … 219 221 if (FAILED(rc)) 220 222 { 221 RTMsgError( "Failed to send a scancode");223 RTMsgError(CloudVM::tr("Failed to send a scancode")); 222 224 break; 223 225 } … … 232 234 if (SUCCEEDED(rc) && codesStored < saScancodes.size()) 233 235 { 234 RTMsgError( "Only %d scancodes were stored", codesStored);236 RTMsgError(CloudVM::tr("Only %d scancodes were stored"), codesStored); 235 237 rc = E_FAIL; 236 238 } … … 331 333 } 332 334 else 333 RTMsgError( "Out of memory allocating %d bytes", cbBuffer);335 RTMsgError(CloudVM::tr("Out of memory allocating %d bytes"), cbBuffer); 334 336 } 335 337 else 336 RTMsgError( "File size %RI64 is greater than %RI64: '%s'", cbFile, cbFileMax, pszFilename);338 RTMsgError(CloudVM::tr("File size %RI64 is greater than %RI64: '%s'"), cbFile, cbFileMax, pszFilename); 337 339 } 338 340 else 339 RTMsgError( "Cannot get size of file '%s': %Rrc", pszFilename, vrc);341 RTMsgError(CloudVM::tr("Cannot get size of file '%s': %Rrc"), pszFilename, vrc); 340 342 341 343 RTFileClose(File); 342 344 } 343 345 else 344 RTMsgError( "Cannot open file '%s': %Rrc", pszFilename, vrc);346 RTMsgError(CloudVM::tr("Cannot open file '%s': %Rrc"), pszFilename, vrc); 345 347 346 348 /* Release SHIFT if pressed. */ … … 359 361 360 362 if (a->argc < 2) 361 return errorSyntax(USAGE_CONTROLVM, "Not enough parameters");363 return errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Not enough parameters")); 362 364 363 365 /* try to find the given machine */ … … 379 381 CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam())); 380 382 if (!console) 381 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Machine '%s' is not currently running", a->argv[0]);383 return RTMsgErrorExit(RTEXITCODE_FAILURE, CloudVM::tr("Machine '%s' is not currently running"), a->argv[0]); 382 384 383 385 /* ... and session machine */ … … 401 403 if (a->argc <= 1 + 1) 402 404 { 403 errorArgument( "Missing argument to '%s'. Expected CPU number.", a->argv[1]);405 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected CPU number."), a->argv[1]); 404 406 rc = E_FAIL; 405 407 break; … … 414 416 if (a->argc <= 1 + 1) 415 417 { 416 errorArgument( "Missing argument to '%s'. Expected CPU number.", a->argv[1]);418 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected CPU number."), a->argv[1]); 417 419 rc = E_FAIL; 418 420 break; … … 427 429 if (a->argc <= 1 + 1) 428 430 { 429 errorArgument( "Missing argument to '%s'. Expected execution cap number.", a->argv[1]);431 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected execution cap number."), a->argv[1]); 430 432 rc = E_FAIL; 431 433 break; … … 452 454 else 453 455 { 454 errorArgument( "Invalid value '%s'", Utf8Str(a->argv[2]).c_str());456 errorArgument(CloudVM::tr("Invalid value '%s'"), Utf8Str(a->argv[2]).c_str()); 455 457 rc = E_FAIL; 456 458 break; … … 461 463 else 462 464 { 463 errorArgument( "audio adapter not enabled in VM configuration");465 errorArgument(CloudVM::tr("audio adapter not enabled in VM configuration")); 464 466 rc = E_FAIL; 465 467 break; … … 482 484 else 483 485 { 484 errorArgument( "Invalid value '%s'", Utf8Str(a->argv[2]).c_str());486 errorArgument(CloudVM::tr("Invalid value '%s'"), Utf8Str(a->argv[2]).c_str()); 485 487 rc = E_FAIL; 486 488 break; … … 491 493 else 492 494 { 493 errorArgument( "audio adapter not enabled in VM configuration");495 errorArgument(CloudVM::tr("audio adapter not enabled in VM configuration")); 494 496 rc = E_FAIL; 495 497 break; … … 501 503 if (a->argc <= 1 + 1) 502 504 { 503 errorArgument( "Missing argument to '%s'.", a->argv[1]);505 errorArgument(CloudVM::tr("Missing argument to '%s'."), a->argv[1]); 504 506 rc = E_FAIL; 505 507 break; … … 519 521 else 520 522 { 521 errorArgument( "Invalid '%s' argument '%s'.", a->argv[2], a->argv[3]);523 errorArgument(CloudVM::tr("Invalid '%s' argument '%s'."), a->argv[2], a->argv[3]); 522 524 rc = E_FAIL; 523 525 break; … … 533 535 if (a->argc <= 1 + 2) 534 536 { 535 errorArgument( "Missing argument to '%s'. Expected enabled / disabled.", a->argv[2]);537 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected enabled / disabled."), a->argv[2]); 536 538 rc = E_FAIL; 537 539 break; … … 549 551 else 550 552 { 551 errorArgument( "Invalid '%s' argument '%s'.", a->argv[2], a->argv[3]);553 errorArgument(CloudVM::tr("Invalid '%s' argument '%s'."), a->argv[2], a->argv[3]); 552 554 rc = E_FAIL; 553 555 break; … … 561 563 else 562 564 { 563 errorArgument( "Invalid '%s' argument '%s'.", a->argv[1], a->argv[2]);565 errorArgument(CloudVM::tr("Invalid '%s' argument '%s'."), a->argv[1], a->argv[2]); 564 566 rc = E_FAIL; 565 567 break; … … 571 573 if (a->argc <= 1 + 1) 572 574 { 573 errorArgument( "Missing argument to '%s'. Expected drag and drop mode.", a->argv[1]);575 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected drag and drop mode."), a->argv[1]); 574 576 rc = E_FAIL; 575 577 break; … … 587 589 else 588 590 { 589 errorArgument( "Invalid '%s' argument '%s'.", a->argv[1], a->argv[2]);591 errorArgument(CloudVM::tr("Invalid '%s' argument '%s'."), a->argv[1], a->argv[2]); 590 592 rc = E_FAIL; 591 593 } … … 603 605 604 606 rc = showProgress(progress); 605 CHECK_PROGRESS_ERROR(progress, ( "Failed to power off machine"));607 CHECK_PROGRESS_ERROR(progress, (CloudVM::tr("Failed to power off machine"))); 606 608 } 607 609 else if (!strcmp(a->argv[1], "savestate")) … … 622 624 if (machineState != MachineState_Paused) 623 625 { 624 RTMsgError( "Machine in invalid state %d -- %s\n",626 RTMsgError(CloudVM::tr("Machine in invalid state %d -- %s\n"), 625 627 machineState, machineStateToName(machineState, false)); 626 628 } … … 645 647 646 648 rc = showProgress(progress); 647 CHECK_PROGRESS_ERROR(progress, ( "Failed to save machine state"));649 CHECK_PROGRESS_ERROR(progress, (CloudVM::tr("Failed to save machine state"))); 648 650 if (FAILED(rc)) 649 651 { … … 668 670 if (!pGuest) 669 671 { 670 RTMsgError( "Guest not running");672 RTMsgError(CloudVM::tr("Guest not running")); 671 673 rc = E_FAIL; 672 674 break; … … 689 691 { 690 692 if (rc == VBOX_E_NOT_SUPPORTED) 691 RTPrintf( "Current installed Guest Additions don't support %s the guest.",693 RTPrintf(CloudVM::tr("Current installed Guest Additions don't support %s the guest."), 692 694 fReboot ? "rebooting" : "shutting down"); 693 695 } … … 700 702 if (!pKeyboard) 701 703 { 702 RTMsgError( "Guest not running");704 RTMsgError(CloudVM::tr("Guest not running")); 703 705 rc = E_FAIL; 704 706 break; … … 707 709 if (a->argc <= 1 + 1) 708 710 { 709 errorArgument("Missing argument to '%s'. Expected IBM PC AT set 2 keyboard scancode(s) as hex byte(s).", a->argv[1]); 711 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected IBM PC AT set 2 keyboard scancode(s) as hex byte(s)."), 712 a->argv[1]); 710 713 rc = E_FAIL; 711 714 break; … … 726 729 if (RT_FAILURE (irc)) 727 730 { 728 RTMsgError( "Converting '%s' returned %Rrc!", a->argv[i], rc);731 RTMsgError(CloudVM::tr("Converting '%s' returned %Rrc!"), a->argv[i], rc); 729 732 rc = E_FAIL; 730 733 break; … … 735 738 else 736 739 { 737 RTMsgError( "Error: '%s' is not a hex byte!", a->argv[i]);740 RTMsgError(CloudVM::tr("Error: '%s' is not a hex byte!"), a->argv[i]); 738 741 rc = E_FAIL; 739 742 break; … … 752 755 if (!pKeyboard) 753 756 { 754 RTMsgError( "Guest not running");757 RTMsgError(CloudVM::tr("Guest not running")); 755 758 rc = E_FAIL; 756 759 break; … … 759 762 if (a->argc <= 1 + 1) 760 763 { 761 errorArgument( "Missing argument to '%s'. Expected ASCII string(s).", a->argv[1]);764 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected ASCII string(s)."), a->argv[1]); 762 765 rc = E_FAIL; 763 766 break; … … 772 775 if (!pKeyboard) 773 776 { 774 RTMsgError( "Guest not running");777 RTMsgError(CloudVM::tr("Guest not running")); 775 778 rc = E_FAIL; 776 779 break; … … 779 782 if (a->argc <= 1 + 1) 780 783 { 781 errorArgument( "Missing argument to '%s'. Expected file name.", a->argv[1]);784 errorArgument(CloudVM::tr("Missing argument to '%s'. Expected file name."), a->argv[1]); 782 785 rc = E_FAIL; 783 786 break; … … 798 801 if (a->argc <= 1 + 1) 799 802 { 800 errorArgument( "Missing argument to '%s'", a->argv[1]);803 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 801 804 rc = E_FAIL; 802 805 break; … … 817 820 else 818 821 { 819 errorArgument( "Invalid link state '%s'", Utf8Str(a->argv[2]).c_str());822 errorArgument(CloudVM::tr("Invalid link state '%s'"), Utf8Str(a->argv[2]).c_str()); 820 823 rc = E_FAIL; 821 824 break; … … 842 845 if (a->argc <= 2) 843 846 { 844 errorArgument( "Missing argument to '%s'", a->argv[1]);847 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 845 848 rc = E_FAIL; 846 849 break; … … 862 865 else 863 866 { 864 errorArgument( "Invalid filename or filename not specified for NIC %lu", n);867 errorArgument(CloudVM::tr("Invalid filename or filename not specified for NIC %lu"), n); 865 868 rc = E_FAIL; 866 869 break; … … 870 873 } 871 874 else 872 RTMsgError( "The NIC %d is currently disabled and thus its tracefile can't be changed", n);875 RTMsgError(CloudVM::tr("The NIC %d is currently disabled and thus its tracefile can't be changed"), n); 873 876 } 874 877 } … … 885 888 if (a->argc <= 2) 886 889 { 887 errorArgument( "Missing argument to '%s'", a->argv[1]);890 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 888 891 rc = E_FAIL; 889 892 break; … … 909 912 else 910 913 { 911 errorArgument( "Invalid nictrace%lu argument '%s'", n, Utf8Str(a->argv[2]).c_str());914 errorArgument(CloudVM::tr("Invalid nictrace%lu argument '%s'"), n, Utf8Str(a->argv[2]).c_str()); 912 915 rc = E_FAIL; 913 916 break; … … 917 920 } 918 921 else 919 RTMsgError( "The NIC %d is currently disabled and thus its trace flag can't be changed", n);922 RTMsgError(CloudVM::tr("The NIC %d is currently disabled and thus its trace flag can't be changed"), n); 920 923 } 921 924 } … … 933 936 if (a->argc <= 2) 934 937 { 935 errorArgument( "Missing argument to '%s'", a->argv[1]);938 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 936 939 rc = E_FAIL; 937 940 break; … … 961 964 else 962 965 { 963 #define ITERATE_TO_NEXT_TERM(ch) \964 do { \965 while (*ch != ',') \966 { \967 if (*ch == 0) \968 { \969 return errorSyntax(USAGE_CONTROLVM, \970 "Missing or invalid argument to '%s'", \971 a->argv[1]); \972 } \973 ch++; \974 } \975 *ch = '\0'; \976 ch++; \966 #define ITERATE_TO_NEXT_TERM(ch) \ 967 do { \ 968 while (*ch != ',') \ 969 { \ 970 if (*ch == 0) \ 971 { \ 972 return errorSyntax(USAGE_CONTROLVM, \ 973 CloudVM::tr("Missing or invalid argument to '%s'"), \ 974 a->argv[1]); \ 975 } \ 976 ch++; \ 977 } \ 978 *ch = '\0'; \ 979 ch++; \ 977 980 } while(0) 978 981 … … 1004 1007 { 1005 1008 return errorSyntax(USAGE_CONTROLVM, 1006 "Wrong rule proto '%s' specified -- only 'udp' and 'tcp' are allowed.",1009 CloudVM::tr("Wrong rule proto '%s' specified -- only 'udp' and 'tcp' are allowed."), 1007 1010 strProto); 1008 1011 } … … 1026 1029 if (a->argc <= 2) 1027 1030 { 1028 errorArgument( "Missing argument to '%s'", a->argv[1]);1031 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 1029 1032 rc = E_FAIL; 1030 1033 break; … … 1057 1060 else 1058 1061 { 1059 errorArgument( "Invalid nicproperty%d argument '%s'", n, a->argv[2]);1062 errorArgument(CloudVM::tr("Invalid nicproperty%d argument '%s'"), n, a->argv[2]); 1060 1063 rc = E_FAIL; 1061 1064 } … … 1064 1067 else 1065 1068 { 1066 RTStrmPrintf(g_pStdErr, "Error: Failed to allocate memory for nicproperty%d '%s'\n", n, a->argv[2]); 1069 RTStrmPrintf(g_pStdErr, CloudVM::tr("Error: Failed to allocate memory for nicproperty%d '%s'\n"), 1070 n, a->argv[2]); 1067 1071 rc = E_FAIL; 1068 1072 } … … 1071 1075 } 1072 1076 else 1073 RTMsgError( "The NIC %d is currently disabled and thus its properties can't be changed", n);1077 RTMsgError(CloudVM::tr("The NIC %d is currently disabled and thus its properties can't be changed"), n); 1074 1078 } 1075 1079 } … … 1086 1090 if (a->argc <= 2) 1087 1091 { 1088 errorArgument( "Missing argument to '%s'", a->argv[1]);1092 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 1089 1093 rc = E_FAIL; 1090 1094 break; … … 1110 1114 else 1111 1115 { 1112 errorArgument( "Unknown promiscuous mode policy '%s'", a->argv[2]);1116 errorArgument(CloudVM::tr("Unknown promiscuous mode policy '%s'"), a->argv[2]); 1113 1117 rc = E_INVALIDARG; 1114 1118 break; … … 1120 1124 } 1121 1125 else 1122 RTMsgError( "The NIC %d is currently disabled and thus its promiscuous mode can't be changed", n);1126 RTMsgError(CloudVM::tr("The NIC %d is currently disabled and thus its promiscuous mode can't be changed"), n); 1123 1127 } 1124 1128 } … … 1135 1139 if (a->argc <= 2) 1136 1140 { 1137 errorArgument( "Missing argument to '%s'", a->argv[1]);1141 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 1138 1142 rc = E_FAIL; 1139 1143 break; … … 1164 1168 if (a->argc <= 3) 1165 1169 { 1166 errorArgument( "Missing argument to '%s'", a->argv[2]);1170 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[2]); 1167 1171 rc = E_FAIL; 1168 1172 break; … … 1176 1180 if (a->argc <= 3) 1177 1181 { 1178 errorArgument( "Missing argument to '%s'", a->argv[2]);1182 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[2]); 1179 1183 rc = E_FAIL; 1180 1184 break; … … 1188 1192 if (a->argc <= 3) 1189 1193 { 1190 errorArgument( "Missing argument to '%s'", a->argv[2]);1194 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[2]); 1191 1195 rc = E_FAIL; 1192 1196 break; … … 1201 1205 if (a->argc <= 3) 1202 1206 { 1203 errorArgument( "Missing argument to '%s'", a->argv[2]);1207 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[2]); 1204 1208 rc = E_FAIL; 1205 1209 break; … … 1212 1216 if (a->argc <= 3) 1213 1217 { 1214 errorArgument( "Missing argument to '%s'", a->argv[2]);1218 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[2]); 1215 1219 rc = E_FAIL; 1216 1220 break; … … 1224 1228 if (a->argc <= 3) 1225 1229 { 1226 errorArgument( "Missing argument to '%s'", a->argv[2]);1230 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[2]); 1227 1231 rc = E_FAIL; 1228 1232 break; … … 1233 1237 else 1234 1238 { 1235 errorArgument( "Invalid type '%s' specfied for NIC %lu", Utf8Str(a->argv[2]).c_str(), n);1239 errorArgument(CloudVM::tr("Invalid type '%s' specfied for NIC %lu"), Utf8Str(a->argv[2]).c_str(), n); 1236 1240 rc = E_FAIL; 1237 1241 break; … … 1241 1245 } 1242 1246 else 1243 RTMsgError( "The NIC %d is currently disabled and thus its attachment type can't be changed", n);1247 RTMsgError(CloudVM::tr("The NIC %d is currently disabled and thus its attachment type can't be changed"), n); 1244 1248 } 1245 1249 } … … 1248 1252 { 1249 1253 if (!strcmp(a->argv[1], "vrdp")) 1250 RTStrmPrintf(g_pStdErr, "Warning: 'vrdp' is deprecated. Use 'vrde'.\n");1254 RTStrmPrintf(g_pStdErr, CloudVM::tr("Warning: 'vrdp' is deprecated. Use 'vrde'.\n")); 1251 1255 1252 1256 if (a->argc <= 1 + 1) 1253 1257 { 1254 errorArgument( "Missing argument to '%s'", a->argv[1]);1258 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 1255 1259 rc = E_FAIL; 1256 1260 break; … … 1271 1275 else 1272 1276 { 1273 errorArgument( "Invalid remote desktop server state '%s'", Utf8Str(a->argv[2]).c_str());1277 errorArgument(CloudVM::tr("Invalid remote desktop server state '%s'"), Utf8Str(a->argv[2]).c_str()); 1274 1278 rc = E_FAIL; 1275 1279 break; … … 1283 1287 { 1284 1288 if (!strcmp(a->argv[1], "vrdpport")) 1285 RTStrmPrintf(g_pStdErr, "Warning: 'vrdpport' is deprecated. Use 'vrdeport'.\n");1289 RTStrmPrintf(g_pStdErr, CloudVM::tr("Warning: 'vrdpport' is deprecated. Use 'vrdeport'.\n")); 1286 1290 1287 1291 if (a->argc <= 1 + 1) 1288 1292 { 1289 errorArgument( "Missing argument to '%s'", a->argv[1]);1293 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 1290 1294 rc = E_FAIL; 1291 1295 break; … … 1313 1317 { 1314 1318 if (!strcmp(a->argv[1], "vrdpvideochannelquality")) 1315 RTStrmPrintf(g_pStdErr, "Warning: 'vrdpvideochannelquality' is deprecated. Use 'vrdevideochannelquality'.\n"); 1319 RTStrmPrintf(g_pStdErr, 1320 CloudVM::tr("Warning: 'vrdpvideochannelquality' is deprecated. Use 'vrdevideochannelquality'.\n")); 1316 1321 1317 1322 if (a->argc <= 1 + 1) 1318 1323 { 1319 errorArgument( "Missing argument to '%s'", a->argv[1]);1324 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 1320 1325 rc = E_FAIL; 1321 1326 break; … … 1337 1342 if (a->argc <= 1 + 1) 1338 1343 { 1339 errorArgument( "Missing argument to '%s'", a->argv[1]);1344 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 1340 1345 rc = E_FAIL; 1341 1346 break; … … 1363 1368 else 1364 1369 { 1365 errorArgument( "Invalid vrdeproperty argument '%s'", a->argv[2]);1370 errorArgument(CloudVM::tr("Invalid vrdeproperty argument '%s'"), a->argv[2]); 1366 1371 rc = E_FAIL; 1367 1372 } … … 1370 1375 else 1371 1376 { 1372 RTStrmPrintf(g_pStdErr, "Error: Failed to allocate memory for VRDE property '%s'\n", a->argv[2]); 1377 RTStrmPrintf(g_pStdErr, CloudVM::tr("Error: Failed to allocate memory for VRDE property '%s'\n"), 1378 a->argv[2]); 1373 1379 rc = E_FAIL; 1374 1380 } … … 1384 1390 if (a->argc < 3) 1385 1391 { 1386 errorSyntax(USAGE_CONTROLVM, "Not enough parameters");1392 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Not enough parameters")); 1387 1393 rc = E_FAIL; 1388 1394 break; … … 1390 1396 else if (a->argc == 4 || a->argc > 5) 1391 1397 { 1392 errorSyntax(USAGE_CONTROLVM, "Wrong number of arguments");1398 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Wrong number of arguments")); 1393 1399 rc = E_FAIL; 1394 1400 break; … … 1406 1412 else 1407 1413 { 1408 errorArgument( "Invalid parameter '%s'", a->argv[3]);1414 errorArgument(CloudVM::tr("Invalid parameter '%s'"), a->argv[3]); 1409 1415 rc = E_FAIL; 1410 1416 break; … … 1439 1445 else if (guid.isZero()) 1440 1446 { 1441 errorArgument( "Zero UUID argument '%s'", a->argv[2]);1447 errorArgument(CloudVM::tr("Zero UUID argument '%s'"), a->argv[2]); 1442 1448 rc = E_FAIL; 1443 1449 break; … … 1457 1463 if (a->argc != 5 && a->argc != 6 && a->argc != 7 && a->argc != 9) 1458 1464 { 1459 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1465 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1460 1466 rc = E_FAIL; 1461 1467 break; … … 1476 1482 if (RT_FAILURE(vrc)) 1477 1483 { 1478 errorSyntax(USAGE_CONTROLVM, "Either \"yes\" or \"no\" is expected");1484 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Either \"yes\" or \"no\" is expected")); 1479 1485 rc = E_FAIL; 1480 1486 break; … … 1493 1499 if (!pDisplay) 1494 1500 { 1495 RTMsgError( "Guest not running");1501 RTMsgError(CloudVM::tr("Guest not running")); 1496 1502 rc = E_FAIL; 1497 1503 break; … … 1505 1511 if (a->argc < 4) 1506 1512 { 1507 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1513 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1508 1514 rc = E_FAIL; 1509 1515 break; … … 1514 1520 if (!pDisplay) 1515 1521 { 1516 RTMsgError( "Guest not running");1522 RTMsgError(CloudVM::tr("Guest not running")); 1517 1523 rc = E_FAIL; 1518 1524 break; … … 1541 1547 else 1542 1548 { 1543 errorSyntax(USAGE_CONTROLVM, "Display status must be <on> or <off>");1549 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Display status must be <on> or <off>")); 1544 1550 rc = E_FAIL; 1545 1551 break; … … 1556 1562 if (argc < 7) 1557 1563 { 1558 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1564 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1559 1565 rc = E_FAIL; 1560 1566 break; … … 1600 1606 && strcmp(a->argv[5 + (a->argc - 7)], "-allowlocallogon")) 1601 1607 { 1602 errorArgument( "Invalid parameter '%s'", a->argv[5]);1608 errorArgument(CloudVM::tr("Invalid parameter '%s'"), a->argv[5]); 1603 1609 rc = E_FAIL; 1604 1610 break; … … 1612 1618 && strcmp(a->argv[3], "--passwordfile")))) 1613 1619 { 1614 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1620 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1615 1621 rc = E_FAIL; 1616 1622 break; … … 1637 1643 if (!pGuest) 1638 1644 { 1639 RTMsgError( "Guest not running");1645 RTMsgError(CloudVM::tr("Guest not running")); 1640 1646 rc = E_FAIL; 1641 1647 break; … … 1652 1658 if (a->argc != 3) 1653 1659 { 1654 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1660 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1655 1661 rc = E_FAIL; 1656 1662 break; … … 1673 1679 if (!dvdMedium) 1674 1680 { 1675 errorArgument( "Invalid host DVD drive name \"%s\"",1681 errorArgument(CloudVM::tr("Invalid host DVD drive name \"%s\""), 1676 1682 a->argv[2] + 5); 1677 1683 rc = E_FAIL; … … 1709 1715 else 1710 1716 uuid = Guid().toString(); 1711 CHECK_ERROR(sessionMachine, MountMedium(Bstr( "IDE Controller"), 1, 0, uuid, FALSE /* aForce */));1717 CHECK_ERROR(sessionMachine, MountMedium(Bstr(CloudVM::tr("IDE Controller")), 1, 0, uuid, FALSE /* aForce */)); 1712 1718 } 1713 1719 else if (!strcmp(a->argv[1], "floppyattach")) … … 1716 1722 if (a->argc != 3) 1717 1723 { 1718 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1724 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1719 1725 rc = E_FAIL; 1720 1726 break; … … 1736 1742 if (!floppyMedium) 1737 1743 { 1738 errorArgument( "Invalid host floppy drive name \"%s\"",1744 errorArgument(CloudVM::tr("Invalid host floppy drive name \"%s\""), 1739 1745 a->argv[2] + 5); 1740 1746 rc = E_FAIL; … … 1765 1771 } 1766 1772 floppyMedium->COMGETTER(Id)(uuid.asOutParam()); 1767 CHECK_ERROR(sessionMachine, MountMedium(Bstr( "Floppy Controller"), 0, 0, uuid, FALSE /* aForce */));1773 CHECK_ERROR(sessionMachine, MountMedium(Bstr(CloudVM::tr("Floppy Controller")), 0, 0, uuid, FALSE /* aForce */)); 1768 1774 } 1769 1775 #endif /* obsolete dvdattach/floppyattach */ … … 1772 1778 if (a->argc != 3) 1773 1779 { 1774 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1780 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1775 1781 rc = E_FAIL; 1776 1782 break; … … 1781 1787 if (vrc != VINF_SUCCESS) 1782 1788 { 1783 errorArgument( "Error parsing guest memory balloon size '%s'", a->argv[2]);1789 errorArgument(CloudVM::tr("Error parsing guest memory balloon size '%s'"), a->argv[2]); 1784 1790 rc = E_FAIL; 1785 1791 break; … … 1792 1798 if (!pGuest) 1793 1799 { 1794 RTMsgError( "Guest not running");1800 RTMsgError(CloudVM::tr("Guest not running")); 1795 1801 rc = E_FAIL; 1796 1802 break; … … 1862 1868 1863 1869 rc = showProgress(progress); 1864 CHECK_PROGRESS_ERROR(progress, ( "Teleportation failed"));1870 CHECK_PROGRESS_ERROR(progress, (CloudVM::tr("Teleportation failed"))); 1865 1871 } 1866 1872 else if (!strcmp(a->argv[1], "screenshotpng")) … … 1868 1874 if (a->argc <= 2 || a->argc > 4) 1869 1875 { 1870 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1876 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1871 1877 rc = E_FAIL; 1872 1878 break; … … 1879 1885 if (vrc != VINF_SUCCESS) 1880 1886 { 1881 errorArgument( "Error parsing display number '%s'", a->argv[3]);1887 errorArgument(CloudVM::tr("Error parsing display number '%s'"), a->argv[3]); 1882 1888 rc = E_FAIL; 1883 1889 break; … … 1888 1894 if (!pDisplay) 1889 1895 { 1890 RTMsgError( "Guest not running");1896 RTMsgError(CloudVM::tr("Guest not running")); 1891 1897 rc = E_FAIL; 1892 1898 break; … … 1902 1908 if (RT_FAILURE(vrc)) 1903 1909 { 1904 RTMsgError( "Failed to create file '%s' (%Rrc)", a->argv[2], vrc);1910 RTMsgError(CloudVM::tr("Failed to create file '%s' (%Rrc)"), a->argv[2], vrc); 1905 1911 rc = E_FAIL; 1906 1912 break; … … 1909 1915 if (RT_FAILURE(vrc)) 1910 1916 { 1911 RTMsgError( "Failed to write screenshot to file '%s' (%Rrc)", a->argv[2], vrc);1917 RTMsgError(CloudVM::tr("Failed to write screenshot to file '%s' (%Rrc)"), a->argv[2], vrc); 1912 1918 rc = E_FAIL; 1913 1919 } … … 1920 1926 if (a->argc < 3) 1921 1927 { 1922 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");1928 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 1923 1929 rc = E_FAIL; 1924 1930 break; … … 1980 1986 if (vrc != VINF_SUCCESS) 1981 1987 { 1982 errorArgument( "Error parsing display number '%s'", a->argv[i]);1988 errorArgument(CloudVM::tr("Error parsing display number '%s'"), a->argv[i]); 1983 1989 rc = E_FAIL; 1984 1990 break; … … 1986 1992 if (iScreen >= cMonitors) 1987 1993 { 1988 errorArgument( "Invalid screen ID specified '%u'", iScreen);1994 errorArgument(CloudVM::tr("Invalid screen ID specified '%u'"), iScreen); 1989 1995 rc = E_FAIL; 1990 1996 break; … … 2001 2007 if (a->argc != 4) 2002 2008 { 2003 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2009 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2004 2010 rc = E_FAIL; 2005 2011 break; … … 2014 2020 if (a->argc != 5) 2015 2021 { 2016 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2022 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2017 2023 rc = E_FAIL; 2018 2024 break; … … 2023 2029 if (RT_FAILURE(vrc)) 2024 2030 { 2025 errorArgument( "Error parsing video width '%s'", a->argv[3]);2031 errorArgument(CloudVM::tr("Error parsing video width '%s'"), a->argv[3]); 2026 2032 rc = E_FAIL; 2027 2033 break; … … 2032 2038 if (RT_FAILURE(vrc)) 2033 2039 { 2034 errorArgument( "Error parsing video height '%s'", a->argv[4]);2040 errorArgument(CloudVM::tr("Error parsing video height '%s'"), a->argv[4]); 2035 2041 rc = E_FAIL; 2036 2042 break; … … 2047 2053 if (a->argc != 4) 2048 2054 { 2049 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2055 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2050 2056 rc = E_FAIL; 2051 2057 break; … … 2056 2062 if (RT_FAILURE(vrc)) 2057 2063 { 2058 errorArgument( "Error parsing video rate '%s'", a->argv[3]);2064 errorArgument(CloudVM::tr("Error parsing video rate '%s'"), a->argv[3]); 2059 2065 rc = E_FAIL; 2060 2066 break; … … 2068 2074 if (a->argc != 4) 2069 2075 { 2070 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2076 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2071 2077 rc = E_FAIL; 2072 2078 break; … … 2077 2083 if (RT_FAILURE(vrc)) 2078 2084 { 2079 errorArgument( "Error parsing video FPS '%s'", a->argv[3]);2085 errorArgument(CloudVM::tr("Error parsing video FPS '%s'"), a->argv[3]); 2080 2086 rc = E_FAIL; 2081 2087 break; … … 2089 2095 if (a->argc != 4) 2090 2096 { 2091 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2097 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2092 2098 rc = E_FAIL; 2093 2099 break; … … 2098 2104 if (RT_FAILURE(vrc)) 2099 2105 { 2100 errorArgument( "Error parsing maximum time '%s'", a->argv[3]);2106 errorArgument(CloudVM::tr("Error parsing maximum time '%s'"), a->argv[3]); 2101 2107 rc = E_FAIL; 2102 2108 break; … … 2110 2116 if (a->argc != 4) 2111 2117 { 2112 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2118 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2113 2119 rc = E_FAIL; 2114 2120 break; … … 2119 2125 if (RT_FAILURE(vrc)) 2120 2126 { 2121 errorArgument( "Error parsing maximum file size '%s'", a->argv[3]);2127 errorArgument(CloudVM::tr("Error parsing maximum file size '%s'"), a->argv[3]); 2122 2128 rc = E_FAIL; 2123 2129 break; … … 2131 2137 if (a->argc != 4) 2132 2138 { 2133 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2139 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2134 2140 rc = E_FAIL; 2135 2141 break; … … 2145 2151 if (a->argc < 3) 2146 2152 { 2147 errorArgument( "Missing argument to '%s'", a->argv[1]);2153 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 2148 2154 rc = E_FAIL; 2149 2155 break; … … 2154 2160 if (!pEmulatedUSB) 2155 2161 { 2156 RTMsgError( "Guest not running");2162 RTMsgError(CloudVM::tr("Guest not running")); 2157 2163 rc = E_FAIL; 2158 2164 break; … … 2187 2193 else 2188 2194 { 2189 errorArgument( "Invalid argument to '%s'", a->argv[1]);2195 errorArgument(CloudVM::tr("Invalid argument to '%s'"), a->argv[1]); 2190 2196 rc = E_FAIL; 2191 2197 break; … … 2197 2203 && a->argc != 6) 2198 2204 { 2199 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2205 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2200 2206 break; 2201 2207 } … … 2208 2214 && strcmp(a->argv[5], "no"))) 2209 2215 { 2210 errorSyntax(USAGE_CONTROLVM, "Invalid parameters");2216 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Invalid parameters")); 2211 2217 break; 2212 2218 } … … 2221 2227 { 2222 2228 /* Get password from console. */ 2223 RTEXITCODE rcExit = readPasswordFromConsole(&strPassword, "Enter password:");2229 RTEXITCODE rcExit = readPasswordFromConsole(&strPassword, CloudVM::tr("Enter password:")); 2224 2230 if (rcExit == RTEXITCODE_FAILURE) 2225 2231 break; … … 2230 2236 if (rcExit == RTEXITCODE_FAILURE) 2231 2237 { 2232 RTMsgError( "Failed to read new password from file");2238 RTMsgError(CloudVM::tr("Failed to read new password from file")); 2233 2239 break; 2234 2240 } … … 2241 2247 if (a->argc != 3) 2242 2248 { 2243 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");2249 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Incorrect number of parameters")); 2244 2250 break; 2245 2251 } … … 2261 2267 if (a->argc < 3) 2262 2268 { 2263 errorArgument( "Missing argument to '%s'", a->argv[1]);2269 errorArgument(CloudVM::tr("Missing argument to '%s'"), a->argv[1]); 2264 2270 rc = E_FAIL; 2265 2271 break; … … 2275 2281 if (a->argc != 3) 2276 2282 { 2277 errorArgument( "Incorrect arguments to '%s'", a->argv[1]);2283 errorArgument(CloudVM::tr("Incorrect arguments to '%s'"), a->argv[1]); 2278 2284 rc = E_FAIL; 2279 2285 break; … … 2290 2296 if (a->argc != 4) 2291 2297 { 2292 errorArgument( "Incorrect arguments to '%s'", a->argv[1]);2298 errorArgument(CloudVM::tr("Incorrect arguments to '%s'"), a->argv[1]); 2293 2299 rc = E_FAIL; 2294 2300 break; … … 2331 2337 if (a->argc != 3) 2332 2338 { 2333 errorArgument( "Incorrect arguments to '%s'", a->argv[1]);2339 errorArgument(CloudVM::tr("Incorrect arguments to '%s'"), a->argv[1]); 2334 2340 rc = E_FAIL; 2335 2341 break; … … 2343 2349 if (a->argc != 3) 2344 2350 { 2345 errorArgument( "Incorrect arguments to '%s'", a->argv[1]);2351 errorArgument(CloudVM::tr("Incorrect arguments to '%s'"), a->argv[1]); 2346 2352 rc = E_FAIL; 2347 2353 break; … … 2350 2356 if (enmPriority == VMProcPriority_Invalid) 2351 2357 { 2352 errorArgument( "Invalid vm-process-priority '%s'", a->argv[2]);2358 errorArgument(CloudVM::tr("Invalid vm-process-priority '%s'"), a->argv[2]); 2353 2359 rc = E_FAIL; 2354 2360 } … … 2363 2369 if (a->argc != 3) 2364 2370 { 2365 errorArgument( "Incorrect arguments to '%s'", a->argv[1]);2371 errorArgument(CloudVM::tr("Incorrect arguments to '%s'"), a->argv[1]); 2366 2372 rc = E_FAIL; 2367 2373 break; … … 2377 2383 else 2378 2384 { 2379 errorArgument( "Invalid value '%s'", Utf8Str(a->argv[2]).c_str());2385 errorArgument(CloudVM::tr("Invalid value '%s'"), Utf8Str(a->argv[2]).c_str()); 2380 2386 rc = E_FAIL; 2381 2387 break; … … 2389 2395 if (a->argc != 3) 2390 2396 { 2391 errorArgument( "Incorrect arguments to '%s'", a->argv[1]);2397 errorArgument(CloudVM::tr("Incorrect arguments to '%s'"), a->argv[1]); 2392 2398 rc = E_FAIL; 2393 2399 break; … … 2398 2404 if (RT_FAILURE(vrc) || *pszNext != '\0') 2399 2405 { 2400 errorArgument( "Invalid autostart delay number '%s'", a->argv[2]);2406 errorArgument(CloudVM::tr("Invalid autostart delay number '%s'"), a->argv[2]); 2401 2407 rc = E_FAIL; 2402 2408 break; … … 2409 2415 else 2410 2416 { 2411 errorSyntax(USAGE_CONTROLVM, "Invalid parameter '%s'", a->argv[1]);2417 errorSyntax(USAGE_CONTROLVM, CloudVM::tr("Invalid parameter '%s'"), a->argv[1]); 2412 2418 rc = E_FAIL; 2413 2419 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
r86820 r92372 44 44 using namespace com; 45 45 46 DECLARE_TRANSLATION_CONTEXT(DHCPServer); 46 47 47 48 /********************************************************************************************************************************* … … 61 62 case DHCPD_CMD_COMMON_OPT_NETWORK: \ 62 63 if ((a_pCtx)->pszInterface != NULL) \ 63 return errorSyntax( "Either --network or --interface, not both"); \64 return errorSyntax(DHCPServer::tr("Either --network or --interface, not both")); \ 64 65 (a_pCtx)->pszNetwork = ValueUnion.psz; \ 65 66 break; \ 66 67 case DHCPD_CMD_COMMON_OPT_INTERFACE: \ 67 68 if ((a_pCtx)->pszNetwork != NULL) \ 68 return errorSyntax( "Either --interface or --network, not both"); \69 return errorSyntax(DHCPServer::tr("Either --interface or --network, not both")); \ 69 70 (a_pCtx)->pszInterface = ValueUnion.psz; \ 70 71 break … … 176 177 if (FAILED(hrc)) 177 178 { 178 errorArgument( "Failed to locate host-only interface '%s'", pCtx->pszInterface);179 errorArgument(DHCPServer::tr("Failed to locate host-only interface '%s'"), pCtx->pszInterface); 179 180 return ptrRet; 180 181 } … … 190 191 return ptrRet; 191 192 if (pCtx->pszNetwork) 192 errorArgument( "Failed to find DHCP server for network '%s'", pCtx->pszNetwork);193 errorArgument(DHCPServer::tr("Failed to find DHCP server for network '%s'"), pCtx->pszNetwork); 193 194 else 194 errorArgument( "Failed to find DHCP server for host-only interface '%s' (network '%ls')",195 errorArgument(DHCPServer::tr("Failed to find DHCP server for host-only interface '%s' (network '%ls')"), 195 196 pCtx->pszInterface, bstrNetName.raw()); 196 197 } 197 198 else 198 errorSyntax( "You need to specify either --network or --interface to identify the DHCP server");199 errorSyntax(DHCPServer::tr("You need to specify either --network or --interface to identify the DHCP server")); 199 200 return ptrRet; 200 201 } … … 470 471 case 'g': // --global Sets the option scope to 'global'. 471 472 if (fNeedValueOrRemove) 472 return errorSyntax( "Incomplete option sequence preseeding '--global'");473 return errorSyntax(DHCPServer::tr("Incomplete option sequence preseeding '--global'")); 473 474 Scope.setGlobal(); 474 475 break; … … 476 477 case 'G': // --group 477 478 if (fNeedValueOrRemove) 478 return errorSyntax( "Incomplete option sequence preseeding '--group'");479 return errorSyntax(DHCPServer::tr("Incomplete option sequence preseeding '--group'")); 479 480 if (!*ValueUnion.psz) 480 return errorSyntax( "Group name cannot be empty");481 return errorSyntax(DHCPServer::tr("Group name cannot be empty")); 481 482 Scope.setGroup(ValueUnion.psz); 482 483 break; … … 484 485 case 'E': // --mac-address 485 486 if (fNeedValueOrRemove) 486 return errorSyntax( "Incomplete option sequence preseeding '--mac-address'");487 return errorSyntax(DHCPServer::tr("Incomplete option sequence preseeding '--mac-address'")); 487 488 RTStrPrintf(szMACAddress, sizeof(szMACAddress), "%RTmac", &ValueUnion.MacAddr); 488 489 Scope.setMACAddress(szMACAddress); … … 491 492 case 'M': // --vm Sets the option scope to ValueUnion.psz + 0. 492 493 if (fNeedValueOrRemove) 493 return errorSyntax( "Incomplete option sequence preseeding '--vm'");494 return errorSyntax(DHCPServer::tr("Incomplete option sequence preseeding '--vm'")); 494 495 Scope.setMachineNIC(ValueUnion.psz); 495 496 break; … … 497 498 case 'n': // --nic Sets the option scope to pszVmName + (ValueUnion.u8 - 1). 498 499 if (Scope.getScope() != DHCPConfigScope_MachineNIC) 499 return errorSyntax( "--nic option requires a --vm preceeding selecting the VM it should apply to");500 return errorSyntax(DHCPServer::tr("--nic option requires a --vm preceeding selecting the VM it should apply to")); 500 501 if (fNeedValueOrRemove) 501 return errorSyntax( "Incomplete option sequence preseeding '--nic=%u", ValueUnion.u8);502 return errorSyntax(DHCPServer::tr("Incomplete option sequence preseeding '--nic=%u"), ValueUnion.u8); 502 503 if (ValueUnion.u8 < 1) 503 return errorSyntax( "invalid NIC number: %u", ValueUnion.u8);504 return errorSyntax(DHCPServer::tr("invalid NIC number: %u"), ValueUnion.u8); 504 505 Scope.setMachineSlot(ValueUnion.u8 - 1); 505 506 break; … … 536 537 NULL, &cbRet); 537 538 if (RT_FAILURE(vrc)) 538 return errorArgument("Malformed hex string given to --set-opt-hex %u: %s\n", idAddOpt, ValueUnion.psz); 539 return errorArgument(DHCPServer::tr("Malformed hex string given to --set-opt-hex %u: %s\n"), 540 idAddOpt, ValueUnion.psz); 539 541 if (iPass == 1) 540 542 { … … 550 552 case 'D': // --del-opt num 551 553 if (pCtx->pCmdDef->fSubcommandScope == HELP_SCOPE_DHCPSERVER_ADD) 552 return errorSyntax( "--del-opt does not apply to the 'add' subcommand");554 return errorSyntax(DHCPServer::tr("--del-opt does not apply to the 'add' subcommand")); 553 555 if (iPass == 1) 554 556 { … … 562 564 case DHCP_ADDMOD_UNFORCE_OPTION: // --unforce-opt 563 565 if (pCtx->pCmdDef->fSubcommandScope == HELP_SCOPE_DHCPSERVER_ADD) 564 return errorSyntax( "--unforce-opt does not apply to the 'add' subcommand");566 return errorSyntax(DHCPServer::tr("--unforce-opt does not apply to the 'add' subcommand")); 565 567 RT_FALL_THROUGH(); 566 568 case DHCP_ADDMOD_UNSUPPRESS_OPTION: // --unsupress-opt 567 569 if (pCtx->pCmdDef->fSubcommandScope == HELP_SCOPE_DHCPSERVER_ADD) 568 return errorSyntax( "--unsuppress-opt does not apply to the 'add' subcommand");570 return errorSyntax(DHCPServer::tr("--unsuppress-opt does not apply to the 'add' subcommand")); 569 571 RT_FALL_THROUGH(); 570 572 case DHCP_ADDMOD_FORCE_OPTION: // --force-opt … … 624 626 case DHCP_ADDMOD_ZAP_OPTIONS: 625 627 if (pCtx->pCmdDef->fSubcommandScope == HELP_SCOPE_DHCPSERVER_ADD) 626 return errorSyntax( "--zap-options does not apply to the 'add' subcommand");628 return errorSyntax(DHCPServer::tr("--zap-options does not apply to the 'add' subcommand")); 627 629 if (iPass == 1) 628 630 { … … 666 668 case 'R': // --remove-config 667 669 if (pCtx->pCmdDef->fSubcommandScope == HELP_SCOPE_DHCPSERVER_ADD) 668 return errorSyntax( "--remove-config does not apply to the 'add' subcommand");670 return errorSyntax(DHCPServer::tr("--remove-config does not apply to the 'add' subcommand")); 669 671 if (Scope.getScope() == DHCPConfigScope_Global) 670 return errorSyntax( "--remove-config cannot be applied to the global config");672 return errorSyntax(DHCPServer::tr("--remove-config cannot be applied to the global config")); 671 673 if (iPass == 1) 672 674 { … … 681 683 case 'f': // --fixed-address 682 684 if (Scope.getScope() != DHCPConfigScope_MachineNIC && Scope.getScope() != DHCPConfigScope_MAC) 683 return errorSyntax( "--fixed-address can only be applied to a VM NIC or an MAC address");685 return errorSyntax(DHCPServer::tr("--fixed-address can only be applied to a VM NIC or an MAC address")); 684 686 if (iPass == 1) 685 687 { … … 715 717 { 716 718 if (Scope.getScope() != DHCPConfigScope_Group) 717 return errorSyntax( "A group must be selected to perform condition alterations.");719 return errorSyntax(DHCPServer::tr("A group must be selected to perform condition alterations.")); 718 720 if (!*ValueUnion.psz) 719 return errorSyntax( "Condition value cannot be empty"); /* or can it? */721 return errorSyntax(DHCPServer::tr("Condition value cannot be empty")); /* or can it? */ 720 722 if (iPass != 1) 721 723 break; … … 810 812 } 811 813 if (!fFound) 812 rcExit = RTMsgErrorExitFailure( "Could not find any condition of type %d with value '%s' to delete",814 rcExit = RTMsgErrorExitFailure(DHCPServer::tr("Could not find any condition of type %d with value '%s' to delete"), 813 815 enmType, ValueUnion.psz); 814 816 } … … 818 820 case DHCP_ADDMOD_ZAP_CONDITIONS: 819 821 if (Scope.getScope() != DHCPConfigScope_Group) 820 return errorSyntax( "--zap-conditions can only be with a group selected");822 return errorSyntax(DHCPServer::tr("--zap-conditions can only be with a group selected")); 821 823 if (iPass == 1) 822 824 { … … 837 839 case 'i': // --id 838 840 if (fNeedValueOrRemove) 839 return errorSyntax( "Incomplete option sequence preseeding '--id=%u", ValueUnion.u8);841 return errorSyntax(DHCPServer::tr("Incomplete option sequence preseeding '--id=%u"), ValueUnion.u8); 840 842 u8OptId = ValueUnion.u8; 841 843 fNeedValueOrRemove = true; … … 844 846 case 'p': // --value 845 847 if (!fNeedValueOrRemove) 846 return errorSyntax( "--value without --id=dhcp-opt-no");848 return errorSyntax(DHCPServer::tr("--value without --id=dhcp-opt-no")); 847 849 if (iPass == 1) 848 850 { … … 858 860 case 'r': // --remove 859 861 if (pCtx->pCmdDef->fSubcommandScope == HELP_SCOPE_DHCPSERVER_ADD) 860 return errorSyntax( "--remove does not apply to the 'add' subcommand");862 return errorSyntax(DHCPServer::tr("--remove does not apply to the 'add' subcommand")); 861 863 if (!fNeedValueOrRemove) 862 return errorSyntax( "--remove without --id=dhcp-opt-no");864 return errorSyntax(DHCPServer::tr("--remove without --id=dhcp-opt-no")); 863 865 864 866 if (iPass == 1) … … 885 887 */ 886 888 if (!pCtx->pszNetwork && !pCtx->pszInterface) 887 return errorSyntax( "You need to specify either --network or --interface to identify the DHCP server");889 return errorSyntax(DHCPServer::tr("You need to specify either --network or --interface to identify the DHCP server")); 888 890 889 891 if (pCtx->pCmdDef->fSubcommandScope == HELP_SCOPE_DHCPSERVER_ADD) 890 892 { 891 893 if (!pszServerIp) 892 rcExit = errorSyntax( "Missing required option: --ip");894 rcExit = errorSyntax(DHCPServer::tr("Missing required option: --ip")); 893 895 if (!pszNetmask) 894 rcExit = errorSyntax( "Missing required option: --netmask");896 rcExit = errorSyntax(DHCPServer::tr("Missing required option: --netmask")); 895 897 if (!pszLowerIp) 896 rcExit = errorSyntax( "Missing required option: --lowerip");898 rcExit = errorSyntax(DHCPServer::tr("Missing required option: --lowerip")); 897 899 if (!pszUpperIp) 898 rcExit = errorSyntax( "Missing required option: --upperip");900 rcExit = errorSyntax(DHCPServer::tr("Missing required option: --upperip")); 899 901 if (rcExit != RTEXITCODE_SUCCESS) 900 902 return rcExit; … … 914 916 CHECK_ERROR(host, FindHostNetworkInterfaceByName(Bstr(pCtx->pszInterface).mutableRaw(), hif.asOutParam())); 915 917 if (FAILED(rc)) 916 return errorArgument( "Could not find interface '%s'", pCtx->pszInterface);918 return errorArgument(DHCPServer::tr("Could not find interface '%s'"), pCtx->pszInterface); 917 919 918 920 CHECK_ERROR(hif, COMGETTER(NetworkName) (NetName.asOutParam())); 919 921 if (FAILED(rc)) 920 return errorArgument( "Could not get network name for the interface '%s'", pCtx->pszInterface);922 return errorArgument(DHCPServer::tr("Could not get network name for the interface '%s'"), pCtx->pszInterface); 921 923 } 922 924 else … … 929 931 { 930 932 if (SUCCEEDED(rc)) 931 return errorArgument( "DHCP server already exists");933 return errorArgument(DHCPServer::tr("DHCP server already exists")); 932 934 933 935 CHECK_ERROR(pCtx->pArg->virtualBox, CreateDHCPServer(NetName.mutableRaw(), ptrDHCPServer.asOutParam())); 934 936 if (FAILED(rc)) 935 return errorArgument( "Failed to create the DHCP server");937 return errorArgument(DHCPServer::tr("Failed to create the DHCP server")); 936 938 } 937 939 else if (FAILED(rc)) 938 return errorArgument( "DHCP server does not exist");940 return errorArgument(DHCPServer::tr("DHCP server does not exist")); 939 941 940 942 /* … … 968 970 CHECK_ERROR2_STMT(hrc, ptrDHCPServer, SetConfiguration(bstrServerIp.raw(), bstrNetmask.raw(), 969 971 bstrLowerIp.raw(), bstrUpperIp.raw()), 970 rcExit = errorArgument( "Failed to set configuration (%ls, %ls, %ls, %ls)", bstrServerIp.raw(),972 rcExit = errorArgument(DHCPServer::tr("Failed to set configuration (%ls, %ls, %ls, %ls)"), bstrServerIp.raw(), 971 973 bstrNetmask.raw(), bstrLowerIp.raw(), bstrUpperIp.raw())); 972 974 } … … 1020 1022 if (SUCCEEDED(hrc)) 1021 1023 return RTEXITCODE_SUCCESS; 1022 errorArgument( "Failed to remove server");1024 errorArgument(DHCPServer::tr("Failed to remove server")); 1023 1025 } 1024 1026 return RTEXITCODE_FAILURE; … … 1087 1089 if (SUCCEEDED(hrc)) 1088 1090 return RTEXITCODE_SUCCESS; 1089 errorArgument( "Failed to start the server");1091 errorArgument(DHCPServer::tr("Failed to start the server")); 1090 1092 GlueHandleComErrorNoCtx(ptrDHCPServer, hrc); 1091 1093 } … … 1131 1133 if (SUCCEEDED(hrc)) 1132 1134 return RTEXITCODE_SUCCESS; 1133 errorArgument( "Failed to restart the server");1135 errorArgument(DHCPServer::tr("Failed to restart the server")); 1134 1136 GlueHandleComErrorNoCtx(ptrDHCPServer, hrc); 1135 1137 } … … 1175 1177 if (SUCCEEDED(hrc)) 1176 1178 return RTEXITCODE_SUCCESS; 1177 errorArgument( "Failed to stop the server");1179 errorArgument(DHCPServer::tr("Failed to stop the server")); 1178 1180 GlueHandleComErrorNoCtx(ptrDHCPServer, hrc); 1179 1181 } … … 1222 1224 1223 1225 if (!fHaveMacAddress) 1224 return errorSyntax( "You need to specify a MAC address too look for");1226 return errorSyntax(DHCPServer::tr("You need to specify a MAC address too look for")); 1225 1227 1226 1228 /* … … 1250 1252 RTTimeToStringEx(RTTimeExplode(&Time, RTTimeSpecSetSeconds(&TimeSpec, secExpire)), szExpire, sizeof(szExpire), 0); 1251 1253 1252 RTPrintf( "IP Address: %ls\n"1253 "MAC Address: %RTmac\n"1254 "State: %ls\n"1255 "Issued: %s (%RU64)\n"1256 "Expire: %s (%RU64)\n"1257 "TTL: %RU64 sec, currently %RU64 sec left\n",1254 RTPrintf(DHCPServer::tr("IP Address: %ls\n" 1255 "MAC Address: %RTmac\n" 1256 "State: %ls\n" 1257 "Issued: %s (%RU64)\n" 1258 "Expire: %s (%RU64)\n" 1259 "TTL: %RU64 sec, currently %RU64 sec left\n"), 1258 1260 bstrAddress.raw(), 1259 1261 &MacAddress, … … 1330 1332 return errorNoSubcommand(); 1331 1333 } 1332 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
r89697 r92372 40 40 #include "VBoxManage.h" 41 41 42 DECLARE_TRANSLATION_CONTEXT(DebugVM); 43 42 44 43 45 /** … … 111 113 112 114 if (!cRegisters) 113 return errorSyntax( "The getregisters sub-command takes at least one register name");115 return errorSyntax(DebugVM::tr("The getregisters sub-command takes at least one register name")); 114 116 return RTEXITCODE_SUCCESS; 115 117 } … … 152 154 153 155 if (!pszInfo) 154 return errorSyntax( "Must specify info item to display");156 return errorSyntax(DebugVM::tr("Must specify info item to display")); 155 157 156 158 /* … … 299 301 case 'c': 300 302 if (pszCompression) 301 return errorSyntax( "The --compression option has already been given");303 return errorSyntax(DebugVM::tr("The --compression option has already been given")); 302 304 pszCompression = ValueUnion.psz; 303 305 break; 304 306 case 'f': 305 307 if (pszFilename) 306 return errorSyntax( "The --filename option has already been given");308 return errorSyntax(DebugVM::tr("The --filename option has already been given")); 307 309 pszFilename = ValueUnion.psz; 308 310 break; … … 313 315 314 316 if (!pszFilename) 315 return errorSyntax( "The --filename option is required");317 return errorSyntax(DebugVM::tr("The --filename option is required")); 316 318 317 319 /* … … 321 323 rc = RTPathAbs(pszFilename, szAbsFilename, sizeof(szAbsFilename)); 322 324 if (RT_FAILURE(rc)) 323 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAbs failed on '%s': %Rrc", pszFilename, rc);325 return RTMsgErrorExit(RTEXITCODE_FAILURE, DebugVM::tr("RTPathAbs failed on '%s': %Rrc"), pszFilename, rc); 324 326 325 327 com::Bstr bstrFilename(szAbsFilename); … … 347 349 com::Bstr bstrName; 348 350 CHECK_ERROR2I_RET(pDebugger, DetectOS(bstrName.asOutParam()), RTEXITCODE_FAILURE); 349 RTPrintf( "Detected: %ls\n", bstrName.raw());351 RTPrintf(DebugVM::tr("Detected: %ls\n"), bstrName.raw()); 350 352 return RTEXITCODE_SUCCESS; 351 353 } … … 367 369 com::Bstr bstrVersion; 368 370 CHECK_ERROR2I_RET(pDebugger, COMGETTER(OSVersion)(bstrVersion.asOutParam()), RTEXITCODE_FAILURE); 369 RTPrintf( "Name: %ls\n", bstrName.raw());370 RTPrintf( "Version: %ls\n", bstrVersion.raw());371 RTPrintf(DebugVM::tr("Name: %ls\n"), bstrName.raw()); 372 RTPrintf(DebugVM::tr("Version: %ls\n"), bstrVersion.raw()); 371 373 return RTEXITCODE_SUCCESS; 372 374 } … … 446 448 const char *pszEqual = strchr(ValueUnion.psz, '='); 447 449 if (!pszEqual) 448 return errorSyntax("setregisters expects input on the form 'register=value' got '%s'", ValueUnion.psz); 450 return errorSyntax(DebugVM::tr("setregisters expects input on the form 'register=value' got '%s'"), 451 ValueUnion.psz); 449 452 try 450 453 { … … 457 460 catch (std::bad_alloc &) 458 461 { 459 RTMsgError( "Out of memory\n");462 RTMsgError(DebugVM::tr("Out of memory\n")); 460 463 return RTEXITCODE_FAILURE; 461 464 } … … 469 472 470 473 if (!aBstrNames.size()) 471 return errorSyntax( "The setregisters sub-command takes at least one register name");474 return errorSyntax(DebugVM::tr("The setregisters sub-command takes at least one register name")); 472 475 473 476 /* … … 478 481 { 479 482 CHECK_ERROR2I_RET(pDebugger, SetRegister(idCpu, aBstrNames[0], aBstrValues[0]), RTEXITCODE_FAILURE); 480 RTPrintf( "Successfully set %ls\n", aBstrNames[0]);483 RTPrintf(DebugVM::tr("Successfully set %ls\n"), aBstrNames[0]); 481 484 } 482 485 else … … 484 487 CHECK_ERROR2I_RET(pDebugger, SetRegisters(idCpu, ComSafeArrayAsInParam(aBstrNames), ComSafeArrayAsInParam(aBstrValues)), 485 488 RTEXITCODE_FAILURE); 486 RTPrintf( "Successfully set %u registers\n", aBstrNames.size());489 RTPrintf(DebugVM::tr("Successfully set %u registers\n"), aBstrNames.size()); 487 490 } 488 491 … … 511 514 { 512 515 case DEBUGVM_SHOW_FLAGS_HUMAN_READABLE: RTPrintf(" %27s=%ls\n", pszVar, pbstrValue->raw()); break; 513 case DEBUGVM_SHOW_FLAGS_SH_EXPORT: RTPrintf( "export %s='%ls'\n", pszVar, pbstrValue->raw()); break;516 case DEBUGVM_SHOW_FLAGS_SH_EXPORT: RTPrintf(DebugVM::tr("export %s='%ls'\n"), pszVar, pbstrValue->raw()); break; 514 517 case DEBUGVM_SHOW_FLAGS_SH_EVAL: RTPrintf("%s='%ls'\n", pszVar, pbstrValue->raw()); break; 515 case DEBUGVM_SHOW_FLAGS_CMD_SET: RTPrintf( "set %s=%ls\n", pszVar, pbstrValue->raw()); break;518 case DEBUGVM_SHOW_FLAGS_CMD_SET: RTPrintf(DebugVM::tr("set %s=%ls\n"), pszVar, pbstrValue->raw()); break; 516 519 default: AssertFailed(); 517 520 } … … 528 531 { 529 532 if ((fFlags & DEBUGVM_SHOW_FLAGS_FMT_MASK) == DEBUGVM_SHOW_FLAGS_HUMAN_READABLE) 530 RTPrintf( "Debug logger settings:\n");533 RTPrintf(DebugVM::tr("Debug logger settings:\n")); 531 534 532 535 com::Bstr bstr; … … 552 555 { 553 556 if ((fFlags & DEBUGVM_SHOW_FLAGS_FMT_MASK) == DEBUGVM_SHOW_FLAGS_HUMAN_READABLE) 554 RTPrintf( "Release logger settings:\n");557 RTPrintf(DebugVM::tr("Release logger settings:\n")); 555 558 556 559 com::Bstr bstr; … … 626 629 rcExit = handleDebugVM_Show_LogRelSettings(pDebugger, fFlags); 627 630 else 628 rcExit = errorSyntax( "The show sub-command has no idea what '%s' might be", ValueUnion.psz);631 rcExit = errorSyntax(DebugVM::tr("The show sub-command has no idea what '%s' might be"), ValueUnion.psz); 629 632 if (rcExit != RTEXITCODE_SUCCESS) 630 633 return rcExit; … … 700 703 if (idCpu > 0) 701 704 RTPrintf("\n"); 702 RTPrintf( "====================== CPU #%u ======================\n", idCpu);705 RTPrintf(DebugVM::tr("====================== CPU #%u ======================\n"), idCpu); 703 706 } 704 707 RTPrintf("%ls\n", bstrGuestStack.raw()); … … 747 750 case 'p': 748 751 if (pszPattern) 749 return errorSyntax( "Multiple --pattern options are not permitted");752 return errorSyntax(DebugVM::tr("Multiple --pattern options are not permitted")); 750 753 pszPattern = ValueUnion.psz; 751 754 break; … … 761 764 762 765 if (fReset && fWithDescriptions) 763 return errorSyntax( "The --reset and --descriptions options does not mix");766 return errorSyntax(DebugVM::tr("The --reset and --descriptions options does not mix")); 764 767 765 768 /* … … 831 834 832 835 if (!pszFilename) 833 return errorSyntax( "The --filename is missing");836 return errorSyntax(DebugVM::tr("The --filename is missing")); 834 837 835 838 /* … … 955 958 } 956 959 else 957 RTMsgError( "Machine '%s' is not currently running.\n", pArgs->argv[0]);960 RTMsgError(DebugVM::tr("Machine '%s' is not currently running.\n"), pArgs->argv[0]); 958 961 } 959 962 … … 962 965 return rcExit; 963 966 } 964 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r91352 r92372 54 54 } MEDIUMCATEGORY; 55 55 56 56 DECLARE_TRANSLATION_CONTEXT(Disk); 57 57 58 58 // funcs … … 64 64 RT_NOREF(pvUser); 65 65 RTMsgErrorV(pszFormat, va); 66 RTMsgError( "Error code %Rrc at %s(%u) in function %s", rc, RT_SRC_POS_ARGS);66 RTMsgError(Disk::tr("Error code %Rrc at %s(%u) in function %s"), rc, RT_SRC_POS_ARGS); 67 67 } 68 68 … … 184 184 { 185 185 if (!fSilent) 186 RTMsgError( "Cannot convert filename \"%s\" to absolute path", pszFilenameOrUuid);186 RTMsgError(Disk::tr("Cannot convert filename \"%s\" to absolute path"), pszFilenameOrUuid); 187 187 return E_FAIL; 188 188 } … … 219 219 if (RT_FAILURE(irc)) 220 220 { 221 RTMsgError( "Cannot convert filename \"%s\" to absolute path", pszFilename);221 RTMsgError(Disk::tr("Cannot convert filename \"%s\" to absolute path"), pszFilename); 222 222 return E_FAIL; 223 223 } … … 288 288 if (!m_pszFreeValue) 289 289 { 290 RTMsgError( "Out of memory copying '%s'", m_pszValue);290 RTMsgError(Disk::tr("Out of memory copying '%s'"), m_pszValue); 291 291 throw std::bad_alloc(); 292 292 } … … 328 328 case 'H': // disk 329 329 if (cmd != CMD_NONE) 330 return errorSyntax(USAGE_CREATEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);330 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 331 331 cmd = CMD_DISK; 332 332 break; … … 334 334 case 'D': // DVD 335 335 if (cmd != CMD_NONE) 336 return errorSyntax(USAGE_CREATEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);336 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 337 337 cmd = CMD_DVD; 338 338 break; … … 340 340 case 'L': // floppy 341 341 if (cmd != CMD_NONE) 342 return errorSyntax(USAGE_CREATEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);342 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 343 343 cmd = CMD_FLOPPY; 344 344 break; … … 371 371 char *pszValue = (char *)strchr(ValueUnion.psz, '='); 372 372 if (!pszValue) 373 return RTMsgErrorExitFailure( "Invalid key value pair: No '='.");373 return RTMsgErrorExitFailure(Disk::tr("Invalid key value pair: No '='.")); 374 374 375 375 lstProperties.push_back(MediumProperty()); … … 387 387 vrc = RTFileOpen(&hValueFile, pszValue, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE); 388 388 if (RT_FAILURE(vrc)) 389 return RTMsgErrorExitFailure( "Cannot open replacement value file '%s': %Rrc", pszValue, vrc);389 return RTMsgErrorExitFailure(Disk::tr("Cannot open replacement value file '%s': %Rrc"), pszValue, vrc); 390 390 391 391 uint64_t cbValue = 0; … … 403 403 rNewProp.m_pszFreeValue[rNewProp.m_cbValue] = '\0'; 404 404 else 405 RTMsgError( "Error reading replacement MBR file '%s': %Rrc", pszValue, vrc);405 RTMsgError(Disk::tr("Error reading replacement MBR file '%s': %Rrc"), pszValue, vrc); 406 406 } 407 407 else 408 vrc = RTMsgErrorRc(VERR_NO_MEMORY, "Out of memory reading '%s': %Rrc", pszValue, vrc);408 vrc = RTMsgErrorRc(VERR_NO_MEMORY, Disk::tr("Out of memory reading '%s': %Rrc"), pszValue, vrc); 409 409 } 410 410 else 411 vrc = RTMsgErrorRc(VERR_OUT_OF_RANGE, "Replacement value file '%s' is to big: %Rhcb, max 16MiB", pszValue, cbValue); 411 vrc = RTMsgErrorRc(VERR_OUT_OF_RANGE, 412 Disk::tr("Replacement value file '%s' is to big: %Rhcb, max 16MiB"), 413 pszValue, cbValue); 412 414 } 413 415 else 414 RTMsgError( "Cannot get the size of the value file '%s': %Rrc", pszValue, vrc);416 RTMsgError(Disk::tr("Cannot get the size of the value file '%s': %Rrc"), pszValue, vrc); 415 417 RTFileClose(hValueFile); 416 418 if (RT_FAILURE(vrc)) … … 431 433 vrc = parseMediumVariant(ValueUnion.psz, &enmMediumVariant); 432 434 if (RT_FAILURE(vrc)) 433 return errorArgument( "Invalid medium variant '%s'", ValueUnion.psz);435 return errorArgument(Disk::tr("Invalid medium variant '%s'"), ValueUnion.psz); 434 436 break; 435 437 436 438 case VINF_GETOPT_NOT_OPTION: 437 return errorSyntax(USAGE_CREATEMEDIUM, "Invalid parameter '%s'", ValueUnion.psz);439 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 438 440 439 441 default: … … 441 443 { 442 444 if (RT_C_IS_PRINT(c)) 443 return errorSyntax(USAGE_CREATEMEDIUM, "Invalid option -%c", c);445 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Invalid option -%c"), c); 444 446 else 445 return errorSyntax(USAGE_CREATEMEDIUM, "Invalid option case %i", c);447 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Invalid option case %i"), c); 446 448 } 447 449 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 448 return errorSyntax(USAGE_CREATEMEDIUM, "unknown option: %s\n", ValueUnion.psz);450 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("unknown option: %s\n"), ValueUnion.psz); 449 451 else if (ValueUnion.pDef) 450 452 return errorSyntax(USAGE_CREATEMEDIUM, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 451 453 else 452 return errorSyntax(USAGE_CREATEMEDIUM, "error: %Rrs", c);454 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("error: %Rrs"), c); 453 455 } 454 456 } … … 461 463 { 462 464 if (!filename || !*filename) 463 return errorSyntax(USAGE_CREATEMEDIUM, "Parameters --filename is required");465 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Parameters --filename is required")); 464 466 if ((enmMediumVariant & MediumVariant_VmdkRawDisk) == 0 && size == 0) 465 return errorSyntax(USAGE_CREATEMEDIUM, "Parameters --size is required");467 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Parameters --size is required")); 466 468 if (!format || !*format) 467 469 { … … 481 483 if ( !filename 482 484 || !*filename) 483 return errorSyntax(USAGE_CREATEMEDIUM, "Parameters --filename is required");485 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Parameters --filename is required")); 484 486 size = 0; 485 487 if (cmd != CMD_DISK) 486 return errorSyntax(USAGE_CREATEMEDIUM, "Creating a differencing medium is only supported for hard disks");488 return errorSyntax(USAGE_CREATEMEDIUM, Disk::tr("Creating a differencing medium is only supported for hard disks")); 487 489 enmMediumVariant = MediumVariant_Diff; 488 490 if (!format || !*format) … … 503 505 return RTEXITCODE_FAILURE; 504 506 if (pParentMedium.isNull()) 505 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Invalid parent hard disk reference, avoiding crash");507 return RTMsgErrorExit(RTEXITCODE_FAILURE, Disk::tr("Invalid parent hard disk reference, avoiding crash")); 506 508 MediumState_T state; 507 509 CHECK_ERROR(pParentMedium, COMGETTER(State)(&state)); … … 585 587 } 586 588 if (!fPropertyFound) 587 return RTMsgErrorExit(RTEXITCODE_FAILURE, "The %s is not found in the property list of the requested medium format.", 589 return RTMsgErrorExit(RTEXITCODE_FAILURE, 590 Disk::tr("The %s is not found in the property list of the requested medium format."), 588 591 pszKey); 589 592 if (!fBinary) … … 595 598 HRESULT hrc = bstrBase64Value.base64Encode(it->m_pszValue, it->m_cbValue); 596 599 if (FAILED(hrc)) 597 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Base64 encoding of the property %s failed. (%Rhrc)",600 return RTMsgErrorExit(RTEXITCODE_FAILURE, Disk::tr("Base64 encoding of the property %s failed. (%Rhrc)"), 598 601 pszKey, hrc); 599 602 CHECK_ERROR2I_RET(pMedium, SetProperty(Bstr(pszKey).raw(), bstrBase64Value.raw()), RTEXITCODE_FAILURE); … … 619 622 { 620 623 rc = showProgress(pProgress); 621 CHECK_PROGRESS_ERROR(pProgress, ( "Failed to create medium"));624 CHECK_PROGRESS_ERROR(pProgress, (Disk::tr("Failed to create medium"))); 622 625 } 623 626 } … … 627 630 Bstr uuid; 628 631 CHECK_ERROR(pMedium, COMGETTER(Id)(uuid.asOutParam())); 629 RTPrintf( "Medium created. UUID: %s\n", Utf8Str(uuid).c_str());632 RTPrintf(Disk::tr("Medium created. UUID: %s\n"), Utf8Str(uuid).c_str()); 630 633 631 634 //CHECK_ERROR(pMedium, Close()); … … 696 699 case 'H': // disk 697 700 if (cmd != CMD_NONE) 698 return errorSyntax(USAGE_MODIFYMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);701 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 699 702 cmd = CMD_DISK; 700 703 break; … … 702 705 case 'D': // DVD 703 706 if (cmd != CMD_NONE) 704 return errorSyntax(USAGE_MODIFYMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);707 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 705 708 cmd = CMD_DVD; 706 709 break; … … 708 711 case 'L': // floppy 709 712 if (cmd != CMD_NONE) 710 return errorSyntax(USAGE_MODIFYMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);713 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 711 714 cmd = CMD_FLOPPY; 712 715 break; … … 715 718 vrc = parseMediumType(ValueUnion.psz, &enmMediumType); 716 719 if (RT_FAILURE(vrc)) 717 return errorArgument( "Invalid medium type '%s'", ValueUnion.psz);720 return errorArgument(Disk::tr("Invalid medium type '%s'"), ValueUnion.psz); 718 721 fModifyMediumType = true; 719 722 break; … … 722 725 vrc = parseBool(ValueUnion.psz, &AutoReset); 723 726 if (RT_FAILURE(vrc)) 724 return errorArgument( "Invalid autoreset parameter '%s'", ValueUnion.psz);727 return errorArgument(Disk::tr("Invalid autoreset parameter '%s'"), ValueUnion.psz); 725 728 fModifyAutoReset = true; 726 729 break; … … 745 748 else 746 749 { 747 errorArgument( "Invalid --property argument '%s'", ValueUnion.psz);750 errorArgument(Disk::tr("Invalid --property argument '%s'"), ValueUnion.psz); 748 751 rc = E_FAIL; 749 752 } … … 752 755 else 753 756 { 754 RTStrmPrintf(g_pStdErr, "Error: Failed to allocate memory for medium property '%s'\n", ValueUnion.psz); 757 RTStrmPrintf(g_pStdErr, Disk::tr("Error: Failed to allocate memory for medium property '%s'\n"), 758 ValueUnion.psz); 755 759 rc = E_FAIL; 756 760 } … … 795 799 pszFilenameOrUuid = ValueUnion.psz; 796 800 else 797 return errorSyntax(USAGE_MODIFYMEDIUM, "Invalid parameter '%s'", ValueUnion.psz);801 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 798 802 break; 799 803 … … 802 806 { 803 807 if (RT_C_IS_PRINT(c)) 804 return errorSyntax(USAGE_MODIFYMEDIUM, "Invalid option -%c", c);808 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("Invalid option -%c"), c); 805 809 else 806 return errorSyntax(USAGE_MODIFYMEDIUM, "Invalid option case %i", c);810 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("Invalid option case %i"), c); 807 811 } 808 812 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 809 return errorSyntax(USAGE_MODIFYMEDIUM, "unknown option: %s\n", ValueUnion.psz);813 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("unknown option: %s\n"), ValueUnion.psz); 810 814 else if (ValueUnion.pDef) 811 815 return errorSyntax(USAGE_MODIFYMEDIUM, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 812 816 else 813 return errorSyntax(USAGE_MODIFYMEDIUM, "error: %Rrs", c);817 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("error: %Rrs"), c); 814 818 } 815 819 } … … 819 823 820 824 if (!pszFilenameOrUuid) 821 return errorSyntax(USAGE_MODIFYMEDIUM, "Medium name or UUID required");825 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("Medium name or UUID required")); 822 826 823 827 if (!fModifyMediumType … … 830 834 && !fModifyDescription 831 835 ) 832 return errorSyntax(USAGE_MODIFYMEDIUM, "No operation specified");836 return errorSyntax(USAGE_MODIFYMEDIUM, Disk::tr("No operation specified")); 833 837 834 838 /* Always open the medium if necessary, there is no other way. */ … … 851 855 if (pMedium.isNull()) 852 856 { 853 RTMsgError( "Invalid medium reference, avoiding crash");857 RTMsgError(Disk::tr("Invalid medium reference, avoiding crash")); 854 858 return RTEXITCODE_FAILURE; 855 859 } … … 872 876 if (cbResize > (uint64_t)logicalSize * 1000) 873 877 { 874 RTMsgError( "Error: Attempt to resize the medium from %RU64.%RU64 MB to %RU64.%RU64 MB. Use --resizebyte if this is intended!\n",875 logicalSize / _1M, (logicalSize % _1M) / (_1M / 10), cbResize / _1M, (cbResize % _1M) / (_1M / 10));878 RTMsgError(Disk::tr("Error: Attempt to resize the medium from %RU64.%RU64 MB to %RU64.%RU64 MB. Use --resizebyte if this is intended!\n"), 879 logicalSize / _1M, (logicalSize % _1M) / (_1M / 10), cbResize / _1M, (cbResize % _1M) / (_1M / 10)); 876 880 return RTEXITCODE_FAILURE; 877 881 } … … 906 910 { 907 911 if (rc == E_NOTIMPL) 908 RTMsgError( "Compact medium operation is not implemented!");912 RTMsgError(Disk::tr("Compact medium operation is not implemented!")); 909 913 else if (rc == VBOX_E_NOT_SUPPORTED) 910 RTMsgError( "Compact medium operation for this format is not implemented yet!");914 RTMsgError(Disk::tr("Compact medium operation for this format is not implemented yet!")); 911 915 else if (!pProgress.isNull()) 912 CHECK_PROGRESS_ERROR(pProgress, ( "Failed to compact medium"));916 CHECK_PROGRESS_ERROR(pProgress, (Disk::tr("Failed to compact medium"))); 913 917 else 914 RTMsgError( "Failed to compact medium!");918 RTMsgError(Disk::tr("Failed to compact medium!")); 915 919 } 916 920 } … … 925 929 { 926 930 if (!pProgress.isNull()) 927 CHECK_PROGRESS_ERROR(pProgress, ( "Failed to resize medium"));931 CHECK_PROGRESS_ERROR(pProgress, (Disk::tr("Failed to resize medium"))); 928 932 else if (rc == E_NOTIMPL) 929 RTMsgError( "Resize medium operation is not implemented!");933 RTMsgError(Disk::tr("Resize medium operation is not implemented!")); 930 934 else if (rc == VBOX_E_NOT_SUPPORTED) 931 RTMsgError( "Resize medium operation for this format is not implemented yet!");935 RTMsgError(Disk::tr("Resize medium operation for this format is not implemented yet!")); 932 936 else 933 RTMsgError( "Failed to resize medium!");937 RTMsgError(Disk::tr("Failed to resize medium!")); 934 938 } 935 939 } … … 947 951 { 948 952 rc = showProgress(pProgress); 949 CHECK_PROGRESS_ERROR(pProgress, ( "Failed to move medium"));953 CHECK_PROGRESS_ERROR(pProgress, (Disk::tr("Failed to move medium"))); 950 954 } 951 955 … … 953 957 CHECK_ERROR_BREAK(pMedium, COMGETTER(Id)(uuid.asOutParam())); 954 958 955 RTPrintf( "Move medium with UUID %s finished\n", Utf8Str(uuid).c_str());959 RTPrintf(Disk::tr("Move medium with UUID %s finished\n"), Utf8Str(uuid).c_str()); 956 960 } 957 961 while (0); … … 966 970 Bstr uuid; 967 971 CHECK_ERROR(pMedium, COMGETTER(Id)(uuid.asOutParam())); 968 RTPrintf( "Set new location of medium with UUID %s finished\n", Utf8Str(uuid).c_str());972 RTPrintf(Disk::tr("Set new location of medium with UUID %s finished\n"), Utf8Str(uuid).c_str()); 969 973 } 970 974 … … 973 977 CHECK_ERROR(pMedium, COMSETTER(Description)(Bstr(pszNewLocation).raw())); 974 978 975 RTPrintf( "Medium description has been changed.\n");979 RTPrintf(Disk::tr("Medium description has been changed.\n")); 976 980 } 977 981 … … 1021 1025 case 'd': // disk 1022 1026 if (cmd != CMD_NONE) 1023 return errorSyntax(USAGE_CLONEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);1027 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1024 1028 cmd = CMD_DISK; 1025 1029 break; … … 1027 1031 case 'D': // DVD 1028 1032 if (cmd != CMD_NONE) 1029 return errorSyntax(USAGE_CLONEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);1033 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1030 1034 cmd = CMD_DVD; 1031 1035 break; … … 1033 1037 case 'f': // floppy 1034 1038 if (cmd != CMD_NONE) 1035 return errorSyntax(USAGE_CLONEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);1039 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1036 1040 cmd = CMD_FLOPPY; 1037 1041 break; … … 1056 1060 vrc = parseMediumVariant(ValueUnion.psz, &enmMediumVariant); 1057 1061 if (RT_FAILURE(vrc)) 1058 return errorArgument( "Invalid medium variant '%s'", ValueUnion.psz);1062 return errorArgument(Disk::tr("Invalid medium variant '%s'"), ValueUnion.psz); 1059 1063 break; 1060 1064 … … 1065 1069 pszDst = ValueUnion.psz; 1066 1070 else 1067 return errorSyntax(USAGE_CLONEMEDIUM, "Invalid parameter '%s'", ValueUnion.psz);1071 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 1068 1072 break; 1069 1073 … … 1072 1076 { 1073 1077 if (RT_C_IS_GRAPH(c)) 1074 return errorSyntax(USAGE_CLONEMEDIUM, "unhandled option: -%c", c);1078 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("unhandled option: -%c"), c); 1075 1079 else 1076 return errorSyntax(USAGE_CLONEMEDIUM, "unhandled option: %i", c);1080 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("unhandled option: %i"), c); 1077 1081 } 1078 1082 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 1079 return errorSyntax(USAGE_CLONEMEDIUM, "unknown option: %s", ValueUnion.psz);1083 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("unknown option: %s"), ValueUnion.psz); 1080 1084 else if (ValueUnion.pDef) 1081 1085 return errorSyntax(USAGE_CLONEMEDIUM, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 1082 1086 else 1083 return errorSyntax(USAGE_CLONEMEDIUM, "error: %Rrs", c);1087 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("error: %Rrs"), c); 1084 1088 } 1085 1089 } … … 1088 1092 cmd = CMD_DISK; 1089 1093 if (!pszSrc) 1090 return errorSyntax(USAGE_CLONEMEDIUM, "Mandatory UUID or input file parameter missing");1094 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Mandatory UUID or input file parameter missing")); 1091 1095 if (!pszDst) 1092 return errorSyntax(USAGE_CLONEMEDIUM, "Mandatory output file parameter missing");1096 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Mandatory output file parameter missing")); 1093 1097 if (fExisting && (!format.isEmpty() || enmMediumVariant != MediumVariant_Standard)) 1094 return errorSyntax(USAGE_CLONEMEDIUM, "Specified options which cannot be used with --existing");1098 return errorSyntax(USAGE_CLONEMEDIUM, Disk::tr("Specified options which cannot be used with --existing")); 1095 1099 1096 1100 ComPtr<IMedium> pSrcMedium; … … 1180 1184 1181 1185 rc = showProgress(pProgress); 1182 CHECK_PROGRESS_ERROR_BREAK(pProgress, ( "Failed to clone medium"));1186 CHECK_PROGRESS_ERROR_BREAK(pProgress, (Disk::tr("Failed to clone medium"))); 1183 1187 1184 1188 Bstr uuid; 1185 1189 CHECK_ERROR_BREAK(pDstMedium, COMGETTER(Id)(uuid.asOutParam())); 1186 1190 1187 RTPrintf( "Clone medium created in format '%ls'. UUID: %s\n",1191 RTPrintf(Disk::tr("Clone medium created in format '%ls'. UUID: %s\n"), 1188 1192 format.raw(), Utf8Str(uuid).c_str()); 1189 1193 } … … 1229 1233 case 'u': // --uuid 1230 1234 if (RT_FAILURE(RTUuidFromStr(&uuid, ValueUnion.psz))) 1231 return errorSyntax(USAGE_CONVERTFROMRAW, "Invalid UUID '%s'", ValueUnion.psz);1235 return errorSyntax(USAGE_CONVERTFROMRAW, Disk::tr("Invalid UUID '%s'"), ValueUnion.psz); 1232 1236 pUuid = &uuid; 1233 1237 break; … … 1241 1245 rc = parseMediumVariant(ValueUnion.psz, &enmMediumVariant); 1242 1246 if (RT_FAILURE(rc)) 1243 return errorArgument( "Invalid medium variant '%s'", ValueUnion.psz);1247 return errorArgument(Disk::tr("Invalid medium variant '%s'"), ValueUnion.psz); 1244 1248 /// @todo cleaner solution than assuming 1:1 mapping? 1245 1249 uImageFlags = (unsigned)enmMediumVariant; … … 1257 1261 filesize = ValueUnion.psz; 1258 1262 else 1259 return errorSyntax(USAGE_CONVERTFROMRAW, "Invalid parameter '%s'", ValueUnion.psz);1263 return errorSyntax(USAGE_CONVERTFROMRAW, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 1260 1264 break; 1261 1265 … … 1266 1270 1267 1271 if (!srcfilename || !dstfilename || (fReadFromStdIn && !filesize)) 1268 return errorSyntax(USAGE_CONVERTFROMRAW, "Incorrect number of parameters");1269 RTStrmPrintf(g_pStdErr, "Converting from raw image file=\"%s\" to file=\"%s\"...\n",1272 return errorSyntax(USAGE_CONVERTFROMRAW, Disk::tr("Incorrect number of parameters")); 1273 RTStrmPrintf(g_pStdErr, Disk::tr("Converting from raw image file=\"%s\" to file=\"%s\"...\n"), 1270 1274 srcfilename, dstfilename); 1271 1275 … … 1289 1293 if (RT_FAILURE(rc)) 1290 1294 { 1291 RTMsgError( "Cannot open file \"%s\": %Rrc", srcfilename, rc);1295 RTMsgError(Disk::tr("Cannot open file \"%s\": %Rrc"), srcfilename, rc); 1292 1296 goto out; 1293 1297 } … … 1301 1305 if (RT_FAILURE(rc)) 1302 1306 { 1303 RTMsgError( "Cannot get image size for file \"%s\": %Rrc", srcfilename, rc);1307 RTMsgError(Disk::tr("Cannot get image size for file \"%s\": %Rrc"), srcfilename, rc); 1304 1308 goto out; 1305 1309 } 1306 1310 1307 RTStrmPrintf(g_pStdErr, "Creating %s image with size %RU64 bytes (%RU64MB)...\n", 1308 (uImageFlags & VD_IMAGE_FLAGS_FIXED) ? "fixed" : "dynamic", cbFile, (cbFile + _1M - 1) / _1M); 1311 RTStrmPrintf(g_pStdErr, Disk::tr("Creating %s image with size %RU64 bytes (%RU64MB)...\n"), 1312 (uImageFlags & VD_IMAGE_FLAGS_FIXED) ? Disk::tr("fixed") : Disk::tr("dynamic"), 1313 cbFile, (cbFile + _1M - 1) / _1M); 1309 1314 char pszComment[256]; 1310 RTStrPrintf(pszComment, sizeof(pszComment), "Converted image from %s", srcfilename);1315 RTStrPrintf(pszComment, sizeof(pszComment), Disk::tr("Converted image from %s"), srcfilename); 1311 1316 rc = VDCreate(pVDIfs, VDTYPE_HDD, &pDisk); 1312 1317 if (RT_FAILURE(rc)) 1313 1318 { 1314 RTMsgError( "Cannot create the virtual disk container: %Rrc", rc);1319 RTMsgError(Disk::tr("Cannot create the virtual disk container: %Rrc"), rc); 1315 1320 goto out; 1316 1321 } … … 1330 1335 if (RT_FAILURE(rc)) 1331 1336 { 1332 RTMsgError( "Cannot create the disk image \"%s\": %Rrc", dstfilename, rc);1337 RTMsgError(Disk::tr("Cannot create the disk image \"%s\": %Rrc"), dstfilename, rc); 1333 1338 goto out; 1334 1339 } … … 1340 1345 { 1341 1346 rc = VERR_NO_MEMORY; 1342 RTMsgError( "Out of memory allocating buffers for image \"%s\": %Rrc", dstfilename, rc);1347 RTMsgError(Disk::tr("Out of memory allocating buffers for image \"%s\": %Rrc"), dstfilename, rc); 1343 1348 goto out; 1344 1349 } … … 1359 1364 if (RT_FAILURE(rc)) 1360 1365 { 1361 RTMsgError( "Failed to write to disk image \"%s\": %Rrc", dstfilename, rc);1366 RTMsgError(Disk::tr("Failed to write to disk image \"%s\": %Rrc"), dstfilename, rc); 1362 1367 goto out; 1363 1368 } … … 1388 1393 RTPrintf("UUID: %ls\n", uuid.raw()); 1389 1394 if (pszParentUUID) 1390 RTPrintf( "Parent UUID: %s\n", pszParentUUID);1395 RTPrintf(Disk::tr("Parent UUID: %s\n"), pszParentUUID); 1391 1396 1392 1397 /* check for accessibility */ 1393 1398 MediumState_T enmState; 1394 1399 CHECK_ERROR_BREAK(pMedium, RefreshState(&enmState)); 1395 const char *pszState = "unknown";1400 const char *pszState = Disk::tr("unknown"); 1396 1401 switch (enmState) 1397 1402 { 1398 1403 case MediumState_NotCreated: 1399 pszState = "not created";1404 pszState = Disk::tr("not created"); 1400 1405 break; 1401 1406 case MediumState_Created: 1402 pszState = "created";1407 pszState = Disk::tr("created"); 1403 1408 break; 1404 1409 case MediumState_LockedRead: 1405 pszState = "locked read";1410 pszState = Disk::tr("locked read"); 1406 1411 break; 1407 1412 case MediumState_LockedWrite: 1408 pszState = "locked write";1413 pszState = Disk::tr("locked write"); 1409 1414 break; 1410 1415 case MediumState_Inaccessible: 1411 pszState = "inaccessible";1416 pszState = Disk::tr("inaccessible"); 1412 1417 break; 1413 1418 case MediumState_Creating: 1414 pszState = "creating";1419 pszState = Disk::tr("creating"); 1415 1420 break; 1416 1421 case MediumState_Deleting: 1417 pszState = "deleting";1422 pszState = Disk::tr("deleting"); 1418 1423 break; 1419 1424 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK … … 1421 1426 #endif 1422 1427 } 1423 RTPrintf( "State: %s\n", pszState);1428 RTPrintf(Disk::tr("State: %s\n"), pszState); 1424 1429 1425 1430 if (fOptLong && enmState == MediumState_Inaccessible) … … 1427 1432 Bstr err; 1428 1433 CHECK_ERROR_BREAK(pMedium, COMGETTER(LastAccessError)(err.asOutParam())); 1429 RTPrintf( "Access Error: %ls\n", err.raw());1434 RTPrintf(Disk::tr("Access Error: %ls\n"), err.raw()); 1430 1435 } 1431 1436 … … 1435 1440 pMedium->COMGETTER(Description)(description.asOutParam()); 1436 1441 if (!description.isEmpty()) 1437 RTPrintf( "Description: %ls\n", description.raw());1442 RTPrintf(Disk::tr("Description: %ls\n"), description.raw()); 1438 1443 } 1439 1444 1440 1445 MediumType_T type; 1441 1446 pMedium->COMGETTER(Type)(&type); 1442 const char *typeStr = "unknown";1447 const char *typeStr = Disk::tr("unknown"); 1443 1448 switch (type) 1444 1449 { 1445 1450 case MediumType_Normal: 1446 1451 if (pszParentUUID && Guid(pszParentUUID).isValid()) 1447 typeStr = "normal (differencing)";1452 typeStr = Disk::tr("normal (differencing)"); 1448 1453 else 1449 typeStr = "normal (base)";1454 typeStr = Disk::tr("normal (base)"); 1450 1455 break; 1451 1456 case MediumType_Immutable: 1452 typeStr = "immutable";1457 typeStr = Disk::tr("immutable"); 1453 1458 break; 1454 1459 case MediumType_Writethrough: 1455 typeStr = "writethrough";1460 typeStr = Disk::tr("writethrough"); 1456 1461 break; 1457 1462 case MediumType_Shareable: 1458 typeStr = "shareable";1463 typeStr = Disk::tr("shareable"); 1459 1464 break; 1460 1465 case MediumType_Readonly: 1461 typeStr = "readonly";1466 typeStr = Disk::tr("readonly"); 1462 1467 break; 1463 1468 case MediumType_MultiAttach: 1464 typeStr = "multiattach";1469 typeStr = Disk::tr("multiattach"); 1465 1470 break; 1466 1471 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK … … 1468 1473 #endif 1469 1474 } 1470 RTPrintf( "Type: %s\n", typeStr);1475 RTPrintf(Disk::tr("Type: %s\n"), typeStr); 1471 1476 1472 1477 /* print out information specific for differencing media */ … … 1475 1480 BOOL autoReset = FALSE; 1476 1481 pMedium->COMGETTER(AutoReset)(&autoReset); 1477 RTPrintf( "Auto-Reset: %s\n", autoReset ? "on" : "off");1482 RTPrintf(Disk::tr("Auto-Reset: %s\n"), autoReset ? Disk::tr("on") : Disk::tr("off")); 1478 1483 } 1479 1484 1480 1485 Bstr loc; 1481 1486 pMedium->COMGETTER(Location)(loc.asOutParam()); 1482 RTPrintf( "Location: %ls\n", loc.raw());1487 RTPrintf(Disk::tr("Location: %ls\n"), loc.raw()); 1483 1488 1484 1489 Bstr format; 1485 1490 pMedium->COMGETTER(Format)(format.asOutParam()); 1486 RTPrintf( "Storage format: %ls\n", format.raw());1491 RTPrintf(Disk::tr("Storage format: %ls\n"), format.raw()); 1487 1492 1488 1493 if (fOptLong) … … 1495 1500 variant |= safeArray_variant[i]; 1496 1501 1497 const char *variantStr = "unknown";1502 const char *variantStr = Disk::tr("unknown"); 1498 1503 switch (variant & ~(MediumVariant_Fixed | MediumVariant_Diff)) 1499 1504 { 1500 1505 case MediumVariant_VmdkSplit2G: 1501 variantStr = "split2G";1506 variantStr = Disk::tr("split2G"); 1502 1507 break; 1503 1508 case MediumVariant_VmdkStreamOptimized: 1504 variantStr = "streamOptimized";1509 variantStr = Disk::tr("streamOptimized"); 1505 1510 break; 1506 1511 case MediumVariant_VmdkESX: 1507 variantStr = "ESX";1512 variantStr = Disk::tr("ESX"); 1508 1513 break; 1509 1514 case MediumVariant_Standard: 1510 variantStr = "default";1515 variantStr = Disk::tr("default"); 1511 1516 break; 1512 1517 } 1513 const char *variantTypeStr = "dynamic";1518 const char *variantTypeStr = Disk::tr("dynamic"); 1514 1519 if (variant & MediumVariant_Fixed) 1515 variantTypeStr = "fixed";1520 variantTypeStr = Disk::tr("fixed"); 1516 1521 else if (variant & MediumVariant_Diff) 1517 variantTypeStr = "differencing";1518 RTPrintf( "Format variant: %s %s\n", variantTypeStr, variantStr);1522 variantTypeStr = Disk::tr("differencing"); 1523 RTPrintf(Disk::tr("Format variant: %s %s\n"), variantTypeStr, variantStr); 1519 1524 } 1520 1525 1521 1526 LONG64 logicalSize; 1522 1527 pMedium->COMGETTER(LogicalSize)(&logicalSize); 1523 RTPrintf( "Capacity: %lld MBytes\n", logicalSize >> 20);1528 RTPrintf(Disk::tr("Capacity: %lld MBytes\n"), logicalSize >> 20); 1524 1529 if (fOptLong) 1525 1530 { 1526 1531 LONG64 actualSize; 1527 1532 pMedium->COMGETTER(Size)(&actualSize); 1528 RTPrintf( "Size on disk: %lld MBytes\n", actualSize >> 20);1533 RTPrintf(Disk::tr("Size on disk: %lld MBytes\n"), actualSize >> 20); 1529 1534 } 1530 1535 … … 1534 1539 if (SUCCEEDED(rc2)) 1535 1540 { 1536 RTPrintf( "Encryption: enabled\n");1541 RTPrintf(Disk::tr("Encryption: enabled\n")); 1537 1542 if (fOptLong) 1538 1543 { 1539 RTPrintf( "Cipher: %ls\n", strCipher.raw());1540 RTPrintf( "Password ID: %ls\n", strPasswordId.raw());1544 RTPrintf(Disk::tr("Cipher: %ls\n"), strCipher.raw()); 1545 RTPrintf(Disk::tr("Password ID: %ls\n"), strPasswordId.raw()); 1541 1546 } 1542 1547 } 1543 1548 else 1544 RTPrintf( "Encryption: disabled\n");1549 RTPrintf(Disk::tr("Encryption: disabled\n")); 1545 1550 1546 1551 if (fOptLong) … … 1558 1563 value = values[i]; 1559 1564 RTPrintf("%s%ls=%ls\n", 1560 fFirst ? "Property: ": " ",1565 fFirst ? Disk::tr("Property: ") : " ", 1561 1566 names[i], value.raw()); 1562 1567 fFirst = false; … … 1579 1584 pMachine->COMGETTER(Id)(uuid.asOutParam()); 1580 1585 RTPrintf("%s%ls (UUID: %ls)", 1581 fFirst ? "In use by VMs: ": " ",1586 fFirst ? Disk::tr("In use by VMs: ") : " ", 1582 1587 name.raw(), machineIds[i]); 1583 1588 fFirst = false; … … 1614 1619 pChild->COMGETTER(Id)(childUUID.asOutParam()); 1615 1620 RTPrintf("%s%ls\n", 1616 fFirst ? "Child UUIDs: ": " ",1621 fFirst ? Disk::tr("Child UUIDs: ") : " ", 1617 1622 childUUID.raw()); 1618 1623 fFirst = false; … … 1655 1660 case 'd': // disk 1656 1661 if (cmd != CMD_NONE) 1657 return errorSyntax(USAGE_SHOWMEDIUMINFO, "Only one command can be specified: '%s'", ValueUnion.psz);1662 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1658 1663 cmd = CMD_DISK; 1659 1664 break; … … 1661 1666 case 'D': // DVD 1662 1667 if (cmd != CMD_NONE) 1663 return errorSyntax(USAGE_SHOWMEDIUMINFO, "Only one command can be specified: '%s'", ValueUnion.psz);1668 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1664 1669 cmd = CMD_DVD; 1665 1670 break; … … 1667 1672 case 'f': // floppy 1668 1673 if (cmd != CMD_NONE) 1669 return errorSyntax(USAGE_SHOWMEDIUMINFO, "Only one command can be specified: '%s'", ValueUnion.psz);1674 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1670 1675 cmd = CMD_FLOPPY; 1671 1676 break; … … 1675 1680 pszFilenameOrUuid = ValueUnion.psz; 1676 1681 else 1677 return errorSyntax(USAGE_SHOWMEDIUMINFO, "Invalid parameter '%s'", ValueUnion.psz);1682 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 1678 1683 break; 1679 1684 … … 1682 1687 { 1683 1688 if (RT_C_IS_PRINT(c)) 1684 return errorSyntax(USAGE_SHOWMEDIUMINFO, "Invalid option -%c", c);1689 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("Invalid option -%c"), c); 1685 1690 else 1686 return errorSyntax(USAGE_SHOWMEDIUMINFO, "Invalid option case %i", c);1691 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("Invalid option case %i"), c); 1687 1692 } 1688 1693 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 1689 return errorSyntax(USAGE_SHOWMEDIUMINFO, "unknown option: %s\n", ValueUnion.psz);1694 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("unknown option: %s\n"), ValueUnion.psz); 1690 1695 else if (ValueUnion.pDef) 1691 1696 return errorSyntax(USAGE_SHOWMEDIUMINFO, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 1692 1697 else 1693 return errorSyntax(USAGE_SHOWMEDIUMINFO, "error: %Rrs", c);1698 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("error: %Rrs"), c); 1694 1699 } 1695 1700 } … … 1700 1705 /* check for required options */ 1701 1706 if (!pszFilenameOrUuid) 1702 return errorSyntax(USAGE_SHOWMEDIUMINFO, "Medium name or UUID required");1707 return errorSyntax(USAGE_SHOWMEDIUMINFO, Disk::tr("Medium name or UUID required")); 1703 1708 1704 1709 HRESULT rc = S_OK; /* Prevents warning. */ … … 1720 1725 return RTEXITCODE_FAILURE; 1721 1726 1722 Utf8Str strParentUUID( "base");1727 Utf8Str strParentUUID(Disk::tr("base")); 1723 1728 ComPtr<IMedium> pParent; 1724 1729 pMedium->COMGETTER(Parent)(pParent.asOutParam()); … … 1767 1772 case 'd': // disk 1768 1773 if (cmd != CMD_NONE) 1769 return errorSyntax(USAGE_CLOSEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);1774 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1770 1775 cmd = CMD_DISK; 1771 1776 break; … … 1773 1778 case 'D': // DVD 1774 1779 if (cmd != CMD_NONE) 1775 return errorSyntax(USAGE_CLOSEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);1780 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1776 1781 cmd = CMD_DVD; 1777 1782 break; … … 1779 1784 case 'f': // floppy 1780 1785 if (cmd != CMD_NONE) 1781 return errorSyntax(USAGE_CLOSEMEDIUM, "Only one command can be specified: '%s'", ValueUnion.psz);1786 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 1782 1787 cmd = CMD_FLOPPY; 1783 1788 break; … … 1791 1796 pszFilenameOrUuid = ValueUnion.psz; 1792 1797 else 1793 return errorSyntax(USAGE_CLOSEMEDIUM, "Invalid parameter '%s'", ValueUnion.psz);1798 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 1794 1799 break; 1795 1800 … … 1798 1803 { 1799 1804 if (RT_C_IS_PRINT(c)) 1800 return errorSyntax(USAGE_CLOSEMEDIUM, "Invalid option -%c", c);1805 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("Invalid option -%c"), c); 1801 1806 else 1802 return errorSyntax(USAGE_CLOSEMEDIUM, "Invalid option case %i", c);1807 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("Invalid option case %i"), c); 1803 1808 } 1804 1809 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 1805 return errorSyntax(USAGE_CLOSEMEDIUM, "unknown option: %s\n", ValueUnion.psz);1810 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("unknown option: %s\n"), ValueUnion.psz); 1806 1811 else if (ValueUnion.pDef) 1807 1812 return errorSyntax(USAGE_CLOSEMEDIUM, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 1808 1813 else 1809 return errorSyntax(USAGE_CLOSEMEDIUM, "error: %Rrs", c);1814 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("error: %Rrs"), c); 1810 1815 } 1811 1816 } … … 1815 1820 cmd = CMD_DISK; 1816 1821 if (!pszFilenameOrUuid) 1817 return errorSyntax(USAGE_CLOSEMEDIUM, "Medium name or UUID required");1822 return errorSyntax(USAGE_CLOSEMEDIUM, Disk::tr("Medium name or UUID required")); 1818 1823 1819 1824 ComPtr<IMedium> pMedium; … … 1840 1845 { 1841 1846 rc = showProgress(pProgress); 1842 CHECK_PROGRESS_ERROR(pProgress, ( "Failed to delete medium"));1847 CHECK_PROGRESS_ERROR(pProgress, (Disk::tr("Failed to delete medium"))); 1843 1848 } 1844 1849 else 1845 RTMsgError( "Failed to delete medium. Error code %Rrc", rc);1850 RTMsgError(Disk::tr("Failed to delete medium. Error code %Rrc"), rc); 1846 1851 } 1847 1852 CHECK_ERROR(pMedium, Close()); … … 1879 1884 else 1880 1885 { 1881 AssertMsgFailed(( "unexpected parameter %s\n", pszCmd));1886 AssertMsgFailed((Disk::tr("unexpected parameter %s\n"), pszCmd)); 1882 1887 cmd = CMD_DISK; 1883 1888 } … … 1892 1897 1893 1898 if (a->argc == 0) 1894 return errorSyntax(USAGE_MEDIUMPROPERTY, "Missing action");1899 return errorSyntax(USAGE_MEDIUMPROPERTY, Disk::tr("Missing action")); 1895 1900 1896 1901 pszAction = a->argv[0]; … … 1898 1903 && RTStrICmp(pszAction, "get") 1899 1904 && RTStrICmp(pszAction, "delete")) 1900 return errorSyntax(USAGE_MEDIUMPROPERTY, "Invalid action given: %s", pszAction);1905 return errorSyntax(USAGE_MEDIUMPROPERTY, Disk::tr("Invalid action given: %s"), pszAction); 1901 1906 1902 1907 if ( ( !RTStrICmp(pszAction, "set") … … 1904 1909 || ( RTStrICmp(pszAction, "set") 1905 1910 && a->argc != 3)) 1906 return errorSyntax(USAGE_MEDIUMPROPERTY, "Invalid number of arguments given for action: %s", pszAction);1911 return errorSyntax(USAGE_MEDIUMPROPERTY, Disk::tr("Invalid number of arguments given for action: %s"), pszAction); 1907 1912 1908 1913 pszFilenameOrUuid = a->argv[1]; … … 2003 2008 pszFilenameOrUuid = ValueUnion.psz; 2004 2009 else 2005 return errorSyntax(USAGE_ENCRYPTMEDIUM, "Invalid parameter '%s'", ValueUnion.psz);2010 return errorSyntax(USAGE_ENCRYPTMEDIUM, Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 2006 2011 break; 2007 2012 … … 2010 2015 { 2011 2016 if (RT_C_IS_PRINT(c)) 2012 return errorSyntax(USAGE_ENCRYPTMEDIUM, "Invalid option -%c", c);2017 return errorSyntax(USAGE_ENCRYPTMEDIUM, Disk::tr("Invalid option -%c"), c); 2013 2018 else 2014 return errorSyntax(USAGE_ENCRYPTMEDIUM, "Invalid option case %i", c);2019 return errorSyntax(USAGE_ENCRYPTMEDIUM, Disk::tr("Invalid option case %i"), c); 2015 2020 } 2016 2021 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 2017 return errorSyntax(USAGE_ENCRYPTMEDIUM, "unknown option: %s\n", ValueUnion.psz);2022 return errorSyntax(USAGE_ENCRYPTMEDIUM, Disk::tr("unknown option: %s\n"), ValueUnion.psz); 2018 2023 else if (ValueUnion.pDef) 2019 2024 return errorSyntax(USAGE_ENCRYPTMEDIUM, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 2020 2025 else 2021 return errorSyntax(USAGE_ENCRYPTMEDIUM, "error: %Rrs", c);2026 return errorSyntax(USAGE_ENCRYPTMEDIUM, Disk::tr("error: %Rrs"), c); 2022 2027 } 2023 2028 } 2024 2029 2025 2030 if (!pszFilenameOrUuid) 2026 return errorSyntax(USAGE_ENCRYPTMEDIUM, "Disk name or UUID required");2031 return errorSyntax(USAGE_ENCRYPTMEDIUM, Disk::tr("Disk name or UUID required")); 2027 2032 2028 2033 if (!pszPasswordNew && !pszPasswordOld) 2029 return errorSyntax(USAGE_ENCRYPTMEDIUM, "No password specified");2034 return errorSyntax(USAGE_ENCRYPTMEDIUM, Disk::tr("No password specified")); 2030 2035 2031 2036 if ( (pszPasswordNew && !pszNewPasswordId) 2032 2037 || (!pszPasswordNew && pszNewPasswordId)) 2033 return errorSyntax(USAGE_ENCRYPTMEDIUM, "A new password must always have a valid identifier set at the same time"); 2038 return errorSyntax(USAGE_ENCRYPTMEDIUM, 2039 Disk::tr("A new password must always have a valid identifier set at the same time")); 2034 2040 2035 2041 if (pszPasswordNew) … … 2038 2044 { 2039 2045 /* Get password from console. */ 2040 RTEXITCODE rcExit = readPasswordFromConsole(&strPasswordNew, "Enter new password:");2046 RTEXITCODE rcExit = readPasswordFromConsole(&strPasswordNew, Disk::tr("Enter new password:")); 2041 2047 if (rcExit == RTEXITCODE_FAILURE) 2042 2048 return rcExit; … … 2047 2053 if (rcExit == RTEXITCODE_FAILURE) 2048 2054 { 2049 RTMsgError( "Failed to read new password from file");2055 RTMsgError(Disk::tr("Failed to read new password from file")); 2050 2056 return rcExit; 2051 2057 } … … 2058 2064 { 2059 2065 /* Get password from console. */ 2060 RTEXITCODE rcExit = readPasswordFromConsole(&strPasswordOld, "Enter old password:");2066 RTEXITCODE rcExit = readPasswordFromConsole(&strPasswordOld, Disk::tr("Enter old password:")); 2061 2067 if (rcExit == RTEXITCODE_FAILURE) 2062 2068 return rcExit; … … 2067 2073 if (rcExit == RTEXITCODE_FAILURE) 2068 2074 { 2069 RTMsgError( "Failed to read old password from file");2075 RTMsgError(Disk::tr("Failed to read old password from file")); 2070 2076 return rcExit; 2071 2077 } … … 2080 2086 return RTEXITCODE_FAILURE; 2081 2087 if (hardDisk.isNull()) 2082 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Invalid hard disk reference, avoiding crash");2088 return RTMsgErrorExit(RTEXITCODE_FAILURE, Disk::tr("Invalid hard disk reference, avoiding crash")); 2083 2089 2084 2090 ComPtr<IProgress> progress; … … 2091 2097 { 2092 2098 if (rc == E_NOTIMPL) 2093 RTMsgError( "Encrypt hard disk operation is not implemented!");2099 RTMsgError(Disk::tr("Encrypt hard disk operation is not implemented!")); 2094 2100 else if (rc == VBOX_E_NOT_SUPPORTED) 2095 RTMsgError( "Encrypt hard disk operation for this cipher is not implemented yet!");2101 RTMsgError(Disk::tr("Encrypt hard disk operation for this cipher is not implemented yet!")); 2096 2102 else if (!progress.isNull()) 2097 CHECK_PROGRESS_ERROR(progress, ( "Failed to encrypt hard disk"));2103 CHECK_PROGRESS_ERROR(progress, (Disk::tr("Failed to encrypt hard disk"))); 2098 2104 else 2099 RTMsgError( "Failed to encrypt hard disk!");2105 RTMsgError(Disk::tr("Failed to encrypt hard disk!")); 2100 2106 } 2101 2107 … … 2111 2117 2112 2118 if (a->argc != 2) 2113 return errorSyntax(USAGE_MEDIUMENCCHKPWD, "Invalid number of arguments: %d", a->argc);2119 return errorSyntax(USAGE_MEDIUMENCCHKPWD, Disk::tr("Invalid number of arguments: %d"), a->argc); 2114 2120 2115 2121 pszFilenameOrUuid = a->argv[0]; … … 2118 2124 { 2119 2125 /* Get password from console. */ 2120 RTEXITCODE rcExit = readPasswordFromConsole(&strPassword, "Enter password:");2126 RTEXITCODE rcExit = readPasswordFromConsole(&strPassword, Disk::tr("Enter password:")); 2121 2127 if (rcExit == RTEXITCODE_FAILURE) 2122 2128 return rcExit; … … 2127 2133 if (rcExit == RTEXITCODE_FAILURE) 2128 2134 { 2129 RTMsgError( "Failed to read password from file");2135 RTMsgError(Disk::tr("Failed to read password from file")); 2130 2136 return rcExit; 2131 2137 } … … 2139 2145 return RTEXITCODE_FAILURE; 2140 2146 if (hardDisk.isNull()) 2141 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Invalid hard disk reference, avoiding crash");2147 return RTMsgErrorExit(RTEXITCODE_FAILURE, Disk::tr("Invalid hard disk reference, avoiding crash")); 2142 2148 2143 2149 CHECK_ERROR(hardDisk, CheckEncryptionPassword(Bstr(strPassword).raw())); 2144 2150 if (SUCCEEDED(rc)) 2145 RTPrintf( "The given password is correct\n");2151 RTPrintf(Disk::tr("The given password is correct\n")); 2146 2152 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 2147 2153 } … … 2221 2227 */ 2222 2228 if (pCommonOpts->enmDeviceType == DeviceType_Null) 2223 return errorSyntax( "No medium specified!");2229 return errorSyntax(Disk::tr("No medium specified!")); 2224 2230 2225 2231 /* … … 2232 2238 RTEXITCODE rcExit; 2233 2239 if (pCommonOpts->pszPasswordFile[0] == '-' && pCommonOpts->pszPasswordFile[1] == '\0') 2234 rcExit = readPasswordFromConsole(&strPassword, "Enter encryption password:");2240 rcExit = readPasswordFromConsole(&strPassword, Disk::tr("Enter encryption password:")); 2235 2241 else 2236 2242 rcExit = readPasswordFile(pCommonOpts->pszPasswordFile, &strPassword); … … 2384 2390 int vrc = RTStrmOpen(pszOutput, fHex ? "wt" : "wb", &pOut); 2385 2391 if (RT_FAILURE(vrc)) 2386 rcExit = RTMsgErrorExitFailure( "Error opening '%s' for writing: %Rrc", pszOutput, vrc);2392 rcExit = RTMsgErrorExitFailure(Disk::tr("Error opening '%s' for writing: %Rrc"), pszOutput, vrc); 2387 2393 } 2388 2394 else … … 2400 2406 if (off >= cbMedium) 2401 2407 { 2402 RTMsgWarning( "Specified offset (%#RX64) is beyond the end of the medium (%#RX64)", off, cbMedium);2408 RTMsgWarning(Disk::tr("Specified offset (%#RX64) is beyond the end of the medium (%#RX64)"), off, cbMedium); 2403 2409 cb = 0; 2404 2410 } … … 2430 2436 if (FAILED(hrc)) 2431 2437 { 2432 RTStrPrintf(szLine, sizeof(szLine), "Read(%zu bytes at %#RX64)", cbToRead, off);2438 RTStrPrintf(szLine, sizeof(szLine), Disk::tr("Read(%zu bytes at %#RX64)", "", cbToRead), cbToRead, off); 2433 2439 com::GlueHandleComError(ptrMediumIO, szLine, hrc, __FILE__, __LINE__); 2434 2440 break; … … 2459 2465 if (cDuplicates > 0) 2460 2466 { 2461 RTStrmPrintf(pOut, "********** <ditto x %RU64>\n", cDuplicates);2467 RTStrmPrintf(pOut, Disk::tr("********** <ditto x %RU64>\n"), cDuplicates); 2462 2468 cDuplicates = 0; 2463 2469 } … … 2508 2514 if (RT_FAILURE(vrc)) 2509 2515 { 2510 rcExit = RTMsgErrorExitFailure( "Error writing to '%s': %Rrc", pszOutput, vrc);2516 rcExit = RTMsgErrorExitFailure(Disk::tr("Error writing to '%s': %Rrc"), pszOutput, vrc); 2511 2517 break; 2512 2518 } … … 2516 2522 if (cbReturned != cbToRead) 2517 2523 { 2518 rcExit = RTMsgErrorExitFailure("Expected read() at offset %RU64 (%#RX64) to return %#zx bytes, only got %#zx!\n", 2524 rcExit = RTMsgErrorExitFailure(Disk::tr("Expected read() at offset %RU64 (%#RX64) to return %#zx bytes, only got %#zx!\n", 2525 "", cbReturned), 2519 2526 off, off, cbReturned, cbToRead); 2520 2527 break; … … 2531 2538 int vrc = RTStrmClose(pOut); 2532 2539 if (RT_FAILURE(vrc)) 2533 rcExit = RTMsgErrorExitFailure( "Error closing '%s': %Rrc", pszOutput, vrc);2540 rcExit = RTMsgErrorExitFailure(Disk::tr("Error closing '%s': %Rrc"), pszOutput, vrc); 2534 2541 } 2535 2542 else if (!fHex) … … 2579 2586 int vrc = parseMediumVariant(ValueUnion.psz, &enmMediumVariant); 2580 2587 if (RT_FAILURE(vrc)) 2581 return errorArgument( "Invalid medium variant '%s'", ValueUnion.psz);2588 return errorArgument(Disk::tr("Invalid medium variant '%s'"), ValueUnion.psz); 2582 2589 break; 2583 2590 } … … 2604 2611 int vrc = RTStrmOpen(pszOutput, "wb", &pOut); 2605 2612 if (RT_FAILURE(vrc)) 2606 rcExit = RTMsgErrorExitFailure( "Error opening '%s' for writing: %Rrc", pszOutput, vrc);2613 rcExit = RTMsgErrorExitFailure(Disk::tr("Error opening '%s' for writing: %Rrc"), pszOutput, vrc); 2607 2614 } 2608 2615 else … … 2648 2655 if (RT_FAILURE(vrc)) 2649 2656 { 2650 rcExit = RTMsgErrorExitFailure( "Error writing to '%s': %Rrc", pszOutput, vrc);2657 rcExit = RTMsgErrorExitFailure(Disk::tr("Error writing to '%s': %Rrc"), pszOutput, vrc); 2651 2658 break; 2652 2659 } … … 2669 2676 int vrc = RTStrmClose(pOut); 2670 2677 if (RT_FAILURE(vrc)) 2671 rcExit = RTMsgErrorExitFailure( "Error closing '%s': %Rrc", pszOutput, vrc);2678 rcExit = RTMsgErrorExitFailure(Disk::tr("Error closing '%s': %Rrc"), pszOutput, vrc); 2672 2679 } 2673 2680 else -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r89981 r92372 65 65 66 66 using namespace com; 67 68 67 69 68 /********************************************************************************************************************************* … … 218 217 #endif /* VBOX_ONLY_DOCS */ 219 218 219 DECLARE_TRANSLATION_CONTEXT(GuestCtrl); 220 220 221 221 void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope) … … 233 233 if (~fAnonSubCmds & fSubcommandScope) 234 234 RTStrmPrintf(pStrm, 235 "%s guestcontrol %s <uuid|vmname> [--verbose|-v] [--quiet|-q]\n"236 " [--user[name] <name>] [--domain <domain>]\n"237 " [--passwordfile <file> | --password <password>]\n%s",235 GuestCtrl::tr("%s guestcontrol %s <uuid|vmname> [--verbose|-v] [--quiet|-q]\n" 236 " [--user[name] <name>] [--domain <domain>]\n" 237 " [--passwordfile <file> | --password <password>]\n%s"), 238 238 pcszSep1, pcszSep2, (fSubcommandScope & RTMSGREFENTRYSTR_SCOPE_MASK) == RTMSGREFENTRYSTR_SCOPE_GLOBAL ? "\n" : ""); 239 239 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RUN) 240 240 RTStrmPrintf(pStrm, 241 " run [common-options]\n"242 " [--exe <path to executable>] [--timeout <msec>]\n"243 " [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]\n"244 " [--ignore-operhaned-processes] [--profile]\n"245 " [--no-wait-stdout|--wait-stdout]\n"246 " [--no-wait-stderr|--wait-stderr]\n"247 " [--dos2unix] [--unix2dos]\n"248 " -- <program/arg0> [argument1] ... [argumentN]]\n"249 "\n");241 GuestCtrl::tr(" run [common-options]\n" 242 " [--exe <path to executable>] [--timeout <msec>]\n" 243 " [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]\n" 244 " [--ignore-operhaned-processes] [--profile]\n" 245 " [--no-wait-stdout|--wait-stdout]\n" 246 " [--no-wait-stderr|--wait-stderr]\n" 247 " [--dos2unix] [--unix2dos]\n" 248 " -- <program/arg0> [argument1] ... [argumentN]]\n" 249 "\n")); 250 250 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_START) 251 251 RTStrmPrintf(pStrm, 252 " start [common-options]\n"253 " [--exe <path to executable>] [--timeout <msec>]\n"254 " [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]\n"255 " [--ignore-operhaned-processes] [--profile]\n"256 " -- <program/arg0> [argument1] ... [argumentN]]\n"257 "\n");252 GuestCtrl::tr(" start [common-options]\n" 253 " [--exe <path to executable>] [--timeout <msec>]\n" 254 " [-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]\n" 255 " [--ignore-operhaned-processes] [--profile]\n" 256 " -- <program/arg0> [argument1] ... [argumentN]]\n" 257 "\n")); 258 258 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_COPYFROM) 259 259 RTStrmPrintf(pStrm, 260 " copyfrom [common-options]\n"261 " [--follow] [-R|--recursive]\n"262 " <guest-src0> [guest-src1 [...]] <host-dst>\n"263 "\n"264 " copyfrom [common-options]\n"265 " [--follow] [-R|--recursive]\n"266 " [--target-directory <host-dst-dir>]\n"267 " <guest-src0> [guest-src1 [...]]\n"268 "\n");260 GuestCtrl::tr(" copyfrom [common-options]\n" 261 " [--follow] [-R|--recursive]\n" 262 " <guest-src0> [guest-src1 [...]] <host-dst>\n" 263 "\n" 264 " copyfrom [common-options]\n" 265 " [--follow] [-R|--recursive]\n" 266 " [--target-directory <host-dst-dir>]\n" 267 " <guest-src0> [guest-src1 [...]]\n" 268 "\n")); 269 269 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_COPYTO) 270 270 RTStrmPrintf(pStrm, 271 " copyto [common-options]\n"272 " [--follow] [-R|--recursive]\n"273 " <host-src0> [host-src1 [...]] <guest-dst>\n"274 "\n"275 " copyto [common-options]\n"276 " [--follow] [-R|--recursive]\n"277 " [--target-directory <guest-dst>]\n"278 " <host-src0> [host-src1 [...]]\n"279 "\n");271 GuestCtrl::tr(" copyto [common-options]\n" 272 " [--follow] [-R|--recursive]\n" 273 " <host-src0> [host-src1 [...]] <guest-dst>\n" 274 "\n" 275 " copyto [common-options]\n" 276 " [--follow] [-R|--recursive]\n" 277 " [--target-directory <guest-dst>]\n" 278 " <host-src0> [host-src1 [...]]\n" 279 "\n")); 280 280 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MKDIR) 281 281 RTStrmPrintf(pStrm, 282 " mkdir|createdir[ectory] [common-options]\n"283 " [--parents] [--mode <mode>]\n"284 " <guest directory> [...]\n"285 "\n");282 GuestCtrl::tr(" mkdir|createdir[ectory] [common-options]\n" 283 " [--parents] [--mode <mode>]\n" 284 " <guest directory> [...]\n" 285 "\n")); 286 286 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RMDIR) 287 287 RTStrmPrintf(pStrm, 288 " rmdir|removedir[ectory] [common-options]\n"289 " [-R|--recursive]\n"290 " <guest directory> [...]\n"291 "\n");288 GuestCtrl::tr(" rmdir|removedir[ectory] [common-options]\n" 289 " [-R|--recursive]\n" 290 " <guest directory> [...]\n" 291 "\n")); 292 292 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_RM) 293 293 RTStrmPrintf(pStrm, 294 " removefile|rm [common-options] [-f|--force]\n"295 " <guest file> [...]\n"296 "\n");294 GuestCtrl::tr(" removefile|rm [common-options] [-f|--force]\n" 295 " <guest file> [...]\n" 296 "\n")); 297 297 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MV) 298 298 RTStrmPrintf(pStrm, 299 " mv|move|ren[ame] [common-options]\n"300 " <source> [source1 [...]] <dest>\n"301 "\n");299 GuestCtrl::tr(" mv|move|ren[ame] [common-options]\n" 300 " <source> [source1 [...]] <dest>\n" 301 "\n")); 302 302 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_MKTEMP) 303 303 RTStrmPrintf(pStrm, 304 " mktemp|createtemp[orary] [common-options]\n"305 " [--secure] [--mode <mode>] [--tmpdir <directory>]\n"306 " <template>\n"307 "\n");304 GuestCtrl::tr(" mktemp|createtemp[orary] [common-options]\n" 305 " [--secure] [--mode <mode>] [--tmpdir <directory>]\n" 306 " <template>\n" 307 "\n")); 308 308 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_STAT) 309 309 RTStrmPrintf(pStrm, 310 " stat [common-options]\n"311 " <file> [...]\n"312 "\n");310 GuestCtrl::tr(" stat [common-options]\n" 311 " <file> [...]\n" 312 "\n")); 313 313 314 314 /* … … 324 324 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_LIST) 325 325 RTStrmPrintf(pStrm, 326 " list <all|sessions|processes|files> [common-opts]\n"327 "\n");326 GuestCtrl::tr(" list <all|sessions|processes|files> [common-opts]\n" 327 "\n")); 328 328 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_CLOSEPROCESS) 329 329 RTStrmPrintf(pStrm, 330 " closeprocess [common-options]\n"331 " < --session-id <ID>\n"332 " | --session-name <name or pattern>\n"333 " <PID1> [PID1 [...]]\n"334 "\n");330 GuestCtrl::tr(" closeprocess [common-options]\n" 331 " < --session-id <ID>\n" 332 " | --session-name <name or pattern>\n" 333 " <PID1> [PID1 [...]]\n" 334 "\n")); 335 335 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_CLOSESESSION) 336 336 RTStrmPrintf(pStrm, 337 " closesession [common-options]\n"338 " < --all | --session-id <ID>\n"339 " | --session-name <name or pattern> >\n"340 "\n");337 GuestCtrl::tr(" closesession [common-options]\n" 338 " < --all | --session-id <ID>\n" 339 " | --session-name <name or pattern> >\n" 340 "\n")); 341 341 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_UPDATEGA) 342 342 RTStrmPrintf(pStrm, 343 " updatega|updateguestadditions|updateadditions\n"344 " [--source <guest additions .ISO>]\n"345 " [--wait-start] [common-options]\n"346 " [-- [<argument1>] ... [<argumentN>]]\n"347 "\n");343 GuestCtrl::tr(" updatega|updateguestadditions|updateadditions\n" 344 " [--source <guest additions .ISO>]\n" 345 " [--wait-start] [common-options]\n" 346 " [-- [<argument1>] ... [<argumentN>]]\n" 347 "\n")); 348 348 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_WATCH) 349 349 RTStrmPrintf(pStrm, 350 " watch [--timeout <msec>] [common-options]\n"351 "\n");350 GuestCtrl::tr(" watch [--timeout <msec>] [common-options]\n" 351 "\n")); 352 352 if (fSubcommandScope & HELP_SCOPE_GSTCTRL_WAITRUNLEVEL) 353 353 RTStrmPrintf(pStrm, 354 " waitrunlevel [--timeout <msec>] [common-options]\n"355 " <system|userland|desktop>\n"356 "\n");354 GuestCtrl::tr(" waitrunlevel [--timeout <msec>] [common-options]\n" 355 " <system|userland|desktop>\n" 356 "\n")); 357 357 } 358 358 } … … 413 413 { 414 414 rc = RTErrConvertFromWin32(GetLastError()); 415 RTMsgError( "Unable to install console control handler, rc=%Rrc\n", rc);415 RTMsgError(GuestCtrl::tr("Unable to install console control handler, rc=%Rrc\n"), rc); 416 416 } 417 417 #else … … 440 440 { 441 441 rc = RTErrConvertFromWin32(GetLastError()); 442 RTMsgError( "Unable to uninstall console control handler, rc=%Rrc\n", rc);442 RTMsgError(GuestCtrl::tr("Unable to uninstall console control handler, rc=%Rrc\n"), rc); 443 443 } 444 444 #else … … 467 467 { 468 468 case ProcessStatus_Starting: 469 return "starting";469 return GuestCtrl::tr("starting"); 470 470 case ProcessStatus_Started: 471 return "started";471 return GuestCtrl::tr("started"); 472 472 case ProcessStatus_Paused: 473 return "paused";473 return GuestCtrl::tr("paused"); 474 474 case ProcessStatus_Terminating: 475 return "terminating";475 return GuestCtrl::tr("terminating"); 476 476 case ProcessStatus_TerminatedNormally: 477 return "successfully terminated";477 return GuestCtrl::tr("successfully terminated"); 478 478 case ProcessStatus_TerminatedSignal: 479 return "terminated by signal";479 return GuestCtrl::tr("terminated by signal"); 480 480 case ProcessStatus_TerminatedAbnormally: 481 return "abnormally aborted";481 return GuestCtrl::tr("abnormally aborted"); 482 482 case ProcessStatus_TimedOutKilled: 483 return "timed out";483 return GuestCtrl::tr("timed out"); 484 484 case ProcessStatus_TimedOutAbnormally: 485 return "timed out, hanging";485 return GuestCtrl::tr("timed out, hanging"); 486 486 case ProcessStatus_Down: 487 return "killed";487 return GuestCtrl::tr("killed"); 488 488 case ProcessStatus_Error: 489 return "error";489 return GuestCtrl::tr("error"); 490 490 default: 491 491 break; 492 492 } 493 return "unknown";493 return GuestCtrl::tr("unknown"); 494 494 } 495 495 … … 502 502 { 503 503 case ProcessWaitResult_Start: 504 return "started";504 return GuestCtrl::tr("started"); 505 505 case ProcessWaitResult_Terminate: 506 return "terminated";506 return GuestCtrl::tr("terminated"); 507 507 case ProcessWaitResult_Status: 508 return "status changed";508 return GuestCtrl::tr("status changed"); 509 509 case ProcessWaitResult_Error: 510 return "error";510 return GuestCtrl::tr("error"); 511 511 case ProcessWaitResult_Timeout: 512 return "timed out";512 return GuestCtrl::tr("timed out"); 513 513 case ProcessWaitResult_StdIn: 514 return "stdin ready";514 return GuestCtrl::tr("stdin ready"); 515 515 case ProcessWaitResult_StdOut: 516 return "data on stdout";516 return GuestCtrl::tr("data on stdout"); 517 517 case ProcessWaitResult_StdErr: 518 return "data on stderr";518 return GuestCtrl::tr("data on stderr"); 519 519 case ProcessWaitResult_WaitFlagNotSupported: 520 return "waiting flag not supported";520 return GuestCtrl::tr("waiting flag not supported"); 521 521 default: 522 522 break; 523 523 } 524 return "unknown";524 return GuestCtrl::tr("unknown"); 525 525 } 526 526 … … 533 533 { 534 534 case GuestSessionStatus_Starting: 535 return "starting";535 return GuestCtrl::tr("starting"); 536 536 case GuestSessionStatus_Started: 537 return "started";537 return GuestCtrl::tr("started"); 538 538 case GuestSessionStatus_Terminating: 539 return "terminating";539 return GuestCtrl::tr("terminating"); 540 540 case GuestSessionStatus_Terminated: 541 return "terminated";541 return GuestCtrl::tr("terminated"); 542 542 case GuestSessionStatus_TimedOutKilled: 543 return "timed out";543 return GuestCtrl::tr("timed out"); 544 544 case GuestSessionStatus_TimedOutAbnormally: 545 return "timed out, hanging";545 return GuestCtrl::tr("timed out, hanging"); 546 546 case GuestSessionStatus_Down: 547 return "killed";547 return GuestCtrl::tr("killed"); 548 548 case GuestSessionStatus_Error: 549 return "error";549 return GuestCtrl::tr("error"); 550 550 default: 551 551 break; 552 552 } 553 return "unknown";553 return GuestCtrl::tr("unknown"); 554 554 } 555 555 … … 562 562 { 563 563 case FileStatus_Opening: 564 return "opening";564 return GuestCtrl::tr("opening"); 565 565 case FileStatus_Open: 566 return "open";566 return GuestCtrl::tr("open"); 567 567 case FileStatus_Closing: 568 return "closing";568 return GuestCtrl::tr("closing"); 569 569 case FileStatus_Closed: 570 return "closed";570 return GuestCtrl::tr("closed"); 571 571 case FileStatus_Down: 572 return "killed";572 return GuestCtrl::tr("killed"); 573 573 case FileStatus_Error: 574 return "error";574 return GuestCtrl::tr("error"); 575 575 default: 576 576 break; 577 577 } 578 return "unknown";578 return GuestCtrl::tr("unknown"); 579 579 } 580 580 … … 586 586 switch (enmType) 587 587 { 588 case FsObjType_Unknown: return "unknown";589 case FsObjType_Fifo: return "fifo";590 case FsObjType_DevChar: return "char-device";591 case FsObjType_Directory: return "directory";592 case FsObjType_DevBlock: return "block-device";593 case FsObjType_File: return "file";594 case FsObjType_Symlink: return "symlink";595 case FsObjType_Socket: return "socket";596 case FsObjType_WhiteOut: return "white-out";588 case FsObjType_Unknown: return GuestCtrl::tr("unknown"); 589 case FsObjType_Fifo: return GuestCtrl::tr("fifo"); 590 case FsObjType_DevChar: return GuestCtrl::tr("char-device"); 591 case FsObjType_Directory: return GuestCtrl::tr("directory"); 592 case FsObjType_DevBlock: return GuestCtrl::tr("block-device"); 593 case FsObjType_File: return GuestCtrl::tr("file"); 594 case FsObjType_Symlink: return GuestCtrl::tr("symlink"); 595 case FsObjType_Socket: return GuestCtrl::tr("socket"); 596 case FsObjType_WhiteOut: return GuestCtrl::tr("white-out"); 597 597 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 598 598 case FsObjType_32BitHack: break; 599 599 #endif 600 600 } 601 return "unknown";601 return GuestCtrl::tr("unknown"); 602 602 } 603 603 … … 613 613 else 614 614 { 615 RTMsgError( "Error details:");615 RTMsgError(GuestCtrl::tr("Error details:")); 616 616 GluePrintErrorInfo(errorInfo); 617 617 } 618 618 return VERR_GENERAL_FAILURE; /** @todo */ 619 619 } 620 AssertMsgFailedReturn(( "Object has indicated no error (%Rhrc)!?\n", errorInfo.getResultCode()),620 AssertMsgFailedReturn((GuestCtrl::tr("Object has indicated no error (%Rhrc)!?\n"), errorInfo.getResultCode()), 621 621 VERR_INVALID_PARAMETER); 622 622 } … … 650 650 } while(0); 651 651 652 AssertMsgStmt(SUCCEEDED(rc), ( "Could not lookup progress information\n"), vrc = VERR_COM_UNEXPECTED);652 AssertMsgStmt(SUCCEEDED(rc), (GuestCtrl::tr("Could not lookup progress information\n")), vrc = VERR_COM_UNEXPECTED); 653 653 654 654 return vrc; … … 709 709 catch (std::bad_alloc &) 710 710 { 711 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Out of memory");711 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Out of memory")); 712 712 } 713 713 } … … 737 737 pCtx->strUsername = pValueUnion->psz; 738 738 else 739 RTMsgWarning( "The --username|-u option is ignored by '%s'", pCtx->pCmdDef->pszName);739 RTMsgWarning(GuestCtrl::tr("The --username|-u option is ignored by '%s'"), pCtx->pCmdDef->pszName); 740 740 break; 741 741 … … 744 744 { 745 745 if (pCtx->strPassword.isNotEmpty()) 746 RTMsgWarning( "Password is given more than once.");746 RTMsgWarning(GuestCtrl::tr("Password is given more than once.")); 747 747 pCtx->strPassword = pValueUnion->psz; 748 748 } 749 749 else 750 RTMsgWarning( "The --password option is ignored by '%s'", pCtx->pCmdDef->pszName);750 RTMsgWarning(GuestCtrl::tr("The --password option is ignored by '%s'"), pCtx->pCmdDef->pszName); 751 751 break; 752 752 … … 755 755 rcExit = readPasswordFile(pValueUnion->psz, &pCtx->strPassword); 756 756 else 757 RTMsgWarning( "The --password-file|-p option is ignored by '%s'", pCtx->pCmdDef->pszName);757 RTMsgWarning(GuestCtrl::tr("The --password-file|-p option is ignored by '%s'"), pCtx->pCmdDef->pszName); 758 758 break; 759 759 … … 762 762 pCtx->strDomain = pValueUnion->psz; 763 763 else 764 RTMsgWarning( "The --domain option is ignored by '%s'", pCtx->pCmdDef->pszName);764 RTMsgWarning(GuestCtrl::tr("The --domain option is ignored by '%s'"), pCtx->pCmdDef->pszName); 765 765 break; 766 766 … … 827 827 } 828 828 else 829 RTMsgError( "Failed to get a IConsole pointer for the machine. Is it still running?\n");829 RTMsgError(GuestCtrl::tr("Failed to get a IConsole pointer for the machine. Is it still running?\n")); 830 830 } 831 831 } 832 832 } 833 833 else if (SUCCEEDED(rc)) 834 RTMsgError( "Machine \"%s\" is not running (currently %s)!\n",834 RTMsgError(GuestCtrl::tr("Machine \"%s\" is not running (currently %s)!\n"), 835 835 pCtx->pszVmNameOrUuid, machineStateToName(enmMachineState, false)); 836 836 } … … 861 861 char *pszSessionName; 862 862 if (RTStrAPrintf(&pszSessionName, 863 "[%RU32] VBoxManage Guest Control [%s] - %s",863 GuestCtrl::tr("[%RU32] VBoxManage Guest Control [%s] - %s"), 864 864 RTProcSelf(), pCtx->pszVmNameOrUuid, pCtx->pCmdDef->pszName) < 0) 865 return RTMsgErrorExit(RTEXITCODE_FAILURE, "No enough memory for session name");865 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("No enough memory for session name")); 866 866 867 867 /* … … 869 869 */ 870 870 if (pCtx->cVerbose) 871 RTPrintf( "Creating guest session as user '%s'...\n", pCtx->strUsername.c_str());871 RTPrintf(GuestCtrl::tr("Creating guest session as user '%s'...\n"), pCtx->strUsername.c_str()); 872 872 try 873 873 { … … 880 880 catch (std::bad_alloc &) 881 881 { 882 RTMsgError( "Out of memory setting up IGuest::CreateSession call");882 RTMsgError(GuestCtrl::tr("Out of memory setting up IGuest::CreateSession call")); 883 883 rc = E_OUTOFMEMORY; 884 884 } … … 889 889 */ 890 890 if (pCtx->cVerbose) 891 RTPrintf( "Waiting for guest session to start...\n");891 RTPrintf(GuestCtrl::tr("Waiting for guest session to start...\n")); 892 892 GuestSessionWaitResult_T enmWaitResult = GuestSessionWaitResult_None; /* Shut up MSC */ 893 893 try … … 901 901 catch (std::bad_alloc &) 902 902 { 903 RTMsgError( "Out of memory setting up IGuestSession::WaitForArray call");903 RTMsgError(GuestCtrl::tr("Out of memory setting up IGuestSession::WaitForArray call")); 904 904 rc = E_OUTOFMEMORY; 905 905 } … … 917 917 { 918 918 if (pCtx->cVerbose) 919 RTPrintf( "Successfully started guest session (ID %RU32)\n", pCtx->uSessionID);919 RTPrintf(GuestCtrl::tr("Successfully started guest session (ID %RU32)\n"), pCtx->uSessionID); 920 920 RTStrFree(pszSessionName); 921 921 return RTEXITCODE_SUCCESS; … … 926 926 GuestSessionStatus_T enmSessionStatus; 927 927 CHECK_ERROR(pCtx->pGuestSession, COMGETTER(Status)(&enmSessionStatus)); 928 RTMsgError( "Error starting guest session (current status is: %s)\n",929 SUCCEEDED(rc) ? gctlGuestSessionStatusToText(enmSessionStatus) : "<unknown>");928 RTMsgError(GuestCtrl::tr("Error starting guest session (current status is: %s)\n"), 929 SUCCEEDED(rc) ? gctlGuestSessionStatusToText(enmSessionStatus) : GuestCtrl::tr("<unknown>")); 930 930 } 931 931 } … … 986 986 } 987 987 else 988 rcExit = errorSyntaxEx(USAGE_GUESTCONTROL, pCtx->pCmdDef->fSubcommandScope, "No user name specified!");988 rcExit = errorSyntaxEx(USAGE_GUESTCONTROL, pCtx->pCmdDef->fSubcommandScope, GuestCtrl::tr("No user name specified!")); 989 989 990 990 pCtx->fPostOptionParsingInited = rcExit == RTEXITCODE_SUCCESS; … … 1026 1026 { 1027 1027 if (pCtx->cVerbose) 1028 RTPrintf( "Closing guest session ...\n");1028 RTPrintf(GuestCtrl::tr("Closing guest session ...\n")); 1029 1029 1030 1030 CHECK_ERROR(pCtx->pGuestSession, Close()); … … 1032 1032 else if ( pCtx->fDetachGuestSession 1033 1033 && pCtx->cVerbose) 1034 RTPrintf( "Guest session detached\n");1034 RTPrintf(GuestCtrl::tr("Guest session detached\n")); 1035 1035 1036 1036 pCtx->pGuestSession.setNull(); … … 1193 1193 vrc = RTVfsIoStrmWrite(hVfsIosDst, pbBuf, cbOutputData, true /*fBlocking*/, NULL); 1194 1194 if (RT_FAILURE(vrc)) 1195 RTMsgError( "Unable to write output, rc=%Rrc\n", vrc);1195 RTMsgError(GuestCtrl::tr("Unable to write output, rc=%Rrc\n"), vrc); 1196 1196 } 1197 1197 } … … 1223 1223 if (enmTransformation != kStreamTransform_None) 1224 1224 { 1225 RTMsgWarning( "Unsupported %s line ending conversion", pszName);1225 RTMsgWarning(GuestCtrl::tr("Unsupported %s line ending conversion"), pszName); 1226 1226 /** @todo Implement dos2unix and unix2dos stream filters. */ 1227 1227 } 1228 1228 return true; 1229 1229 } 1230 RTMsgWarning( "Error getting %s handle: %Rrc", pszName, vrc);1230 RTMsgWarning(GuestCtrl::tr("Error getting %s handle: %Rrc"), pszName, vrc); 1231 1231 } 1232 1232 else /* If disabled, all goes to / gets fed to/from the bit bucket. */ … … 1354 1354 || ValueUnion.psz[0] == '=') 1355 1355 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN, 1356 "Invalid argument variable[=value]: '%s'", ValueUnion.psz);1356 GuestCtrl::tr("Invalid argument variable[=value]: '%s'"), ValueUnion.psz); 1357 1357 aEnv.push_back(Bstr(ValueUnion.psz).raw()); 1358 1358 break; … … 1364 1364 case kGstCtrlRunOpt_NoProfile: 1365 1365 /** @todo Deprecated, will be removed. */ 1366 RTPrintf( "Warning: Deprecated option \"--no-profile\" specified\n");1366 RTPrintf(GuestCtrl::tr("Warning: Deprecated option \"--no-profile\" specified\n")); 1367 1367 break; 1368 1368 … … 1430 1430 /* Must have something to execute. */ 1431 1431 if (!pszImage || !*pszImage) 1432 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN, "No executable specified!");1432 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RUN, GuestCtrl::tr("No executable specified!")); 1433 1433 1434 1434 /* … … 1482 1482 { 1483 1483 if (cMsTimeout == 0) 1484 RTPrintf( "Starting guest process ...\n");1484 RTPrintf(GuestCtrl::tr("Starting guest process ...\n")); 1485 1485 else 1486 RTPrintf( "Starting guest process (within %ums)\n", cMsTimeout);1486 RTPrintf(GuestCtrl::tr("Starting guest process (within %ums)\n"), cMsTimeout); 1487 1487 } 1488 1488 ComPtr<IGuestProcess> pProcess; … … 1506 1506 CHECK_ERROR_BREAK(pProcess, COMGETTER(PID)(&uPID)); 1507 1507 if (fRunCmd && pCtx->cVerbose) 1508 RTPrintf( "Process '%s' (PID %RU32) started\n", pszImage, uPID);1508 RTPrintf(GuestCtrl::tr("Process '%s' (PID %RU32) started\n"), pszImage, uPID); 1509 1509 else if (!fRunCmd && pCtx->cVerbose) 1510 1510 { 1511 1511 /* Just print plain PID to make it easier for scripts 1512 1512 * invoking VBoxManage. */ 1513 RTPrintf( "[%RU32 - Session %RU32]\n", uPID, pCtx->uSessionID);1513 RTPrintf(GuestCtrl::tr("[%RU32 - Session %RU32]\n"), uPID, pCtx->uSessionID); 1514 1514 } 1515 1515 … … 1532 1532 &waitResult)); 1533 1533 if (pCtx->cVerbose) 1534 RTPrintf( "waitResult: %d\n", waitResult);1534 RTPrintf(GuestCtrl::tr("waitResult: %d\n"), waitResult); 1535 1535 switch (waitResult) 1536 1536 { … … 1548 1548 case ProcessWaitResult_Terminate: 1549 1549 if (pCtx->cVerbose) 1550 RTPrintf( "Process terminated\n");1550 RTPrintf(GuestCtrl::tr("Process terminated\n")); 1551 1551 /* Process terminated, we're done. */ 1552 1552 fCompleted = true; … … 1625 1625 { 1626 1626 if (pCtx->cVerbose) 1627 RTPrintf( "Process execution aborted!\n");1627 RTPrintf(GuestCtrl::tr("Process execution aborted!\n")); 1628 1628 rcExit = EXITCODEEXEC_CANCELED; 1629 1629 } … … 1631 1631 { 1632 1632 if (pCtx->cVerbose) 1633 RTPrintf( "Process successfully started!\n");1633 RTPrintf(GuestCtrl::tr("Process successfully started!\n")); 1634 1634 rcExit = RTEXITCODE_SUCCESS; 1635 1635 } … … 1645 1645 CHECK_ERROR_BREAK(pProcess, COMGETTER(ExitCode)(&lExitCode)); 1646 1646 if (pCtx->cVerbose) 1647 RTPrintf( "Exit code=%u (Status=%u [%s])\n",1647 RTPrintf(GuestCtrl::tr("Exit code=%u (Status=%u [%s])\n"), 1648 1648 lExitCode, procStatus, gctlProcessStatusToText(procStatus)); 1649 1649 … … 1654 1654 { 1655 1655 if (pCtx->cVerbose) 1656 RTPrintf( "Process timed out (guest side) and %s\n",1656 RTPrintf(GuestCtrl::tr("Process timed out (guest side) and %s\n"), 1657 1657 procStatus == ProcessStatus_TimedOutAbnormally 1658 ? "failed to terminate so far" : "was terminated");1658 ? GuestCtrl::tr("failed to terminate so far") : GuestCtrl::tr("was terminated")); 1659 1659 rcExit = EXITCODEEXEC_TIMEOUT; 1660 1660 } … … 1662 1662 { 1663 1663 if (pCtx->cVerbose) 1664 RTPrintf("Process now is in status [%s] (unexpected)\n", gctlProcessStatusToText(procStatus)); 1664 RTPrintf(GuestCtrl::tr("Process now is in status [%s] (unexpected)\n"), 1665 gctlProcessStatusToText(procStatus)); 1665 1666 rcExit = RTEXITCODE_FAILURE; 1666 1667 } … … 1669 1670 { 1670 1671 if (pCtx->cVerbose) 1671 RTPrintf( "Process monitor loop quit with vrc=%Rrc\n", vrc);1672 RTPrintf(GuestCtrl::tr("Process monitor loop quit with vrc=%Rrc\n"), vrc); 1672 1673 rcExit = RTEXITCODE_FAILURE; 1673 1674 } … … 1675 1676 { 1676 1677 if (pCtx->cVerbose) 1677 RTPrintf( "Process monitor loop timed out\n");1678 RTPrintf(GuestCtrl::tr("Process monitor loop timed out\n")); 1678 1679 rcExit = EXITCODEEXEC_TIMEOUT; 1679 1680 } … … 1790 1791 1791 1792 if (!cSources) 1792 return errorSyntaxEx(USAGE_GUESTCONTROL, uUsage, "No sources specified!");1793 return errorSyntaxEx(USAGE_GUESTCONTROL, uUsage, GuestCtrl::tr("No sources specified!")); 1793 1794 1794 1795 /* Unless a --target-directory is given, the last argument is the destination, so … … 1798 1799 1799 1800 if (pszDst == NULL) 1800 return errorSyntaxEx(USAGE_GUESTCONTROL, uUsage, "No destination specified!");1801 return errorSyntaxEx(USAGE_GUESTCONTROL, uUsage, GuestCtrl::tr("No destination specified!")); 1801 1802 1802 1803 char szAbsDst[RTPATH_MAX]; … … 1807 1808 pszDst = szAbsDst; 1808 1809 else 1809 return RTMsgErrorExitFailure( "RTPathAbs failed on '%s': %Rrc", pszDst, vrc);1810 return RTMsgErrorExitFailure(GuestCtrl::tr("RTPathAbs failed on '%s': %Rrc"), pszDst, vrc); 1810 1811 } 1811 1812 … … 1820 1821 { 1821 1822 if (fHostToGuest) 1822 RTPrintf( "Copying from host to guest ...\n");1823 RTPrintf(GuestCtrl::tr("Copying from host to guest ...\n")); 1823 1824 else 1824 RTPrintf( "Copying from guest to host ...\n");1825 RTPrintf(GuestCtrl::tr("Copying from guest to host ...\n")); 1825 1826 } 1826 1827 … … 1849 1850 NOREF(fDstMustBeDir); 1850 1851 if (cSources != 1) 1851 return RTMsgErrorExitFailure( "Only one source file or directory at the moment.");1852 return RTMsgErrorExitFailure(GuestCtrl::tr("Only one source file or directory at the moment.")); 1852 1853 for (size_t iSrc = 0; iSrc < cSources; iSrc++) 1853 1854 { … … 1858 1859 const char *pszSrcFinalComp = RTPathFilename(pszSource); 1859 1860 if (pszSrcFinalComp && strpbrk(pszSrcFinalComp, "*?")) 1860 rcExit = RTMsgErrorExitFailure("Skipping '%s' because wildcard expansion isn't implemented yet\n", pszSource); 1861 rcExit = RTMsgErrorExitFailure(GuestCtrl::tr("Skipping '%s' because wildcard expansion isn't implemented yet\n"), 1862 pszSource); 1861 1863 else if (fHostToGuest) 1862 1864 { … … 1875 1877 { 1876 1878 if (pCtx->cVerbose) 1877 RTPrintf( "File '%s' -> '%s'\n", szAbsSrc, pszDst);1879 RTPrintf(GuestCtrl::tr("File '%s' -> '%s'\n"), szAbsSrc, pszDst); 1878 1880 1879 1881 SafeArray<FileCopyFlag_T> copyFlags; … … 1884 1886 { 1885 1887 if (pCtx->cVerbose) 1886 RTPrintf( "Directory '%s' -> '%s'\n", szAbsSrc, pszDst);1888 RTPrintf(GuestCtrl::tr("Directory '%s' -> '%s'\n"), szAbsSrc, pszDst); 1887 1889 1888 1890 SafeArray<DirectoryCopyFlag_T> copyFlags; … … 1892 1894 } 1893 1895 else 1894 rcExit = RTMsgErrorExitFailure( "Not a file or directory: %s\n", szAbsSrc);1896 rcExit = RTMsgErrorExitFailure(GuestCtrl::tr("Not a file or directory: %s\n"), szAbsSrc); 1895 1897 } 1896 1898 else 1897 rcExit = RTMsgErrorExitFailure( "RTPathQueryInfo failed on '%s': %Rrc", szAbsSrc, vrc);1899 rcExit = RTMsgErrorExitFailure(GuestCtrl::tr("RTPathQueryInfo failed on '%s': %Rrc"), szAbsSrc, vrc); 1898 1900 } 1899 1901 else 1900 rcExit = RTMsgErrorExitFailure( "RTPathAbs failed on '%s': %Rrc", pszSource, vrc);1902 rcExit = RTMsgErrorExitFailure(GuestCtrl::tr("RTPathAbs failed on '%s': %Rrc"), pszSource, vrc); 1901 1903 } 1902 1904 else … … 1918 1920 { 1919 1921 if (pCtx->cVerbose) 1920 RTPrintf( "Directory '%s' -> '%s'\n", pszSource, pszDst);1922 RTPrintf(GuestCtrl::tr("Directory '%s' -> '%s'\n"), pszSource, pszDst); 1921 1923 1922 1924 SafeArray<DirectoryCopyFlag_T> aCopyFlags; … … 1928 1930 { 1929 1931 if (pCtx->cVerbose) 1930 RTPrintf( "File '%s' -> '%s'\n", pszSource, pszDst);1932 RTPrintf(GuestCtrl::tr("File '%s' -> '%s'\n"), pszSource, pszDst); 1931 1933 1932 1934 SafeArray<FileCopyFlag_T> aCopyFlags; … … 1935 1937 } 1936 1938 else 1937 rcExit = RTMsgErrorExitFailure( "Not a file or directory: %s\n", pszSource);1939 rcExit = RTMsgErrorExitFailure(GuestCtrl::tr("Not a file or directory: %s\n"), pszSource); 1938 1940 } 1939 1941 else … … 1941 1943 } 1942 1944 else 1943 rcExit = RTMsgErrorExitFailure( "FsObjQueryInfo failed on '%s': %Rhrc", pszSource, rc);1945 rcExit = RTMsgErrorExitFailure(GuestCtrl::tr("FsObjQueryInfo failed on '%s': %Rhrc"), pszSource, rc); 1944 1946 } 1945 1947 } … … 1956 1958 rc = pProgress->WaitForCompletion(-1 /* No timeout */); 1957 1959 if (SUCCEEDED(rc)) 1958 CHECK_PROGRESS_ERROR(pProgress, ( "File copy failed"));1960 CHECK_PROGRESS_ERROR(pProgress, (GuestCtrl::tr("File copy failed"))); 1959 1961 vrc = gctlPrintProgressError(pProgress); 1960 1962 } … … 2021 2023 return rcExit; 2022 2024 if (pCtx->cVerbose) 2023 RTPrintf( "Creating %RU32 directories...\n", argc - GetState.iNext + 1);2025 RTPrintf(GuestCtrl::tr("Creating %RU32 directories...\n"), argc - GetState.iNext + 1); 2024 2026 } 2025 2027 if (g_fGuestCtrlCanceled) 2026 return RTMsgErrorExit(RTEXITCODE_FAILURE, "mkdir was interrupted by Ctrl-C (%u left)\n",2028 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("mkdir was interrupted by Ctrl-C (%u left)\n"), 2027 2029 argc - GetState.iNext + 1); 2028 2030 … … 2037 2039 cDirsCreated++; 2038 2040 if (pCtx->cVerbose) 2039 RTPrintf( "Creating directory \"%s\" ...\n", ValueUnion.psz);2041 RTPrintf(GuestCtrl::tr("Creating directory \"%s\" ...\n"), ValueUnion.psz); 2040 2042 try 2041 2043 { … … 2048 2050 catch (std::bad_alloc &) 2049 2051 { 2050 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Out of memory\n");2052 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Out of memory\n")); 2051 2053 } 2052 2054 break; … … 2058 2060 2059 2061 if (!cDirsCreated) 2060 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKDIR, "No directory to create specified!");2062 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKDIR, GuestCtrl::tr("No directory to create specified!")); 2061 2063 return rcExit; 2062 2064 } … … 2104 2106 return rcExit; 2105 2107 if (pCtx->cVerbose) 2106 RTPrintf("Removing %RU32 directorie%s(s)...\n", argc - GetState.iNext + 1, fRecursive ? "tree" : ""); 2108 { 2109 if (fRecursive) 2110 RTPrintf(GuestCtrl::tr("Removing %RU32 directory tree(s)...\n", "", argc - GetState.iNext + 1), 2111 argc - GetState.iNext + 1); 2112 else 2113 RTPrintf(GuestCtrl::tr("Removing %RU32 directorie(s)...\n", "", argc - GetState.iNext + 1), 2114 argc - GetState.iNext + 1); 2115 } 2107 2116 } 2108 2117 if (g_fGuestCtrlCanceled) 2109 return RTMsgErrorExit(RTEXITCODE_FAILURE, "rmdir was interrupted by Ctrl-C (%u left)\n",2118 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("rmdir was interrupted by Ctrl-C (%u left)\n"), 2110 2119 argc - GetState.iNext + 1); 2111 2120 … … 2118 2127 */ 2119 2128 if (pCtx->cVerbose) 2120 RTPrintf( "Removing directory \"%s\" ...\n", ValueUnion.psz);2129 RTPrintf(GuestCtrl::tr("Removing directory \"%s\" ...\n"), ValueUnion.psz); 2121 2130 try 2122 2131 { … … 2125 2134 catch (std::bad_alloc &) 2126 2135 { 2127 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Out of memory\n");2136 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Out of memory\n")); 2128 2137 } 2129 2138 } … … 2137 2146 */ 2138 2147 if (pCtx->cVerbose) 2139 RTPrintf( "Recursively removing directory \"%s\" ...\n", ValueUnion.psz);2148 RTPrintf(GuestCtrl::tr("Recursively removing directory \"%s\" ...\n"), ValueUnion.psz); 2140 2149 try 2141 2150 { … … 2155 2164 rc = ptrProgress->WaitForCompletion(-1 /* indefinitely */); 2156 2165 if (SUCCEEDED(rc)) 2157 CHECK_PROGRESS_ERROR(ptrProgress, ( "Directory deletion failed"));2166 CHECK_PROGRESS_ERROR(ptrProgress, (GuestCtrl::tr("Directory deletion failed"))); 2158 2167 ptrProgress.setNull(); 2159 2168 } … … 2161 2170 catch (std::bad_alloc &) 2162 2171 { 2163 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Out of memory during recursive rmdir\n");2172 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Out of memory during recursive rmdir\n")); 2164 2173 } 2165 2174 } … … 2179 2188 2180 2189 if (!cDirRemoved) 2181 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RMDIR, "No directory to remove specified!");2190 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RMDIR, GuestCtrl::tr("No directory to remove specified!")); 2182 2191 return rcExit; 2183 2192 } … … 2219 2228 return rcExit; 2220 2229 if (pCtx->cVerbose) 2221 RTPrintf( "Removing %RU32 file(s)...\n", argc - GetState.iNext + 1);2230 RTPrintf(GuestCtrl::tr("Removing %RU32 file(s)...\n"), argc - GetState.iNext + 1); 2222 2231 } 2223 2232 if (g_fGuestCtrlCanceled) 2224 return RTMsgErrorExit(RTEXITCODE_FAILURE, "rm was interrupted by Ctrl-C (%u left)\n",2233 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("rm was interrupted by Ctrl-C (%u left)\n"), 2225 2234 argc - GetState.iNext + 1); 2226 2235 … … 2233 2242 cFilesDeleted++; 2234 2243 if (pCtx->cVerbose) 2235 RTPrintf( "Removing file \"%s\" ...\n", ValueUnion.psz);2244 RTPrintf(GuestCtrl::tr("Removing file \"%s\" ...\n", ValueUnion.psz)); 2236 2245 try 2237 2246 { … … 2245 2254 catch (std::bad_alloc &) 2246 2255 { 2247 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Out of memory\n");2256 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Out of memory\n")); 2248 2257 } 2249 2258 break; … … 2255 2264 2256 2265 if (!cFilesDeleted && !fForce) 2257 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RM, "No file to remove specified!");2266 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_RM, GuestCtrl::tr("No file to remove specified!")); 2258 2267 return rcExit; 2259 2268 } … … 2313 2322 2314 2323 if (RT_FAILURE(vrc)) 2315 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to initialize, rc=%Rrc\n", vrc);2324 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Failed to initialize, rc=%Rrc\n"), vrc); 2316 2325 2317 2326 size_t cSources = vecSources.size(); 2318 2327 if (!cSources) 2319 2328 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV, 2320 "No source(s) to move specified!");2329 GuestCtrl::tr("No source(s) to move specified!")); 2321 2330 if (cSources < 2) 2322 2331 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MV, 2323 "No destination specified!");2332 GuestCtrl::tr("No destination specified!")); 2324 2333 2325 2334 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 2340 2349 if (FAILED(rc)) 2341 2350 { 2342 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Destination does not exist\n");2351 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Destination does not exist\n")); 2343 2352 } 2344 2353 else … … 2349 2358 { 2350 2359 if (enmObjType != FsObjType_Directory) 2351 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Destination must be a directory when specifying multiple sources\n"); 2360 return RTMsgErrorExit(RTEXITCODE_FAILURE, 2361 GuestCtrl::tr("Destination must be a directory when specifying multiple sources\n")); 2352 2362 } 2353 2363 else 2354 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Unable to determine destination type: %Rhrc\n", rc); 2364 return RTMsgErrorExit(RTEXITCODE_FAILURE, 2365 GuestCtrl::tr("Unable to determine destination type: %Rhrc\n"), 2366 rc); 2355 2367 } 2356 2368 } … … 2360 2372 */ 2361 2373 if (pCtx->cVerbose) 2362 RTPrintf("Renaming %RU32 %s ...\n", cSources, cSources > 1 ? "sources" : "source"); 2374 RTPrintf(GuestCtrl::tr("Renaming %RU32 %s ...\n"), cSources, 2375 cSources > 1 ? GuestCtrl::tr("sources", "", cSources) : GuestCtrl::tr("source")); 2363 2376 2364 2377 std::vector< Utf8Str >::iterator it = vecSources.begin(); … … 2375 2388 if (FAILED(rc)) 2376 2389 { 2377 RTPrintf( "Cannot stat \"%s\": No such file or directory\n", strSrcCur.c_str());2390 RTPrintf(GuestCtrl::tr("Cannot stat \"%s\": No such file or directory\n"), strSrcCur.c_str()); 2378 2391 ++it; 2379 2392 continue; /* Skip. */ … … 2392 2405 2393 2406 if (pCtx->cVerbose) 2394 RTPrintf( "Renaming %s \"%s\" to \"%s\" ...\n",2395 enmObjType == FsObjType_Directory ? "directory" : "file",2407 RTPrintf(GuestCtrl::tr("Renaming %s \"%s\" to \"%s\" ...\n"), 2408 enmObjType == FsObjType_Directory ? GuestCtrl::tr("directory") : GuestCtrl::tr("file"), 2396 2409 strSrcCur.c_str(), pszDstCur); 2397 2410 … … 2412 2425 && pCtx->cVerbose) 2413 2426 { 2414 RTPrintf( "Warning: Not all sources were renamed\n");2427 RTPrintf(GuestCtrl::tr("Warning: Not all sources were renamed\n")); 2415 2428 } 2416 2429 … … 2472 2485 else 2473 2486 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP, 2474 "More than one template specified!\n");2487 GuestCtrl::tr("More than one template specified!\n")); 2475 2488 break; 2476 2489 … … 2482 2495 if (strTemplate.isEmpty()) 2483 2496 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP, 2484 "No template specified!");2497 GuestCtrl::tr("No template specified!")); 2485 2498 2486 2499 if (!fDirectory) 2487 2500 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_MKTEMP, 2488 "Creating temporary files is currently not supported!");2501 GuestCtrl::tr("Creating temporary files is currently not supported!")); 2489 2502 2490 2503 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 2498 2511 { 2499 2512 if (fDirectory && !strTempDir.isEmpty()) 2500 RTPrintf( "Creating temporary directory from template '%s' in directory '%s' ...\n",2513 RTPrintf(GuestCtrl::tr("Creating temporary directory from template '%s' in directory '%s' ...\n"), 2501 2514 strTemplate.c_str(), strTempDir.c_str()); 2502 2515 else if (fDirectory) 2503 RTPrintf( "Creating temporary directory from template '%s' in default temporary directory ...\n",2516 RTPrintf(GuestCtrl::tr("Creating temporary directory from template '%s' in default temporary directory ...\n"), 2504 2517 strTemplate.c_str()); 2505 2518 else if (!fDirectory && !strTempDir.isEmpty()) 2506 RTPrintf( "Creating temporary file from template '%s' in directory '%s' ...\n",2519 RTPrintf(GuestCtrl::tr("Creating temporary file from template '%s' in directory '%s' ...\n"), 2507 2520 strTemplate.c_str(), strTempDir.c_str()); 2508 2521 else if (!fDirectory) 2509 RTPrintf( "Creating temporary file from template '%s' in default temporary directory ...\n",2522 RTPrintf(GuestCtrl::tr("Creating temporary file from template '%s' in default temporary directory ...\n"), 2510 2523 strTemplate.c_str()); 2511 2524 } … … 2520 2533 bstrDirectory.asOutParam())); 2521 2534 if (SUCCEEDED(rc)) 2522 RTPrintf( "Directory name: %ls\n", bstrDirectory.raw());2535 RTPrintf(GuestCtrl::tr("Directory name: %ls\n"), bstrDirectory.raw()); 2523 2536 } 2524 2537 else … … 2564 2577 case 't': /* Terse */ 2565 2578 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT, 2566 "Command \"%s\" not implemented yet!", ValueUnion.psz);2579 GuestCtrl::tr("Command \"%s\" not implemented yet!"), ValueUnion.psz); 2567 2580 2568 2581 default: … … 2572 2585 2573 2586 if (ch != VINF_GETOPT_NOT_OPTION) 2574 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT, "Nothing to stat!");2587 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_STAT, GuestCtrl::tr("Nothing to stat!")); 2575 2588 2576 2589 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 2585 2598 { 2586 2599 if (pCtx->cVerbose) 2587 RTPrintf( "Checking for element \"%s\" ...\n", ValueUnion.psz);2600 RTPrintf(GuestCtrl::tr("Checking for element \"%s\" ...\n"), ValueUnion.psz); 2588 2601 2589 2602 ComPtr<IGuestFsObjInfo> pFsObjInfo; … … 2595 2608 * non-existing "element" (object or file, please, nobody calls it elements). */ 2596 2609 if (pCtx->cVerbose) 2597 RTPrintf( "Failed to stat '%s': No such file\n", ValueUnion.psz);2610 RTPrintf(GuestCtrl::tr("Failed to stat '%s': No such file\n"), ValueUnion.psz); 2598 2611 rcExit = RTEXITCODE_FAILURE; 2599 2612 } 2600 2613 else 2601 2614 { 2602 RTPrintf( " File: '%s'\n", ValueUnion.psz); /** @todo escape this name. */2615 RTPrintf(GuestCtrl::tr(" File: '%s'\n"), ValueUnion.psz); /** @todo escape this name. */ 2603 2616 2604 2617 FsObjType_T enmType = FsObjType_Unknown; … … 2635 2648 CHECK_ERROR2I(pFsObjInfo, COMGETTER(AccessTime)(&nsAccessTime)); 2636 2649 2637 RTPrintf(" Size: %-17RU64 Alloc: %-19RU64 Type: %s\n", cbObject, cbAllocated, gctlFsObjTypeToName(enmType)); 2638 RTPrintf("Device: %#-17RX32 INode: %-18RU64 Links: %u\n", uDevNode, idNode, cHardLinks); 2650 RTPrintf(GuestCtrl::tr(" Size: %-17RU64 Alloc: %-19RU64 Type: %s\n"), 2651 cbObject, cbAllocated, gctlFsObjTypeToName(enmType)); 2652 RTPrintf(GuestCtrl::tr("Device: %#-17RX32 INode: %-18RU64 Links: %u\n"), uDevNode, idNode, cHardLinks); 2639 2653 2640 2654 Utf8Str strAttrib(bstrAttribs); … … 2647 2661 pszAttribs = strchr(pszMode, '\0'); 2648 2662 if (uDeviceNo != 0) 2649 RTPrintf( " Mode: %-16s Attrib: %-17s Dev ID: %#RX32\n", pszMode, pszAttribs, uDeviceNo);2663 RTPrintf(GuestCtrl::tr(" Mode: %-16s Attrib: %-17s Dev ID: %#RX32\n"), pszMode, pszAttribs, uDeviceNo); 2650 2664 else 2651 RTPrintf( " Mode: %-16s Attrib: %s\n", pszMode, pszAttribs);2652 2653 RTPrintf( " Owner: %4d/%-12ls Group: %4d/%ls\n", uid, bstrUsername.raw(), gid, bstrGroupName.raw());2665 RTPrintf(GuestCtrl::tr(" Mode: %-16s Attrib: %s\n"), pszMode, pszAttribs); 2666 2667 RTPrintf(GuestCtrl::tr(" Owner: %4d/%-12ls Group: %4d/%ls\n"), uid, bstrUsername.raw(), gid, bstrGroupName.raw()); 2654 2668 2655 2669 RTTIMESPEC TimeSpec; 2656 2670 char szTmp[RTTIME_STR_LEN]; 2657 RTPrintf(" Birth: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsBirthTime), szTmp, sizeof(szTmp))); 2658 RTPrintf("Change: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsChangeTime), szTmp, sizeof(szTmp))); 2659 RTPrintf("Modify: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsModificationTime), szTmp, sizeof(szTmp))); 2660 RTPrintf("Access: %s\n", RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsAccessTime), szTmp, sizeof(szTmp))); 2671 RTPrintf(GuestCtrl::tr(" Birth: %s\n"), RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsBirthTime), 2672 szTmp, sizeof(szTmp))); 2673 RTPrintf(GuestCtrl::tr("Change: %s\n"), RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsChangeTime), 2674 szTmp, sizeof(szTmp))); 2675 RTPrintf(GuestCtrl::tr("Modify: %s\n"), RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsModificationTime), 2676 szTmp, sizeof(szTmp))); 2677 RTPrintf(GuestCtrl::tr("Access: %s\n"), RTTimeSpecToString(RTTimeSpecSetNano(&TimeSpec, nsAccessTime), 2678 szTmp, sizeof(szTmp))); 2661 2679 2662 2680 /* Skiping: Generation ID - only the ISO9660 VFS sets this. FreeBSD user flags. */ … … 2710 2728 2711 2729 if (pCtx->cVerbose) 2712 RTPrintf( "Current run level is %RU32\n", enmRunLevelCur);2730 RTPrintf(GuestCtrl::tr("Current run level is %RU32\n"), enmRunLevelCur); 2713 2731 2714 2732 } while (0); … … 2717 2735 { 2718 2736 if (pCtx->cVerbose) 2719 RTPrintf( "Waiting for run level %RU32 ...\n", enmRunLevel);2737 RTPrintf(GuestCtrl::tr("Waiting for run level %RU32 ...\n"), enmRunLevel); 2720 2738 2721 2739 RTMSINTERVAL tsStart = RTTimeMilliTS(); … … 2730 2748 else 2731 2749 { 2732 RTPrintf( "Waiting failed with %Rrc\n", vrc);2750 RTPrintf(GuestCtrl::tr("Waiting failed with %Rrc\n"), vrc); 2733 2751 break; 2734 2752 } … … 2736 2754 else if (pCtx->cVerbose) 2737 2755 { 2738 RTPrintf( "Run level %RU32 reached\n", enmRunLevel);2756 RTPrintf(GuestCtrl::tr("Run level %RU32 reached\n"), enmRunLevel); 2739 2757 break; 2740 2758 } … … 2745 2763 if ( vrc == VERR_TIMEOUT 2746 2764 && pCtx->cVerbose) 2747 RTPrintf( "Run level %RU32 not reached within time\n", enmRunLevel);2765 RTPrintf(GuestCtrl::tr("Run level %RU32 not reached within time\n"), enmRunLevel); 2748 2766 } 2749 2767 … … 2831 2849 vrc = RTPathAbsCxx(strSource, ValueUnion.psz); 2832 2850 if (RT_FAILURE(vrc)) 2833 return RTMsgErrorExitFailure( "RTPathAbsCxx failed on '%s': %Rrc", ValueUnion.psz, vrc);2851 return RTMsgErrorExitFailure(GuestCtrl::tr("RTPathAbsCxx failed on '%s': %Rrc"), ValueUnion.psz, vrc); 2834 2852 break; 2835 2853 … … 2860 2878 2861 2879 if (pCtx->cVerbose) 2862 RTPrintf( "Updating Guest Additions ...\n");2880 RTPrintf(GuestCtrl::tr("Updating Guest Additions ...\n")); 2863 2881 2864 2882 HRESULT rc = S_OK; … … 2876 2894 if (strSource.isEmpty()) 2877 2895 { 2878 RTMsgError( "No Guest Additions source found or specified, aborting\n");2896 RTMsgError(GuestCtrl::tr("No Guest Additions source found or specified, aborting\n")); 2879 2897 vrc = VERR_FILE_NOT_FOUND; 2880 2898 } 2881 2899 else if (!RTFileExists(strSource.c_str())) 2882 2900 { 2883 RTMsgError( "Source \"%s\" does not exist!\n", strSource.c_str());2901 RTMsgError(GuestCtrl::tr("Source \"%s\" does not exist!\n"), strSource.c_str()); 2884 2902 vrc = VERR_FILE_NOT_FOUND; 2885 2903 } … … 2892 2910 if (SUCCEEDED(rc) && !guest.isNull()) 2893 2911 { 2894 SHOW_STRING_PROP_NOT_EMPTY(guest, OSTypeId, "GuestOSType", "OS type:");2912 SHOW_STRING_PROP_NOT_EMPTY(guest, OSTypeId, "GuestOSType", GuestCtrl::tr("OS type:")); 2895 2913 2896 2914 AdditionsRunLevelType_T guestRunLevel; /** @todo Add a runlevel-to-string (e.g. 0 = "None") method? */ 2897 2915 rc = guest->COMGETTER(AdditionsRunLevel)(&guestRunLevel); 2898 2916 if (SUCCEEDED(rc)) 2899 SHOW_ULONG_VALUE("GuestAdditionsRunLevel", "Additions run level:", (ULONG)guestRunLevel, "");2917 SHOW_ULONG_VALUE("GuestAdditionsRunLevel", GuestCtrl::tr("Additions run level:"), (ULONG)guestRunLevel, ""); 2900 2918 2901 2919 Bstr guestString; … … 2909 2927 uRevision = 0; 2910 2928 RTStrPrintf(szValue, sizeof(szValue), "%ls r%u", guestString.raw(), uRevision); 2911 SHOW_UTF8_STRING("GuestAdditionsVersion", "Additions version:", szValue);2929 SHOW_UTF8_STRING("GuestAdditionsVersion", GuestCtrl::tr("Additions version:"), szValue); 2912 2930 } 2913 2931 #endif … … 2916 2934 { 2917 2935 if (pCtx->cVerbose) 2918 RTPrintf( "Using source: %s\n", strSource.c_str());2936 RTPrintf(GuestCtrl::tr("Using source: %s\n"), strSource.c_str()); 2919 2937 2920 2938 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 2925 2943 { 2926 2944 if (pCtx->cVerbose) 2927 RTPrintf( "Waiting for current Guest Additions inside VM getting ready for updating ...\n");2945 RTPrintf(GuestCtrl::tr("Waiting for current Guest Additions inside VM getting ready for updating ...\n")); 2928 2946 2929 2947 const uint64_t uTsStart = RTTimeMilliTS(); … … 2946 2964 { 2947 2965 if (pCtx->cVerbose) 2948 RTPrintf( "Guest Additions %lsr%RU64 currently installed, waiting for Guest Additions installer to start ...\n",2966 RTPrintf(GuestCtrl::tr("Guest Additions %lsr%RU64 currently installed, waiting for Guest Additions installer to start ...\n"), 2949 2967 strGstVerCur.raw(), uGstRevCur); 2950 2968 } … … 2970 2988 2971 2989 if (SUCCEEDED(rc)) 2972 CHECK_PROGRESS_ERROR(pProgress, ( "Guest Additions update failed"));2990 CHECK_PROGRESS_ERROR(pProgress, (GuestCtrl::tr("Guest Additions update failed"))); 2973 2991 vrc = gctlPrintProgressError(pProgress); 2974 2992 if (RT_SUCCESS(vrc)) 2975 2993 { 2976 2994 if (pCtx->cVerbose) 2977 RTPrintf( "Guest Additions update successful.\n");2995 RTPrintf(GuestCtrl::tr("Guest Additions update successful.\n")); 2978 2996 2979 2997 if (fRebootOnFinish) 2980 2998 { 2981 2999 if (pCtx->cVerbose) 2982 RTPrintf( "Rebooting guest ...\n");3000 RTPrintf(GuestCtrl::tr("Rebooting guest ...\n")); 2983 3001 com::SafeArray<GuestShutdownFlag_T> aShutdownFlags; 2984 3002 aShutdownFlags.push_back(GuestShutdownFlag_Reboot); … … 2988 3006 if (rc == VBOX_E_NOT_SUPPORTED) 2989 3007 { 2990 RTPrintf( "Current installed Guest Additions don't support automatic rebooting. "2991 "Please reboot manually.\n");3008 RTPrintf(GuestCtrl::tr("Current installed Guest Additions don't support automatic rebooting. " 3009 "Please reboot manually.\n")); 2992 3010 vrc = VERR_NOT_SUPPORTED; 2993 3011 } … … 3000 3018 { 3001 3019 if (pCtx->cVerbose) 3002 RTPrintf( "Waiting for new Guest Additions inside VM getting ready ...\n");3020 RTPrintf(GuestCtrl::tr("Waiting for new Guest Additions inside VM getting ready ...\n")); 3003 3021 3004 3022 vrc = gctlWaitForRunLevel(pCtx, AdditionsRunLevelType_Userland, cMsTimeout); … … 3008 3026 { 3009 3027 if (pCtx->cVerbose) 3010 RTPrintf( "Verifying Guest Additions update ...\n");3028 RTPrintf(GuestCtrl::tr("Verifying Guest Additions update ...\n")); 3011 3029 3012 3030 /* Get new Guest Additions version / revision. */ … … 3027 3045 if (pCtx->cVerbose) 3028 3046 { 3029 RTPrintf("Old Guest Additions: %ls%RU64\n", strGstVerCur.raw(), uGstRevCur); 3030 RTPrintf("New Guest Additions: %ls%RU64\n", strGstVerNew.raw(), uGstRevNew); 3047 RTPrintf(GuestCtrl::tr("Old Guest Additions: %ls%RU64\n"), strGstVerCur.raw(), 3048 uGstRevCur); 3049 RTPrintf(GuestCtrl::tr("New Guest Additions: %ls%RU64\n"), strGstVerNew.raw(), 3050 uGstRevNew); 3031 3051 3032 3052 if (RT_FAILURE(vrc)) 3033 3053 { 3034 RTPrintf( "\nError updating Guest Additions, please check guest installer log\n");3054 RTPrintf(GuestCtrl::tr("\nError updating Guest Additions, please check guest installer log\n")); 3035 3055 } 3036 3056 else 3037 3057 { 3038 3058 if (uGstRevNew < uGstRevCur) 3039 RTPrintf( "\nWARNING: Guest Additions were downgraded\n");3059 RTPrintf(GuestCtrl::tr("\nWARNING: Guest Additions were downgraded\n")); 3040 3060 } 3041 3061 } … … 3044 3064 } 3045 3065 else if (pCtx->cVerbose) 3046 RTPrintf( "The guest needs to be restarted in order to make use of the updated Guest Additions.\n");3066 RTPrintf(GuestCtrl::tr("The guest needs to be restarted in order to make use of the updated Guest Additions.\n")); 3047 3067 } 3048 3068 } … … 3118 3138 if (enmRunLevel == AdditionsRunLevelType_None) 3119 3139 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WAITRUNLEVEL, 3120 "Invalid run level specified. Valid values are: system, userland, desktop");3140 GuestCtrl::tr("Invalid run level specified. Valid values are: system, userland, desktop")); 3121 3141 break; 3122 3142 } … … 3132 3152 3133 3153 if (enmRunLevel == AdditionsRunLevelType_None) 3134 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WAITRUNLEVEL, "Missing run level to wait for");3154 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_WAITRUNLEVEL, GuestCtrl::tr("Missing run level to wait for")); 3135 3155 3136 3156 vrc = gctlWaitForRunLevel(pCtx, enmRunLevel, cMsTimeout); … … 3180 3200 else 3181 3201 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_LIST, 3182 "Unknown list: '%s'", ValueUnion.psz);3202 GuestCtrl::tr("Unknown list: '%s'"), ValueUnion.psz); 3183 3203 fSeenListArg = true; 3184 3204 break; … … 3190 3210 3191 3211 if (!fSeenListArg) 3192 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_LIST, "Missing list name");3212 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_LIST, GuestCtrl::tr("Missing list name")); 3193 3213 Assert(fListAll || fListSessions); 3194 3214 … … 3211 3231 if (cSessions) 3212 3232 { 3213 RTPrintf( "Active guest sessions:\n");3233 RTPrintf(GuestCtrl::tr("Active guest sessions:\n")); 3214 3234 3215 3235 /** @todo Make this output a bit prettier. No time now. */ … … 3230 3250 GuestSessionStatus_T sessionStatus; 3231 3251 CHECK_ERROR_BREAK(pCurSession, COMGETTER(Status)(&sessionStatus)); 3232 RTPrintf( "\n\tSession #%-3zu ID=%-3RU32 User=%-16ls Status=[%s] Name=%ls",3252 RTPrintf(GuestCtrl::tr("\n\tSession #%-3zu ID=%-3RU32 User=%-16ls Status=[%s] Name=%ls"), 3233 3253 i, uID, strUser.raw(), gctlGuestSessionStatusToText(sessionStatus), strName.raw()); 3234 3254 } while (0); … … 3253 3273 CHECK_ERROR_BREAK(pCurProcess, COMGETTER(Status)(&procStatus)); 3254 3274 3255 RTPrintf( "\n\t\tProcess #%-03zu PID=%-6RU32 Status=[%s] Command=%ls",3275 RTPrintf(GuestCtrl::tr("\n\t\tProcess #%-03zu PID=%-6RU32 Status=[%s] Command=%ls"), 3256 3276 a, uPID, gctlProcessStatusToText(procStatus), strExecPath.raw()); 3257 3277 } while (0); … … 3281 3301 CHECK_ERROR_BREAK(pCurFile, COMGETTER(Status)(&fileStatus)); 3282 3302 3283 RTPrintf( "\n\t\tFile #%-03zu ID=%-6RU32 Status=[%s] Name=%ls",3303 RTPrintf(GuestCtrl::tr("\n\t\tFile #%-03zu ID=%-6RU32 Status=[%s] Name=%ls"), 3284 3304 a, idFile, gctlFileStatusToText(fileStatus), strName.raw()); 3285 3305 } while (0); … … 3292 3312 } 3293 3313 3294 RTPrintf( "\n\nTotal guest sessions: %zu\n", collSessions.size());3314 RTPrintf(GuestCtrl::tr("\n\nTotal guest sessions: %zu\n"), collSessions.size()); 3295 3315 if (fListAll || fListProcesses) 3296 RTPrintf( "Total guest processes: %zu\n", cTotalProcs);3316 RTPrintf(GuestCtrl::tr("Total guest processes: %zu\n"), cTotalProcs); 3297 3317 if (fListAll || fListFiles) 3298 RTPrintf( "Total guest files: %zu\n", cTotalFiles);3318 RTPrintf(GuestCtrl::tr("Total guest files: %zu\n"), cTotalFiles); 3299 3319 } 3300 3320 else 3301 RTPrintf( "No active guest sessions found\n");3321 RTPrintf(GuestCtrl::tr("No active guest sessions found\n")); 3302 3322 } 3303 3323 … … 3361 3381 catch (std::bad_alloc &) 3362 3382 { 3363 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Out of memory");3383 return RTMsgErrorExit(RTEXITCODE_FAILURE, GuestCtrl::tr("Out of memory")); 3364 3384 } 3365 3385 } 3366 3386 else 3367 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, "Invalid PID value: 0"); 3387 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3388 GuestCtrl::tr("Invalid PID value: 0")); 3368 3389 } 3369 3390 else 3370 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, "Error parsing PID value: %Rrc", rc); 3391 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3392 GuestCtrl::tr("Error parsing PID value: %Rrc"), rc); 3371 3393 break; 3372 3394 } … … 3379 3401 if (vecPID.empty()) 3380 3402 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3381 "At least one PID must be specified to kill!");3403 GuestCtrl::tr("At least one PID must be specified to kill!")); 3382 3404 3383 3405 if ( strSessionName.isEmpty() 3384 3406 && idSession == UINT32_MAX) 3385 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, "No session ID specified!");3407 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, GuestCtrl::tr("No session ID specified!")); 3386 3408 3387 3409 if ( strSessionName.isNotEmpty() 3388 3410 && idSession != UINT32_MAX) 3389 3411 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSEPROCESS, 3390 "Either session ID or name (pattern) must be specified");3412 GuestCtrl::tr("Either session ID or name (pattern) must be specified")); 3391 3413 3392 3414 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 3451 3473 { 3452 3474 if (pCtx->cVerbose) 3453 RTPrintf( "Terminating process (PID %RU32) (session ID %RU32) ...\n",3475 RTPrintf(GuestCtrl::tr("Terminating process (PID %RU32) (session ID %RU32) ...\n"), 3454 3476 uPID, uID); 3455 3477 CHECK_ERROR_BREAK(pProcess, Terminate()); … … 3459 3481 { 3460 3482 if (idSession != UINT32_MAX) 3461 RTPrintf( "No matching process(es) for session ID %RU32 found\n",3483 RTPrintf(GuestCtrl::tr("No matching process(es) for session ID %RU32 found\n"), 3462 3484 idSession); 3463 3485 } … … 3471 3493 3472 3494 if (!cSessionsHandled) 3473 RTPrintf( "No matching session(s) found\n");3495 RTPrintf(GuestCtrl::tr("No matching session(s) found\n")); 3474 3496 3475 3497 if (uProcsTerminated) 3476 RTPrintf("%RU32 %s terminated\n", 3477 uProcsTerminated, uProcsTerminated == 1 ? "process" : "processes"); 3498 RTPrintf(GuestCtrl::tr("%RU32 process(es) terminated\n", "", uProcsTerminated), uProcsTerminated); 3478 3499 3479 3500 } while (0); … … 3540 3561 && idSession == UINT32_MAX) 3541 3562 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION, 3542 "No session ID specified!");3563 GuestCtrl::tr("No session ID specified!")); 3543 3564 3544 3565 if ( !strSessionName.isEmpty() 3545 3566 && idSession != UINT32_MAX) 3546 3567 return errorSyntaxEx(USAGE_GUESTCONTROL, HELP_SCOPE_GSTCTRL_CLOSESESSION, 3547 "Either session ID or name (pattern) must be specified");3568 GuestCtrl::tr("Either session ID or name (pattern) must be specified")); 3548 3569 3549 3570 RTEXITCODE rcExit = gctlCtxPostOptionParsingInit(pCtx); … … 3583 3604 Assert(!pSession.isNull()); 3584 3605 if (pCtx->cVerbose) 3585 RTPrintf( "Closing guest session ID=#%RU32 \"%s\" ...\n",3606 RTPrintf(GuestCtrl::tr("Closing guest session ID=#%RU32 \"%s\" ...\n"), 3586 3607 uID, strNameUtf8.c_str()); 3587 3608 CHECK_ERROR_BREAK(pSession, Close()); 3588 3609 if (pCtx->cVerbose) 3589 RTPrintf( "Guest session successfully closed\n");3610 RTPrintf(GuestCtrl::tr("Guest session successfully closed\n")); 3590 3611 3591 3612 pSession.setNull(); … … 3595 3616 if (!cSessionsHandled) 3596 3617 { 3597 RTPrintf( "No guest session(s) found\n");3618 RTPrintf(GuestCtrl::tr("No guest session(s) found\n")); 3598 3619 rc = E_ABORT; /* To set exit code accordingly. */ 3599 3620 } … … 3674 3695 3675 3696 if (pCtx->cVerbose) 3676 RTPrintf( "Waiting for events ...\n");3697 RTPrintf(GuestCtrl::tr("Waiting for events ...\n")); 3677 3698 3678 3699 /* Wait for the global signal semaphore getting signalled. */ … … 3681 3702 { 3682 3703 if (pCtx->cVerbose) 3683 RTPrintf( "Waiting done\n");3704 RTPrintf(GuestCtrl::tr("Waiting done\n")); 3684 3705 } 3685 3706 else if (RT_FAILURE(vrc)) 3686 RTPrintf( "Waiting failed with %Rrc\n", vrc);3707 RTPrintf(GuestCtrl::tr("Waiting failed with %Rrc\n"), vrc); 3687 3708 3688 3709 if (!pGuestListener.isNull()) … … 3818 3839 return rcExit; 3819 3840 } 3820 return errorSyntax(USAGE_GUESTCONTROL, "Unknown sub-command: '%s'", pszCmd);3841 return errorSyntax(USAGE_GUESTCONTROL, GuestCtrl::tr("Unknown sub-command: '%s'"), pszCmd); 3821 3842 } 3822 3843 break; … … 3827 3848 } 3828 3849 if (CmdCtx.pszVmNameOrUuid) 3829 rcExit = errorSyntax(USAGE_GUESTCONTROL, "Missing sub-command");3850 rcExit = errorSyntax(USAGE_GUESTCONTROL, GuestCtrl::tr("Missing sub-command")); 3830 3851 else 3831 rcExit = errorSyntax(USAGE_GUESTCONTROL, "Missing VM name and sub-command");3852 rcExit = errorSyntax(USAGE_GUESTCONTROL, GuestCtrl::tr("Missing VM name and sub-command")); 3832 3853 } 3833 3854 return rcExit; 3834 3855 } 3835 3856 #endif /* !VBOX_ONLY_DOCS */ 3836 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrlListener.cpp
r84519 r92372 35 35 #include <vector> 36 36 37 DECLARE_TRANSLATION_CONTEXT(GuestCtrlLsnr); 38 37 39 38 40 /** Event semaphore we're using for notification. */ … … 104 106 CHECK_ERROR_BREAK(pProcess, COMGETTER(Id)(&uID)); 105 107 106 RTPrintf( "File ID=%RU32 \"%s\" changed status to [%s]\n",108 RTPrintf(GuestCtrlLsnr::tr("File ID=%RU32 \"%s\" changed status to [%s]\n"), 107 109 uID, Utf8Str(strPath).c_str(), gctlFileStatusToText(fileSts)); 108 110 … … 160 162 CHECK_ERROR_BREAK(pProcess, COMGETTER(PID)(&uPID)); 161 163 162 RTPrintf( "Process PID=%RU32 \"%s\" changed status to [%s]\n",164 RTPrintf(GuestCtrlLsnr::tr("Process PID=%RU32 \"%s\" changed status to [%s]\n"), 163 165 uPID, Utf8Str(strPath).c_str(), gctlProcessStatusToText(procSts)); 164 166 … … 254 256 CHECK_ERROR_BREAK(pFile, COMGETTER(Filename)(strPath.asOutParam())); 255 257 256 RTPrintf( "File \"%s\" %s\n",258 RTPrintf(GuestCtrlLsnr::tr("File \"%s\" %s\n"), 257 259 Utf8Str(strPath).c_str(), 258 fRegistered ? "registered" : "unregistered");260 fRegistered ? GuestCtrlLsnr::tr("registered") : GuestCtrlLsnr::tr("unregistered")); 259 261 if (fRegistered) 260 262 { 261 263 if (mfVerbose) 262 RTPrintf( "Registering ...\n");264 RTPrintf(GuestCtrlLsnr::tr("Registering ...\n")); 263 265 264 266 /* Register for IGuestFile events. */ … … 283 285 { 284 286 if (mfVerbose) 285 RTPrintf( "Unregistering file ...\n");287 RTPrintf(GuestCtrlLsnr::tr("Unregistering file ...\n")); 286 288 287 289 if (!itFile->first.isNull()) … … 319 321 CHECK_ERROR_BREAK(pProcess, COMGETTER(ExecutablePath)(strPath.asOutParam())); 320 322 321 RTPrintf( "Process \"%s\" %s\n",323 RTPrintf(GuestCtrlLsnr::tr("Process \"%s\" %s\n"), 322 324 Utf8Str(strPath).c_str(), 323 fRegistered ? "registered" : "unregistered");325 fRegistered ? GuestCtrlLsnr::tr("registered") : GuestCtrlLsnr::tr("unregistered")); 324 326 if (fRegistered) 325 327 { 326 328 if (mfVerbose) 327 RTPrintf( "Registering ...\n");329 RTPrintf(GuestCtrlLsnr::tr("Registering ...\n")); 328 330 329 331 /* Register for IGuestProcess events. */ … … 348 350 { 349 351 if (mfVerbose) 350 RTPrintf( "Unregistering process ...\n");352 RTPrintf(GuestCtrlLsnr::tr("Unregistering process ...\n")); 351 353 352 354 if (!itProc->first.isNull()) … … 386 388 CHECK_ERROR_BREAK(pSession, COMGETTER(Name)(strName.asOutParam())); 387 389 388 RTPrintf( "Session ID=%RU32 \"%s\" changed status to [%s]\n",390 RTPrintf(GuestCtrlLsnr::tr("Session ID=%RU32 \"%s\" changed status to [%s]\n"), 389 391 uID, Utf8Str(strName).c_str(), gctlGuestSessionStatusToText(sessSts)); 390 392 … … 462 464 CHECK_ERROR_BREAK(pSession, COMGETTER(Id)(&uID)); 463 465 464 RTPrintf( "Session ID=%RU32 \"%s\" %s\n",466 RTPrintf(GuestCtrlLsnr::tr("Session ID=%RU32 \"%s\" %s\n"), 465 467 uID, Utf8Str(strName).c_str(), 466 fRegistered ? "registered" : "unregistered");468 fRegistered ? GuestCtrlLsnr::tr("registered") : GuestCtrlLsnr::tr("unregistered")); 467 469 if (fRegistered) 468 470 { 469 471 if (mfVerbose) 470 RTPrintf( "Registering ...\n");472 RTPrintf(GuestCtrlLsnr::tr("Registering ...\n")); 471 473 472 474 /* Register for IGuestSession events. */ … … 492 494 { 493 495 if (mfVerbose) 494 RTPrintf( "Unregistering ...\n");496 RTPrintf(GuestCtrlLsnr::tr("Unregistering ...\n")); 495 497 496 498 if (!itSession->first.isNull()) … … 555 557 556 558 if (mfVerbose) 557 RTPrintf( "Reached run level %RU32\n", RunLevelCur);559 RTPrintf(GuestCtrlLsnr::tr("Reached run level %RU32\n"), RunLevelCur); 558 560 559 561 if (RunLevelCur == mRunLevelTarget) … … 574 576 575 577 #endif /* !VBOX_ONLY_DOCS */ 576 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r82968 r92372 51 51 #endif /* !VBOX_ONLY_DOCS */ 52 52 53 DECLARE_TRANSLATION_CONTEXT(GuestProp); 54 55 53 56 void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2) 54 57 { 55 RTStrmPrintf(pStrm, 56 "%s guestproperty %s get <uuid|vmname>\n" 57 " <property> [--verbose]\n" 58 "\n", pcszSep1, pcszSep2); 59 RTStrmPrintf(pStrm, 60 "%s guestproperty %s set <uuid|vmname>\n" 61 " <property> [<value> [--flags <flags>]]\n" 62 "\n", pcszSep1, pcszSep2); 63 RTStrmPrintf(pStrm, 64 "%s guestproperty %s delete|unset <uuid|vmname>\n" 65 " <property>\n" 66 "\n", pcszSep1, pcszSep2); 67 RTStrmPrintf(pStrm, 68 "%s guestproperty %s enumerate <uuid|vmname>\n" 69 " [--patterns <patterns>]\n" 70 "\n", pcszSep1, pcszSep2); 71 RTStrmPrintf(pStrm, 72 "%s guestproperty %s wait <uuid|vmname> <patterns>\n" 73 " [--timeout <msec>] [--fail-on-timeout]\n" 74 "\n", pcszSep1, pcszSep2); 58 RTStrmPrintf(pStrm, GuestProp::tr("%s guestproperty %s get <uuid|vmname>\n" 59 " <property> [--verbose]\n" 60 "\n"), pcszSep1, pcszSep2); 61 RTStrmPrintf(pStrm, GuestProp::tr("%s guestproperty %s set <uuid|vmname>\n" 62 " <property> [<value> [--flags <flags>]]\n" 63 "\n"), pcszSep1, pcszSep2); 64 RTStrmPrintf(pStrm, GuestProp::tr("%s guestproperty %s delete|unset <uuid|vmname>\n" 65 " <property>\n" 66 "\n"), pcszSep1, pcszSep2); 67 RTStrmPrintf(pStrm, GuestProp::tr("%s guestproperty %s enumerate <uuid|vmname>\n" 68 " [--patterns <patterns>]\n" 69 "\n"), pcszSep1, pcszSep2); 70 RTStrmPrintf(pStrm, GuestProp::tr("%s guestproperty %s wait <uuid|vmname> <patterns>\n" 71 " [--timeout <msec>] [--fail-on-timeout]\n" 72 "\n"), pcszSep1, pcszSep2); 75 73 } 76 74 … … 87 85 verbose = true; 88 86 else if (a->argc != 2) 89 return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");87 return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters")); 90 88 91 89 ComPtr<IMachine> machine; … … 107 105 &i64Timestamp, flags.asOutParam())); 108 106 if (value.isEmpty()) 109 RTPrintf( "No value set!\n");107 RTPrintf(GuestProp::tr("No value set!\n")); 110 108 else 111 RTPrintf( "Value: %ls\n", value.raw());109 RTPrintf(GuestProp::tr("Value: %ls\n"), value.raw()); 112 110 if (!value.isEmpty() && verbose) 113 111 { 114 RTPrintf( "Timestamp: %lld\n", i64Timestamp);115 RTPrintf( "Flags: %ls\n", flags.raw());112 RTPrintf(GuestProp::tr("Timestamp: %lld\n"), i64Timestamp); 113 RTPrintf(GuestProp::tr("Flags: %ls\n"), flags.raw()); 116 114 } 117 115 } … … 146 144 usageOK = false; 147 145 if (!usageOK) 148 return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");146 return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters")); 149 147 /* This is always needed. */ 150 148 pszName = a->argv[1]; … … 190 188 usageOK = false; 191 189 if (!usageOK) 192 return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");190 return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters")); 193 191 /* This is always needed. */ 194 192 pszName = a->argv[1]; … … 232 230 && strcmp(a->argv[1], "--patterns") 233 231 && strcmp(a->argv[1], "-patterns"))) 234 return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");232 return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters")); 235 233 236 234 /* … … 268 266 { 269 267 if (names.size() == 0) 270 RTPrintf( "No properties found.\n");268 RTPrintf(GuestProp::tr("No properties found.\n")); 271 269 for (unsigned i = 0; i < names.size(); ++i) 272 RTPrintf( "Name: %ls, value: %ls, timestamp: %lld, flags: %ls\n",270 RTPrintf(GuestProp::tr("Name: %ls, value: %ls, timestamp: %lld, flags: %ls\n"), 273 271 names[i], values[i], timestamps[i], flags[i]); 274 272 } … … 319 317 } 320 318 if (!usageOK) 321 return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");319 return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters")); 322 320 323 321 /* … … 374 372 gpcev->COMGETTER(Value)(aNextValue.asOutParam()); 375 373 gpcev->COMGETTER(Flags)(aNextFlags.asOutParam()); 376 RTPrintf( "Name: %ls, value: %ls, flags: %ls\n",374 RTPrintf(GuestProp::tr("Name: %ls, value: %ls, flags: %ls\n"), 377 375 aNextName.raw(), aNextValue.raw(), aNextFlags.raw()); 378 376 fSignalled = true; … … 391 389 if (!fSignalled) 392 390 { 393 RTMsgError( "Time out or interruption while waiting for a notification.");391 RTMsgError(GuestProp::tr("Time out or interruption while waiting for a notification.")); 394 392 if (fFailOnTimeout) 395 393 /* Hysterical rasins: We always returned 2 here, which now translates to syntax error... Which is bad. */ … … 417 415 418 416 if (a->argc == 0) 419 return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");417 return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters")); 420 418 421 419 /* switch (cmd) */ … … 432 430 433 431 /* default: */ 434 return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");432 return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters")); 435 433 } 436 434 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r92364 r92372 45 45 * Global Variables * 46 46 *********************************************************************************************************************************/ 47 DECLARE_TRANSLATION_CONTEXT(Help); 48 47 49 #ifndef VBOX_ONLY_DOCS 48 50 static enum HELP_CMD_VBOXMANAGE g_enmCurCommand = HELP_CMD_VBOXMANAGE_INVALID; … … 103 105 { 104 106 if (fSubcommandScope == RTMSGREFENTRYSTR_SCOPE_GLOBAL) 105 RTStrmPrintf(pStrm, "Usage - %c%s:\n", RT_C_TO_UPPER(pHelp->pszBrief[0]), pHelp->pszBrief + 1);107 RTStrmPrintf(pStrm, Help::tr("Usage - %c%s:\n"), RT_C_TO_UPPER(pHelp->pszBrief[0]), pHelp->pszBrief + 1); 106 108 else 107 RTStrmPrintf(pStrm, "Usage:\n");109 RTStrmPrintf(pStrm, Help::tr("Usage:\n")); 108 110 } 109 111 RTMsgRefEntryPrintStringTable(pStrm, &pHelp->Synopsis, fSubcommandScope, &cPendingBlankLines, &cLinesWritten); … … 177 179 Assert(g_fCurSubcommandScope == RTMSGREFENTRYSTR_SCOPE_GLOBAL); 178 180 179 return errorSyntax( "No subcommand specified");181 return errorSyntax(Help::tr("No subcommand specified")); 180 182 } 181 183 … … 203 205 } 204 206 205 return errorSyntax( "Unknown subcommand: %s", pszSubcommand);207 return errorSyntax(Help::tr("Unknown subcommand: %s"), pszSubcommand); 206 208 } 207 209 … … 236 238 } 237 239 238 return errorSyntax( "Too many parameters");240 return errorSyntax(Help::tr("Too many parameters")); 239 241 } 240 242 … … 281 283 { 282 284 if (rcGetOpt == VINF_GETOPT_NOT_OPTION) 283 RTMsgError( "Invalid parameter '%s'", pValueUnion->psz);285 RTMsgError(Help::tr("Invalid parameter '%s'"), pValueUnion->psz); 284 286 else if (rcGetOpt > 0) 285 287 { 286 288 if (RT_C_IS_PRINT(rcGetOpt)) 287 RTMsgError( "Invalid option -%c", rcGetOpt);289 RTMsgError(Help::tr("Invalid option -%c"), rcGetOpt); 288 290 else 289 RTMsgError( "Invalid option case %i", rcGetOpt);291 RTMsgError(Help::tr("Invalid option case %i"), rcGetOpt); 290 292 } 291 293 else if (rcGetOpt == VERR_GETOPT_UNKNOWN_OPTION) 292 RTMsgError( "Unknown option: %s", pValueUnion->psz);294 RTMsgError(Help::tr("Unknown option: %s"), pValueUnion->psz); 293 295 else if (rcGetOpt == VERR_GETOPT_INVALID_ARGUMENT_FORMAT) 294 RTMsgError( "Invalid argument format: %s", pValueUnion->psz);296 RTMsgError(Help::tr("Invalid argument format: %s"), pValueUnion->psz); 295 297 else if (pValueUnion->pDef) 296 298 RTMsgError("%s: %Rrs", pValueUnion->pDef->pszLong, rcGetOpt); … … 316 318 showLogo(g_pStdErr); 317 319 if (rcGetOptFetchValue == VERR_GETOPT_REQUIRED_ARGUMENT_MISSING) 318 RTMsgError("Missing the %u%s value for option %s", 319 iValueNo, iValueNo == 1 ? "st" : iValueNo == 2 ? "nd" : iValueNo == 3 ? "rd" : "th", pszOption); 320 RTMsgError(Help::tr("Missing the %u%s value for option %s"), 321 iValueNo, 322 iValueNo == 1 ? Help::tr("st") 323 : iValueNo == 2 ? Help::tr("nd") 324 : iValueNo == 3 ? Help::tr("rd") 325 : Help::tr("th"), 326 pszOption); 320 327 else 321 328 errorGetOptWorker(rcGetOptFetchValue, pValueUnion); … … 442 449 443 450 RTStrmPrintf(pStrm, 444 "Usage:\n"445 "\n");451 Help::tr("Usage:\n" 452 "\n")); 446 453 447 454 if (enmCommand == USAGE_S_ALL) 448 455 RTStrmPrintf(pStrm, 449 " VBoxManage [<general option>] <command>\n" 450 "\n" 451 "\n" 452 "General Options:\n" 453 "\n" 454 " [-V|--version] print version number and exit\n" 455 " [--dump-build-type] print build type and exit\n" 456 " [-q|--nologo] suppress the logo\n" 457 " [--settingspw <pw>] provide the settings password\n" 458 " [--settingspwfile <file>] provide a file containing the settings password\n" 459 " [@<response-file>] load arguments from the given response file (bourne style)\n" 460 "\n" 461 "\n" 462 "Commands:\n" 463 "\n"); 456 Help::tr( 457 " VBoxManage [<general option>] <command>\n" 458 "\n" 459 "\n" 460 "General Options:\n" 461 "\n" 462 " [-V|--version] print version number and exit\n" 463 " [--dump-build-type] print build type and exit\n" 464 " [-q|--nologo] suppress the logo\n" 465 " [--settingspw <pw>] provide the settings password\n" 466 " [--settingspwfile <file>] provide a file containing the settings password\n" 467 " [@<response-file>] load arguments from the given response file (bourne style)\n" 468 "\n" 469 "\n" 470 "Commands:\n" 471 "\n")); 464 472 465 473 const char *pcszSep1 = " "; … … 476 484 { 477 485 RTStrmPrintf(pStrm, 478 "%s startvm %s <uuid|vmname>...\n" 479 " [--type gui", SEP); 486 Help::tr( 487 "%s startvm %s <uuid|vmname>...\n" 488 " [--type gui"), SEP); 480 489 if (fVBoxSDL) 481 490 RTStrmPrintf(pStrm, "|sdl"); 482 491 RTStrmPrintf(pStrm, "|headless|separate]\n"); 483 492 RTStrmPrintf(pStrm, 484 " [-E|--putenv <NAME>[=<VALUE>]]\n" 485 "\n"); 493 Help::tr( 494 " [-E|--putenv <NAME>[=<VALUE>]]\n" 495 "\n")); 486 496 } 487 497 … … 489 499 { 490 500 RTStrmPrintf(pStrm, 491 "%s controlvm %s <uuid|vmname>\n" 492 " pause|resume|reset|poweroff|savestate|\n" 501 Help::tr( 502 "%s controlvm %s <uuid|vmname>\n" 503 " pause|resume|reset|poweroff|savestate|\n"), SEP); 493 504 #ifdef VBOX_WITH_GUEST_CONTROL 494 " reboot|shutdown [--force]|\n" 495 #endif 496 " acpipowerbutton|acpisleepbutton|\n" 497 " keyboardputscancode <hex> [<hex> ...]|\n" 498 " keyboardputstring <string1> [<string2> ...]|\n" 499 " keyboardputfile <filename>|\n" 500 " setlinkstate<1-N> on|off |\n" 505 RTStrmPrintf(pStrm, 506 " reboot|shutdown [--force]|\n"); 507 #endif 508 RTStrmPrintf(pStrm, 509 Help::tr( 510 " acpipowerbutton|acpisleepbutton|\n" 511 " keyboardputscancode <hex> [<hex> ...]|\n" 512 " keyboardputstring <string1> [<string2> ...]|\n" 513 " keyboardputfile <filename>|\n" 514 " setlinkstate<1-N> on|off |\n")); 501 515 #if defined(VBOX_WITH_NETFLT) 502 " nic<1-N> null|nat|bridged|intnet|hostonly|generic|\n" 503 " natnetwork [<devicename>] |\n" 516 RTStrmPrintf(pStrm, 517 Help::tr( 518 " nic<1-N> null|nat|bridged|intnet|hostonly|generic|\n" 519 " natnetwork [<devicename>] |\n")); 504 520 #else /* !VBOX_WITH_NETFLT */ 505 " nic<1-N> null|nat|bridged|intnet|generic|natnetwork\n" 506 " [<devicename>] |\n" 521 RTStrmPrintf(pStrm, 522 Help::tr( 523 " nic<1-N> null|nat|bridged|intnet|generic|natnetwork\n" 524 " [<devicename>] |\n")); 507 525 #endif /* !VBOX_WITH_NETFLT */ 508 " nictrace<1-N> on|off |\n" 509 " nictracefile<1-N> <filename> |\n" 510 " nicproperty<1-N> name=[value] |\n" 511 " nicpromisc<1-N> deny|allow-vms|allow-all |\n" 512 " natpf<1-N> [<rulename>],tcp|udp,[<hostip>],\n" 513 " <hostport>,[<guestip>],<guestport> |\n" 514 " natpf<1-N> delete <rulename> |\n" 515 " guestmemoryballoon <balloonsize in MB> |\n" 516 " usbattach <uuid>|<address>\n" 517 " [--capturefile <filename>] |\n" 518 " usbdetach <uuid>|<address> |\n" 519 " audioin on|off |\n" 520 " audioout on|off |\n" 526 RTStrmPrintf(pStrm, 527 Help::tr( 528 " nictrace<1-N> on|off |\n" 529 " nictracefile<1-N> <filename> |\n" 530 " nicproperty<1-N> name=[value] |\n" 531 " nicpromisc<1-N> deny|allow-vms|allow-all |\n" 532 " natpf<1-N> [<rulename>],tcp|udp,[<hostip>],\n" 533 " <hostport>,[<guestip>],<guestport> |\n" 534 " natpf<1-N> delete <rulename> |\n" 535 " guestmemoryballoon <balloonsize in MB> |\n" 536 " usbattach <uuid>|<address>\n" 537 " [--capturefile <filename>] |\n" 538 " usbdetach <uuid>|<address> |\n" 539 " audioin on|off |\n" 540 " audioout on|off |\n")); 521 541 #ifdef VBOX_WITH_SHARED_CLIPBOARD 522 " clipboard mode disabled|hosttoguest|guesttohost|\n" 523 " bidirectional |\n" 542 RTStrmPrintf(pStrm, 543 " clipboard mode disabled|hosttoguest|guesttohost|\n" 544 " bidirectional |\n"); 524 545 # ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 525 " clipboard filetransfers enabled|disabled |\n" 546 RTStrmPrintf(pStrm, 547 " clipboard filetransfers enabled|disabled |\n"); 526 548 # endif 527 549 #endif 528 " draganddrop disabled|hosttoguest|guesttohost|\n" 529 " bidirectional |\n" 530 " vrde on|off |\n" 531 " vrdeport <port> |\n" 532 " vrdeproperty <name=[value]> |\n" 533 " vrdevideochannelquality <percent> |\n" 534 " setvideomodehint <xres> <yres> <bpp>\n" 535 " [[<display>] [<enabled:yes|no> |\n" 536 " [<xorigin> <yorigin>]]] |\n" 537 " setscreenlayout <display> on|primary <xorigin> <yorigin> <xres> <yres> <bpp> | off\n" 538 " screenshotpng <file> [display] |\n" 550 RTStrmPrintf(pStrm, 551 Help::tr( 552 " draganddrop disabled|hosttoguest|guesttohost|\n" 553 " bidirectional |\n" 554 " vrde on|off |\n" 555 " vrdeport <port> |\n" 556 " vrdeproperty <name=[value]> |\n" 557 " vrdevideochannelquality <percent> |\n" 558 " setvideomodehint <xres> <yres> <bpp>\n" 559 " [[<display>] [<enabled:yes|no> |\n" 560 " [<xorigin> <yorigin>]]] |\n" 561 " setscreenlayout <display> on|primary <xorigin> <yorigin> <xres> <yres> <bpp> | off\n" 562 " screenshotpng <file> [display] |\n")); 539 563 #ifdef VBOX_WITH_RECORDING 540 " recording on|off |\n" 541 " recording screens all|none|<screen>,[<screen>...] |\n" 542 " recording filename <file> |\n" 543 " recording videores <width>x<height> |\n" 544 " recording videorate <rate> |\n" 545 " recording videofps <fps> |\n" 546 " recording maxtime <s> |\n" 547 " recording maxfilesize <MB> |\n" 564 RTStrmPrintf(pStrm, 565 Help::tr( 566 " recording on|off |\n" 567 " recording screens all|none|<screen>,[<screen>...] |\n" 568 " recording filename <file> |\n" 569 " recording videores <width>x<height> |\n" 570 " recording videorate <rate> |\n" 571 " recording videofps <fps> |\n" 572 " recording maxtime <s> |\n" 573 " recording maxfilesize <MB> |\n")); 548 574 #endif /* VBOX_WITH_RECORDING */ 549 " setcredentials <username>\n" 550 " --passwordfile <file> | <password>\n" 551 " <domain>\n" 552 " [--allowlocallogon <yes|no>] |\n" 553 " teleport --host <name> --port <port>\n" 554 " [--maxdowntime <msec>]\n" 555 " [--passwordfile <file> |\n" 556 " --password <password>] |\n" 557 " plugcpu <id> |\n" 558 " unplugcpu <id> |\n" 559 " cpuexecutioncap <1-100>\n" 560 " webcam <attach [path [settings]]> | <detach [path]> | <list>\n" 561 " addencpassword <id>\n" 562 " <password file>|-\n" 563 " [--removeonsuspend <yes|no>]\n" 564 " removeencpassword <id>\n" 565 " removeallencpasswords\n" 566 " changeuartmode<1-N> disconnected|\n" 567 " server <pipe>|\n" 568 " client <pipe>|\n" 569 " tcpserver <port>|\n" 570 " tcpclient <hostname:port>|\n" 571 " file <file>|\n" 572 " <devicename>\n" 573 " vm-process-priority default|flat|low|normal|high\n" 574 " autostart-enabled on|off\n" 575 " autostart-delay <seconds>\n" 576 "\n", SEP); 575 RTStrmPrintf(pStrm, 576 Help::tr( 577 " setcredentials <username>\n" 578 " --passwordfile <file> | <password>\n" 579 " <domain>\n" 580 " [--allowlocallogon <yes|no>] |\n" 581 " teleport --host <name> --port <port>\n" 582 " [--maxdowntime <msec>]\n" 583 " [--passwordfile <file> |\n" 584 " --password <password>] |\n" 585 " plugcpu <id> |\n" 586 " unplugcpu <id> |\n" 587 " cpuexecutioncap <1-100>\n" 588 " webcam <attach [path [settings]]> | <detach [path]> | <list>\n" 589 " addencpassword <id>\n" 590 " <password file>|-\n" 591 " [--removeonsuspend <yes|no>]\n" 592 " removeencpassword <id>\n" 593 " removeallencpasswords\n" 594 " changeuartmode<1-N> disconnected|\n" 595 " server <pipe>|\n" 596 " client <pipe>|\n" 597 " tcpserver <port>|\n" 598 " tcpclient <hostname:port>|\n" 599 " file <file>|\n" 600 " <devicename>\n" 601 " vm-process-priority default|flat|low|normal|high\n" 602 " autostart-enabled on|off\n" 603 " autostart-delay <seconds>\n" 604 "\n")); 577 605 } 578 606 579 607 if (enmCommand == USAGE_DISCARDSTATE || enmCommand == USAGE_S_ALL) 580 608 RTStrmPrintf(pStrm, 581 "%s discardstate %s <uuid|vmname>\n" 582 "\n", SEP); 609 Help::tr( 610 "%s discardstate %s <uuid|vmname>\n" 611 "\n"), SEP); 583 612 584 613 if (enmCommand == USAGE_ADOPTSTATE || enmCommand == USAGE_S_ALL) 585 614 RTStrmPrintf(pStrm, 586 "%s adoptstate %s <uuid|vmname> <state_file>\n" 587 "\n", SEP); 615 Help::tr( 616 "%s adoptstate %s <uuid|vmname> <state_file>\n" 617 "\n"), SEP); 588 618 589 619 if (enmCommand == USAGE_CLOSEMEDIUM || enmCommand == USAGE_S_ALL) 590 620 RTStrmPrintf(pStrm, 591 "%s closemedium %s [disk|dvd|floppy] <uuid|filename>\n" 592 " [--delete]\n" 593 "\n", SEP); 621 Help::tr( 622 "%s closemedium %s [disk|dvd|floppy] <uuid|filename>\n" 623 " [--delete]\n" 624 "\n"), SEP); 594 625 595 626 if (enmCommand == USAGE_STORAGEATTACH || enmCommand == USAGE_S_ALL) 596 627 RTStrmPrintf(pStrm, 597 "%s storageattach %s <uuid|vmname>\n" 598 " --storagectl <name>\n" 599 " [--port <number>]\n" 600 " [--device <number>]\n" 601 " [--type dvddrive|hdd|fdd]\n" 602 " [--medium none|emptydrive|additions|\n" 603 " <uuid|filename>|host:<drive>|iscsi]\n" 604 " [--mtype normal|writethrough|immutable|shareable|\n" 605 " readonly|multiattach]\n" 606 " [--comment <text>]\n" 607 " [--setuuid <uuid>]\n" 608 " [--setparentuuid <uuid>]\n" 609 " [--passthrough on|off]\n" 610 " [--tempeject on|off]\n" 611 " [--nonrotational on|off]\n" 612 " [--discard on|off]\n" 613 " [--hotpluggable on|off]\n" 614 " [--bandwidthgroup <name>]\n" 615 " [--forceunmount]\n" 616 " [--server <name>|<ip>]\n" 617 " [--target <target>]\n" 618 " [--tport <port>]\n" 619 " [--lun <lun>]\n" 620 " [--encodedlun <lun>]\n" 621 " [--username <username>]\n" 622 " [--password <password>]\n" 623 " [--passwordfile <file>]\n" 624 " [--initiator <initiator>]\n" 625 " [--intnet]\n" 626 "\n", SEP); 628 Help::tr( 629 "%s storageattach %s <uuid|vmname>\n" 630 " --storagectl <name>\n" 631 " [--port <number>]\n" 632 " [--device <number>]\n" 633 " [--type dvddrive|hdd|fdd]\n" 634 " [--medium none|emptydrive|additions|\n" 635 " <uuid|filename>|host:<drive>|iscsi]\n" 636 " [--mtype normal|writethrough|immutable|shareable|\n" 637 " readonly|multiattach]\n" 638 " [--comment <text>]\n" 639 " [--setuuid <uuid>]\n" 640 " [--setparentuuid <uuid>]\n" 641 " [--passthrough on|off]\n" 642 " [--tempeject on|off]\n" 643 " [--nonrotational on|off]\n" 644 " [--discard on|off]\n" 645 " [--hotpluggable on|off]\n" 646 " [--bandwidthgroup <name>]\n" 647 " [--forceunmount]\n" 648 " [--server <name>|<ip>]\n" 649 " [--target <target>]\n" 650 " [--tport <port>]\n" 651 " [--lun <lun>]\n" 652 " [--encodedlun <lun>]\n" 653 " [--username <username>]\n" 654 " [--password <password>]\n" 655 " [--passwordfile <file>]\n" 656 " [--initiator <initiator>]\n" 657 " [--intnet]\n" 658 "\n"), SEP); 627 659 628 660 if (enmCommand == USAGE_STORAGECONTROLLER || enmCommand == USAGE_S_ALL) 629 661 RTStrmPrintf(pStrm, 630 "%s storagectl %s <uuid|vmname>\n" 631 " --name <name>\n" 632 " [--add ide|sata|scsi|floppy|sas|usb|pcie|virtio]\n" 633 " [--controller LSILogic|LSILogicSAS|BusLogic|\n" 634 " IntelAHCI|PIIX3|PIIX4|ICH6|I82078|\n" 635 " [ USB|NVMe|VirtIO]\n" 636 " [--portcount <1-n>]\n" 637 " [--hostiocache on|off]\n" 638 " [--bootable on|off]\n" 639 " [--rename <name>]\n" 640 " [--remove]\n" 641 "\n", SEP); 662 Help::tr( 663 "%s storagectl %s <uuid|vmname>\n" 664 " --name <name>\n" 665 " [--add ide|sata|scsi|floppy|sas|usb|pcie|virtio]\n" 666 " [--controller LSILogic|LSILogicSAS|BusLogic|\n" 667 " IntelAHCI|PIIX3|PIIX4|ICH6|I82078|\n" 668 " [ USB|NVMe|VirtIO]\n" 669 " [--portcount <1-n>]\n" 670 " [--hostiocache on|off]\n" 671 " [--bootable on|off]\n" 672 " [--rename <name>]\n" 673 " [--remove]\n" 674 "\n"), SEP); 642 675 643 676 if (enmCommand == USAGE_BANDWIDTHCONTROL || enmCommand == USAGE_S_ALL) 644 677 RTStrmPrintf(pStrm, 645 "%s bandwidthctl %s <uuid|vmname>\n" 646 " add <name> --type disk|network\n" 647 " --limit <megabytes per second>[k|m|g|K|M|G] |\n" 648 " set <name>\n" 649 " --limit <megabytes per second>[k|m|g|K|M|G] |\n" 650 " remove <name> |\n" 651 " list [--machinereadable]\n" 652 " (limit units: k=kilobit, m=megabit, g=gigabit,\n" 653 " K=kilobyte, M=megabyte, G=gigabyte)\n" 654 "\n", SEP); 678 Help::tr( 679 "%s bandwidthctl %s <uuid|vmname>\n" 680 " add <name> --type disk|network\n" 681 " --limit <megabytes per second>[k|m|g|K|M|G] |\n" 682 " set <name>\n" 683 " --limit <megabytes per second>[k|m|g|K|M|G] |\n" 684 " remove <name> |\n" 685 " list [--machinereadable]\n" 686 " (limit units: k=kilobit, m=megabit, g=gigabit,\n" 687 " K=kilobyte, M=megabyte, G=gigabyte)\n" 688 "\n"), SEP); 655 689 656 690 if (enmCommand == USAGE_SHOWMEDIUMINFO || enmCommand == USAGE_S_ALL) 657 691 RTStrmPrintf(pStrm, 658 "%s showmediuminfo %s [disk|dvd|floppy] <uuid|filename>\n" 659 "\n", SEP); 692 Help::tr( 693 "%s showmediuminfo %s [disk|dvd|floppy] <uuid|filename>\n" 694 "\n"), SEP); 660 695 661 696 if (enmCommand == USAGE_CREATEMEDIUM || enmCommand == USAGE_S_ALL) 662 697 RTStrmPrintf(pStrm, 663 "%s createmedium %s [disk|dvd|floppy] --filename <filename>\n" 664 " [--size <megabytes>|--sizebyte <bytes>]\n" 665 " [--diffparent <uuid>|<filename>]\n" 666 " [--format VDI|VMDK|VHD] (default: VDI)]\n" 667 " [--variant Standard,Fixed,Split2G,Stream,ESX,\n" 668 " Formatted,RawDisk]\n" 669 " [[--property <name>=<value>] --property <name>=<value>\n" 670 " --property-file <name>=</path/to/file/with/value>]...\n" 671 "\n", SEP); 698 Help::tr( 699 "%s createmedium %s [disk|dvd|floppy] --filename <filename>\n" 700 " [--size <megabytes>|--sizebyte <bytes>]\n" 701 " [--diffparent <uuid>|<filename>]\n" 702 " [--format VDI|VMDK|VHD] (default: VDI)]\n" 703 " [--variant Standard,Fixed,Split2G,Stream,ESX,\n" 704 " Formatted,RawDisk]\n" 705 " [[--property <name>=<value>] --property <name>=<value>\n" 706 " --property-file <name>=</path/to/file/with/value>]...\n" 707 "\n"), SEP); 672 708 673 709 if (enmCommand == USAGE_MODIFYMEDIUM || enmCommand == USAGE_S_ALL) 674 710 RTStrmPrintf(pStrm, 675 "%s modifymedium %s [disk|dvd|floppy] <uuid|filename>\n" 676 " [--type normal|writethrough|immutable|shareable|\n" 677 " readonly|multiattach]\n" 678 " [--autoreset on|off]\n" 679 " [--property <name=[value]>]\n" 680 " [--compact]\n" 681 " [--resize <megabytes>|--resizebyte <bytes>]\n" 682 " [--move <path>]\n" 683 " [--setlocation <path>]\n" 684 " [--description <description string>]" 685 "\n", SEP); 711 Help::tr( 712 "%s modifymedium %s [disk|dvd|floppy] <uuid|filename>\n" 713 " [--type normal|writethrough|immutable|shareable|\n" 714 " readonly|multiattach]\n" 715 " [--autoreset on|off]\n" 716 " [--property <name=[value]>]\n" 717 " [--compact]\n" 718 " [--resize <megabytes>|--resizebyte <bytes>]\n" 719 " [--move <path>]\n" 720 " [--setlocation <path>]\n" 721 " [--description <description string>]" 722 "\n"), SEP); 686 723 687 724 if (enmCommand == USAGE_CLONEMEDIUM || enmCommand == USAGE_S_ALL) 688 725 RTStrmPrintf(pStrm, 689 "%s clonemedium %s [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>\n" 690 " [--format VDI|VMDK|VHD|RAW|<other>]\n" 691 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 692 " [--existing]\n" 693 "\n", SEP); 726 Help::tr( 727 "%s clonemedium %s [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>\n" 728 " [--format VDI|VMDK|VHD|RAW|<other>]\n" 729 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 730 " [--existing]\n" 731 "\n"), SEP); 694 732 695 733 if (enmCommand == USAGE_MEDIUMPROPERTY || enmCommand == USAGE_S_ALL) 696 734 RTStrmPrintf(pStrm, 697 "%s mediumproperty %s [disk|dvd|floppy] set <uuid|filename>\n" 698 " <property> <value>\n" 699 "\n" 700 " [disk|dvd|floppy] get <uuid|filename>\n" 701 " <property>\n" 702 "\n" 703 " [disk|dvd|floppy] delete <uuid|filename>\n" 704 " <property>\n" 705 "\n", SEP); 735 Help::tr( 736 "%s mediumproperty %s [disk|dvd|floppy] set <uuid|filename>\n" 737 " <property> <value>\n" 738 "\n" 739 " [disk|dvd|floppy] get <uuid|filename>\n" 740 " <property>\n" 741 "\n" 742 " [disk|dvd|floppy] delete <uuid|filename>\n" 743 " <property>\n" 744 "\n"), SEP); 706 745 707 746 if (enmCommand == USAGE_ENCRYPTMEDIUM || enmCommand == USAGE_S_ALL) 708 747 RTStrmPrintf(pStrm, 709 "%s encryptmedium %s <uuid|filename>\n" 710 " [--newpassword <file>|-]\n" 711 " [--oldpassword <file>|-]\n" 712 " [--cipher <cipher identifier>]\n" 713 " [--newpasswordid <password identifier>]\n" 714 "\n", SEP); 748 Help::tr( 749 "%s encryptmedium %s <uuid|filename>\n" 750 " [--newpassword <file>|-]\n" 751 " [--oldpassword <file>|-]\n" 752 " [--cipher <cipher identifier>]\n" 753 " [--newpasswordid <password identifier>]\n" 754 "\n"), SEP); 715 755 716 756 if (enmCommand == USAGE_MEDIUMENCCHKPWD || enmCommand == USAGE_S_ALL) 717 757 RTStrmPrintf(pStrm, 718 "%s checkmediumpwd %s <uuid|filename>\n" 719 " <pwd file>|-\n" 720 "\n", SEP); 758 Help::tr( 759 "%s checkmediumpwd %s <uuid|filename>\n" 760 " <pwd file>|-\n" 761 "\n"), SEP); 721 762 722 763 if (enmCommand == USAGE_CONVERTFROMRAW || enmCommand == USAGE_S_ALL) 723 764 RTStrmPrintf(pStrm, 724 "%s convertfromraw %s <filename> <outputfile>\n" 725 " [--format VDI|VMDK|VHD]\n" 726 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 727 " [--uuid <uuid>]\n" 728 "%s convertfromraw %s stdin <outputfile> <bytes>\n" 729 " [--format VDI|VMDK|VHD]\n" 730 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 731 " [--uuid <uuid>]\n" 732 "\n", SEP, SEP); 765 Help::tr( 766 "%s convertfromraw %s <filename> <outputfile>\n" 767 " [--format VDI|VMDK|VHD]\n" 768 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 769 " [--uuid <uuid>]\n" 770 "%s convertfromraw %s stdin <outputfile> <bytes>\n" 771 " [--format VDI|VMDK|VHD]\n" 772 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 773 " [--uuid <uuid>]\n" 774 "\n"), SEP, SEP); 733 775 734 776 if (enmCommand == USAGE_GETEXTRADATA || enmCommand == USAGE_S_ALL) 735 777 RTStrmPrintf(pStrm, 736 "%s getextradata %s global|<uuid|vmname>\n" 737 " <key>|[enumerate]\n" 738 "\n", SEP); 778 Help::tr( 779 "%s getextradata %s global|<uuid|vmname>\n" 780 " <key>|[enumerate]\n" 781 "\n"), SEP); 739 782 740 783 if (enmCommand == USAGE_SETEXTRADATA || enmCommand == USAGE_S_ALL) 741 784 RTStrmPrintf(pStrm, 742 "%s setextradata %s global|<uuid|vmname>\n" 743 " <key>\n" 744 " [<value>] (no value deletes key)\n" 745 "\n", SEP); 785 Help::tr( 786 "%s setextradata %s global|<uuid|vmname>\n" 787 " <key>\n" 788 " [<value>] (no value deletes key)\n" 789 "\n"), SEP); 746 790 747 791 if (enmCommand == USAGE_SETPROPERTY || enmCommand == USAGE_S_ALL) 748 792 RTStrmPrintf(pStrm, 749 "%s setproperty %s machinefolder default|<folder> |\n" 750 " hwvirtexclusive on|off |\n" 751 " vrdeauthlibrary default|<library> |\n" 752 " websrvauthlibrary default|null|<library> |\n" 753 " vrdeextpack null|<library> |\n" 754 " autostartdbpath null|<folder> |\n" 755 " loghistorycount <value>\n" 756 " defaultfrontend default|<name>\n" 757 " logginglevel <log setting>\n" 758 " proxymode system|noproxy|manual\n" 759 " proxyurl <url>\n" 793 Help::tr( 794 "%s setproperty %s machinefolder default|<folder> |\n" 795 " hwvirtexclusive on|off |\n" 796 " vrdeauthlibrary default|<library> |\n" 797 " websrvauthlibrary default|null|<library> |\n" 798 " vrdeextpack null|<library> |\n" 799 " autostartdbpath null|<folder> |\n" 800 " loghistorycount <value>\n" 801 " defaultfrontend default|<name>\n" 802 " logginglevel <log setting>\n" 803 " proxymode system|noproxy|manual\n" 804 " proxyurl <url>\n"), SEP); 760 805 #ifdef VBOX_WITH_MAIN_NLS 761 " language <language id>\n" 762 #endif 763 "\n", SEP); 806 RTStrmPrintf(pStrm, 807 Help::tr( 808 " language <language id>\n")); 809 #endif 810 RTStrmPrintf(pStrm, 811 "\n"); 764 812 765 813 if (enmCommand == USAGE_USBFILTER || enmCommand == USAGE_S_ALL) … … 767 815 if (fSubcommandScope & HELP_SCOPE_USBFILTER_ADD) 768 816 RTStrmPrintf(pStrm, 769 "%s usbfilter %s add <index,0-N>\n" 770 " --target <uuid|vmname>|global\n" 771 " --name <string>\n" 772 " --action ignore|hold (global filters only)\n" 773 " [--active yes|no] (yes)\n" 774 " [--vendorid <XXXX>] (null)\n" 775 " [--productid <XXXX>] (null)\n" 776 " [--revision <IIFF>] (null)\n" 777 " [--manufacturer <string>] (null)\n" 778 " [--product <string>] (null)\n" 779 " [--remote yes|no] (null, VM filters only)\n" 780 " [--serialnumber <string>] (null)\n" 781 " [--maskedinterfaces <XXXXXXXX>]\n" 782 "\n", SEP); 817 Help::tr( 818 "%s usbfilter %s add <index,0-N>\n" 819 " --target <uuid|vmname>|global\n" 820 " --name <string>\n" 821 " --action ignore|hold (global filters only)\n" 822 " [--active yes|no] (yes)\n" 823 " [--vendorid <XXXX>] (null)\n" 824 " [--productid <XXXX>] (null)\n" 825 " [--revision <IIFF>] (null)\n" 826 " [--manufacturer <string>] (null)\n" 827 " [--product <string>] (null)\n" 828 " [--remote yes|no] (null, VM filters only)\n" 829 " [--serialnumber <string>] (null)\n" 830 " [--maskedinterfaces <XXXXXXXX>]\n" 831 "\n"), SEP); 783 832 784 833 if (fSubcommandScope & HELP_SCOPE_USBFILTER_MODIFY) 785 834 RTStrmPrintf(pStrm, 786 "%s usbfilter %s modify <index,0-N>\n" 787 " --target <uuid|vmname>|global\n" 788 " [--name <string>]\n" 789 " [--action ignore|hold] (global filters only)\n" 790 " [--active yes|no]\n" 791 " [--vendorid <XXXX>|\"\"]\n" 792 " [--productid <XXXX>|\"\"]\n" 793 " [--revision <IIFF>|\"\"]\n" 794 " [--manufacturer <string>|\"\"]\n" 795 " [--product <string>|\"\"]\n" 796 " [--remote yes|no] (null, VM filters only)\n" 797 " [--serialnumber <string>|\"\"]\n" 798 " [--maskedinterfaces <XXXXXXXX>]\n" 799 "\n", SEP); 835 Help::tr( 836 "%s usbfilter %s modify <index,0-N>\n" 837 " --target <uuid|vmname>|global\n" 838 " [--name <string>]\n" 839 " [--action ignore|hold] (global filters only)\n" 840 " [--active yes|no]\n" 841 " [--vendorid <XXXX>|\"\"]\n" 842 " [--productid <XXXX>|\"\"]\n" 843 " [--revision <IIFF>|\"\"]\n" 844 " [--manufacturer <string>|\"\"]\n" 845 " [--product <string>|\"\"]\n" 846 " [--remote yes|no] (null, VM filters only)\n" 847 " [--serialnumber <string>|\"\"]\n" 848 " [--maskedinterfaces <XXXXXXXX>]\n" 849 "\n"), SEP); 800 850 801 851 if (fSubcommandScope & HELP_SCOPE_USBFILTER_REMOVE) 802 852 RTStrmPrintf(pStrm, 803 "%s usbfilter %s remove <index,0-N>\n" 804 " --target <uuid|vmname>|global\n" 805 "\n", SEP); 853 Help::tr( 854 "%s usbfilter %s remove <index,0-N>\n" 855 " --target <uuid|vmname>|global\n" 856 "\n"), SEP); 806 857 } 807 858 … … 818 869 if (enmCommand == USAGE_METRICS || enmCommand == USAGE_S_ALL) 819 870 RTStrmPrintf(pStrm, 820 "%s metrics %s list [*|host|<vmname> [<metric_list>]]\n" 821 " (comma-separated)\n\n" 822 "%s metrics %s setup\n" 823 " [--period <seconds>] (default: 1)\n" 824 " [--samples <count>] (default: 1)\n" 825 " [--list]\n" 826 " [*|host|<vmname> [<metric_list>]]\n\n" 827 "%s metrics %s query [*|host|<vmname> [<metric_list>]]\n\n" 828 "%s metrics %s enable\n" 829 " [--list]\n" 830 " [*|host|<vmname> [<metric_list>]]\n\n" 831 "%s metrics %s disable\n" 832 " [--list]\n" 833 " [*|host|<vmname> [<metric_list>]]\n\n" 834 "%s metrics %s collect\n" 835 " [--period <seconds>] (default: 1)\n" 836 " [--samples <count>] (default: 1)\n" 837 " [--list]\n" 838 " [--detach]\n" 839 " [*|host|<vmname> [<metric_list>]]\n" 840 "\n", SEP, SEP, SEP, SEP, SEP, SEP); 871 Help::tr( 872 "%s metrics %s list [*|host|<vmname> [<metric_list>]]\n" 873 " (comma-separated)\n\n" 874 "%s metrics %s setup\n" 875 " [--period <seconds>] (default: 1)\n" 876 " [--samples <count>] (default: 1)\n" 877 " [--list]\n" 878 " [*|host|<vmname> [<metric_list>]]\n\n" 879 "%s metrics %s query [*|host|<vmname> [<metric_list>]]\n\n" 880 "%s metrics %s enable\n" 881 " [--list]\n" 882 " [*|host|<vmname> [<metric_list>]]\n\n" 883 "%s metrics %s disable\n" 884 " [--list]\n" 885 " [*|host|<vmname> [<metric_list>]]\n\n" 886 "%s metrics %s collect\n" 887 " [--period <seconds>] (default: 1)\n" 888 " [--samples <count>] (default: 1)\n" 889 " [--list]\n" 890 " [--detach]\n" 891 " [*|host|<vmname> [<metric_list>]]\n" 892 "\n"), SEP, SEP, SEP, SEP, SEP, SEP); 841 893 842 894 #if defined(VBOX_WITH_NAT_SERVICE) … … 844 896 { 845 897 RTStrmPrintf(pStrm, 846 "%s natnetwork %s add --netname <name>\n" 847 " --network <network>\n" 848 " [--enable|--disable]\n" 849 " [--dhcp on|off]\n" 850 " [--port-forward-4 <rule>]\n" 851 " [--loopback-4 <rule>]\n" 852 " [--ipv6 on|off]\n" 853 " [--port-forward-6 <rule>]\n" 854 " [--loopback-6 <rule>]\n\n" 855 "%s natnetwork %s remove --netname <name>\n\n" 856 "%s natnetwork %s modify --netname <name>\n" 857 " [--network <network>]\n" 858 " [--enable|--disable]\n" 859 " [--dhcp on|off]\n" 860 " [--port-forward-4 <rule>]\n" 861 " [--loopback-4 <rule>]\n" 862 " [--ipv6 on|off]\n" 863 " [--port-forward-6 <rule>]\n" 864 " [--loopback-6 <rule>]\n\n" 865 "%s natnetwork %s start --netname <name>\n\n" 866 "%s natnetwork %s stop --netname <name>\n\n" 867 "%s natnetwork %s list [<pattern>]\n" 868 "\n", SEP, SEP, SEP, SEP, SEP, SEP); 898 Help::tr( 899 "%s natnetwork %s add --netname <name>\n" 900 " --network <network>\n" 901 " [--enable|--disable]\n" 902 " [--dhcp on|off]\n" 903 " [--port-forward-4 <rule>]\n" 904 " [--loopback-4 <rule>]\n" 905 " [--ipv6 on|off]\n" 906 " [--port-forward-6 <rule>]\n" 907 " [--loopback-6 <rule>]\n\n" 908 "%s natnetwork %s remove --netname <name>\n\n" 909 "%s natnetwork %s modify --netname <name>\n" 910 " [--network <network>]\n" 911 " [--enable|--disable]\n" 912 " [--dhcp on|off]\n" 913 " [--port-forward-4 <rule>]\n" 914 " [--loopback-4 <rule>]\n" 915 " [--ipv6 on|off]\n" 916 " [--port-forward-6 <rule>]\n" 917 " [--loopback-6 <rule>]\n\n" 918 "%s natnetwork %s start --netname <name>\n\n" 919 "%s natnetwork %s stop --netname <name>\n\n" 920 "%s natnetwork %s list [<pattern>]\n" 921 "\n"), SEP, SEP, SEP, SEP, SEP, SEP); 869 922 870 923 … … 876 929 { 877 930 RTStrmPrintf(pStrm, 878 "%s hostonlyif %s ipconfig <name>\n" 879 " [--dhcp |\n" 880 " --ip <ipv4> [--netmask <ipv4> (def:255.255.255.0)]|\n" 881 " --ipv6 <ipv6> [--netmasklengthv6 <N> (def:64)]]" 931 Help::tr( 932 "%s hostonlyif %s ipconfig <name>\n" 933 " [--dhcp |\n" 934 " --ip <ipv4> [--netmask <ipv4> (def:255.255.255.0)]|\n" 935 " --ipv6 <ipv6> [--netmasklengthv6 <N> (def:64)]]"), SEP); 882 936 # if !defined(RT_OS_SOLARIS) || defined(VBOX_ONLY_DOCS) 883 " |\n" 884 " create |\n" 885 " remove <name>\n" 937 RTStrmPrintf(pStrm, 938 Help::tr( 939 " |\n" 940 " create |\n" 941 " remove <name>\n")); 886 942 # else 887 "\n" 943 RTStrmPrintf(pStrm, 944 Help::tr( 945 "\n"); 888 946 # endif 889 "\n", SEP); 947 RTStrmPrintf(pStrm, 948 "\n"); 890 949 } 891 950 #endif … … 894 953 { 895 954 RTStrmPrintf(pStrm, 896 "%s usbdevsource %s add <source name>\n" 897 " --backend <backend>\n" 898 " --address <address>\n" 899 "%s usbdevsource %s remove <source name>\n" 900 "\n", SEP, SEP); 955 Help::tr( 956 "%s usbdevsource %s add <source name>\n" 957 " --backend <backend>\n" 958 " --address <address>\n" 959 "%s usbdevsource %s remove <source name>\n" 960 "\n"), SEP, SEP); 901 961 } 902 962 … … 939 999 #endif 940 1000 va_start(args, pszFormat); 941 RTStrmPrintf(g_pStdErr, "\nSyntax error: %N\n", pszFormat, &args);1001 RTStrmPrintf(g_pStdErr, Help::tr("\nSyntax error: %N\n"), pszFormat, &args); 942 1002 va_end(args); 943 1003 return RTEXITCODE_SYNTAX; … … 963 1023 #endif 964 1024 va_start(args, pszFormat); 965 RTStrmPrintf(g_pStdErr, "\nSyntax error: %N\n", pszFormat, &args);1025 RTStrmPrintf(g_pStdErr, Help::tr("\nSyntax error: %N\n"), pszFormat, &args); 966 1026 va_end(args); 967 1027 return RTEXITCODE_SYNTAX; … … 1022 1082 1023 1083 if (rc == VINF_GETOPT_NOT_OPTION) 1024 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Invalid parameter '%s'", pValueUnion->psz);1084 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Help::tr("Invalid parameter '%s'"), pValueUnion->psz); 1025 1085 if (rc > 0) 1026 1086 { 1027 1087 if (RT_C_IS_PRINT(rc)) 1028 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Invalid option -%c", rc);1029 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Invalid option case %i", rc);1088 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Help::tr("Invalid option -%c"), rc); 1089 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Help::tr("Invalid option case %i"), rc); 1030 1090 } 1031 1091 if (rc == VERR_GETOPT_UNKNOWN_OPTION) 1032 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Unknown option: %s", pValueUnion->psz);1092 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Help::tr("Unknown option: %s"), pValueUnion->psz); 1033 1093 if (rc == VERR_GETOPT_INVALID_ARGUMENT_FORMAT) 1034 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Invalid argument format: %s", pValueUnion->psz);1094 return RTMsgErrorExit(RTEXITCODE_SYNTAX, Help::tr("Invalid argument format: %s"), pValueUnion->psz); 1035 1095 if (pValueUnion->pDef) 1036 1096 return RTMsgErrorExit(RTEXITCODE_SYNTAX, "%s: %Rrs", pValueUnion->pDef->pszLong, rc); … … 1065 1125 return RTEXITCODE_SYNTAX; 1066 1126 } 1067 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r91416 r92372 41 41 #include "VBoxManage.h" 42 42 43 DECLARE_TRANSLATION_CONTEXT(HostOnly); 44 43 45 #ifndef VBOX_ONLY_DOCS 44 46 using namespace com; … … 93 95 { 94 96 /*HRESULT hrc =*/ showProgress(progress); 95 CHECK_PROGRESS_ERROR_RET(progress, ( "Failed to create the host-only adapter"), RTEXITCODE_FAILURE);97 CHECK_PROGRESS_ERROR_RET(progress, (HostOnly::tr("Failed to create the host-only adapter")), RTEXITCODE_FAILURE); 96 98 } 97 99 … … 102 104 RTPrintf("%ls", bstrName.raw()); 103 105 else 104 RTPrintf( "Interface '%ls' was successfully created\n", bstrName.raw());106 RTPrintf(HostOnly::tr("Interface '%ls' was successfully created\n"), bstrName.raw()); 105 107 return RTEXITCODE_SUCCESS; 106 108 } … … 121 123 case VINF_GETOPT_NOT_OPTION: 122 124 if (pszName) 123 return errorSyntax(USAGE_HOSTONLYIFS, "Only one interface name can be specified");125 return errorSyntax(USAGE_HOSTONLYIFS, HostOnly::tr("Only one interface name can be specified")); 124 126 pszName = ValueUnion.psz; 125 127 break; … … 129 131 } 130 132 if (!pszName) 131 return errorSyntax(USAGE_HOSTONLYIFS, "No interface name was specified");133 return errorSyntax(USAGE_HOSTONLYIFS, HostOnly::tr("No interface name was specified")); 132 134 133 135 /* … … 147 149 148 150 /*HRESULT hrc =*/ showProgress(progress); 149 CHECK_PROGRESS_ERROR_RET(progress, ( "Failed to remove the host-only adapter"), RTEXITCODE_FAILURE);151 CHECK_PROGRESS_ERROR_RET(progress, (HostOnly::tr("Failed to remove the host-only adapter")), RTEXITCODE_FAILURE); 150 152 151 153 return RTEXITCODE_SUCCESS; … … 191 193 case 'a': // --ip 192 194 if (pszIp) 193 RTMsgWarning( "The --ip option is specified more than once");195 RTMsgWarning(HostOnly::tr("The --ip option is specified more than once")); 194 196 pszIp = ValueUnion.psz; 195 197 break; 196 198 case 'm': // --netmask 197 199 if (pszNetmask) 198 RTMsgWarning( "The --netmask option is specified more than once");200 RTMsgWarning(HostOnly::tr("The --netmask option is specified more than once")); 199 201 pszNetmask = ValueUnion.psz; 200 202 break; 201 203 case 'b': // --ipv6 202 204 if (pszIpv6) 203 RTMsgWarning( "The --ipv6 option is specified more than once");205 RTMsgWarning(HostOnly::tr("The --ipv6 option is specified more than once")); 204 206 pszIpv6 = ValueUnion.psz; 205 207 break; 206 208 case 'l': // --netmasklengthv6 207 209 if (fNetmasklengthv6) 208 RTMsgWarning( "The --netmasklengthv6 option is specified more than once");210 RTMsgWarning(HostOnly::tr("The --netmasklengthv6 option is specified more than once")); 209 211 fNetmasklengthv6 = true; 210 212 uNetmasklengthv6 = ValueUnion.u8; … … 212 214 case VINF_GETOPT_NOT_OPTION: 213 215 if (pszName) 214 return errorSyntax(USAGE_HOSTONLYIFS, "Only one interface name can be specified");216 return errorSyntax(USAGE_HOSTONLYIFS, HostOnly::tr("Only one interface name can be specified")); 215 217 pszName = ValueUnion.psz; 216 218 break; … … 222 224 /* parameter sanity check */ 223 225 if (fDhcp && (fNetmasklengthv6 || pszIpv6 || pszIp || pszNetmask)) 224 return errorSyntax(USAGE_HOSTONLYIFS, "You can not use --dhcp with static ip configuration parameters: --ip, --netmask, --ipv6 and --netmasklengthv6."); 226 return errorSyntax(USAGE_HOSTONLYIFS, 227 HostOnly::tr("You can not use --dhcp with static ip configuration parameters: --ip, --netmask, --ipv6 and --netmasklengthv6.")); 225 228 if ((pszIp || pszNetmask) && (fNetmasklengthv6 || pszIpv6)) 226 return errorSyntax(USAGE_HOSTONLYIFS, "You can not use ipv4 configuration (--ip and --netmask) with ipv6 (--ipv6 and --netmasklengthv6) simultaneously."); 229 return errorSyntax(USAGE_HOSTONLYIFS, 230 HostOnly::tr("You can not use ipv4 configuration (--ip and --netmask) with ipv6 (--ipv6 and --netmasklengthv6) simultaneously.")); 227 231 228 232 ComPtr<IHost> host; … … 232 236 CHECK_ERROR2I_RET(host, FindHostNetworkInterfaceByName(Bstr(pszName).raw(), hif.asOutParam()), RTEXITCODE_FAILURE); 233 237 if (hif.isNull()) 234 return errorArgument( "Could not find interface '%s'", pszName);238 return errorArgument(HostOnly::tr("Could not find interface '%s'"), pszName); 235 239 236 240 if (fDhcp) … … 248 252 if (!fIpV6Supported) 249 253 { 250 RTMsgError( "IPv6 setting is not supported for this adapter");254 RTMsgError(HostOnly::tr("IPv6 setting is not supported for this adapter")); 251 255 return RTEXITCODE_FAILURE; 252 256 } … … 257 261 } 258 262 else 259 return errorSyntax(USAGE_HOSTONLYIFS, "Neither -dhcp nor -ip nor -ipv6 was specfified");263 return errorSyntax(USAGE_HOSTONLYIFS, HostOnly::tr("Neither -dhcp nor -ip nor -ipv6 was specfified")); 260 264 261 265 return RTEXITCODE_SUCCESS; … … 266 270 { 267 271 if (a->argc < 1) 268 return errorSyntax(USAGE_HOSTONLYIFS, "No sub-command specified");272 return errorSyntax(USAGE_HOSTONLYIFS, HostOnly::tr("No sub-command specified")); 269 273 270 274 RTEXITCODE rcExit; … … 278 282 #endif 279 283 else 280 rcExit = errorSyntax(USAGE_HOSTONLYIFS, "Unknown sub-command '%s'", a->argv[0]);284 rcExit = errorSyntax(USAGE_HOSTONLYIFS, HostOnly::tr("Unknown sub-command '%s'"), a->argv[0]); 281 285 return rcExit; 282 286 } … … 399 403 400 404 if (options.bstrNetworkName.isEmpty()) 401 return errorArgument( "The --name parameter must be specified");405 return errorArgument(HostOnly::tr("The --name parameter must be specified")); 402 406 if (options.bstrNetworkMask.isEmpty()) 403 return errorArgument( "The --netmask parameter must be specified");407 return errorArgument(HostOnly::tr("The --netmask parameter must be specified")); 404 408 if (options.bstrLowerIp.isEmpty()) 405 return errorArgument( "The --lower-ip parameter must be specified");409 return errorArgument(HostOnly::tr("The --lower-ip parameter must be specified")); 406 410 if (options.bstrUpperIp.isEmpty()) 407 return errorArgument( "The --upper-ip parameter must be specified");411 return errorArgument(HostOnly::tr("The --upper-ip parameter must be specified")); 408 412 409 413 CHECK_ERROR2_RET(hrc, pVirtualBox, … … 436 440 } 437 441 else 438 return errorArgument( "Either --name or --id parameter must be specified");442 return errorArgument(HostOnly::tr("Either --name or --id parameter must be specified")); 439 443 440 444 return createUpdateHostOnlyNetworkCommon(hostOnlyNetwork, options); … … 492 496 } 493 497 else 494 return errorArgument( "Either --name or --id parameter must be specified");498 return errorArgument(HostOnly::tr("Either --name or --id parameter must be specified")); 495 499 496 500 CHECK_ERROR2_RET(hrc, pVirtualBox, … … 503 507 { 504 508 if (a->argc < 1) 505 return errorSyntax( "No sub-command specified");509 return errorSyntax(HostOnly::tr("No sub-command specified")); 506 510 507 511 RTEXITCODE rcExit; … … 522 526 } 523 527 else 524 rcExit = errorSyntax( "Unknown sub-command '%s'", a->argv[0]);528 rcExit = errorSyntax(HostOnly::tr("Unknown sub-command '%s'"), a->argv[0]); 525 529 return rcExit; 526 530 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r92107 r92372 48 48 using namespace com; 49 49 50 DECLARE_TRANSLATION_CONTEXT(Info); 50 51 51 52 // funcs … … 95 96 { 96 97 /* print with indentation */ 97 RTPrintf( " %sName: %ls (UUID: %s)%s\n",98 RTPrintf(Info::tr(" %sName: %ls (UUID: %s)%s\n"), 98 99 prefix.c_str(), 99 100 name.raw(), … … 101 102 (fCurrent) ? " *" : ""); 102 103 if (!description.isEmpty()) 103 RTPrintf( " %sDescription:\n%ls\n", prefix.c_str(), description.raw());104 RTPrintf(Info::tr(" %sDescription:\n%ls\n"), prefix.c_str(), description.raw()); 104 105 } 105 106 … … 150 151 { 151 152 case MachineState_PoweredOff: 152 return fShort ? "poweroff" : "powered off";153 return fShort ? "poweroff" : Info::tr("powered off"); 153 154 case MachineState_Saved: 154 return "saved";155 return fShort ? "saved" : Info::tr("saved"); 155 156 case MachineState_Teleported: 156 return "teleported";157 return fShort ? "teleported" : Info::tr("teleported"); 157 158 case MachineState_Aborted: 158 return "aborted";159 return fShort ? "aborted" : Info::tr("aborted"); 159 160 case MachineState_AbortedSaved: 160 return "aborted-saved";161 return fShort ? "aborted-saved" : Info::tr("aborted-saved"); 161 162 case MachineState_Running: 162 return "running";163 return fShort ? "running" : Info::tr("running"); 163 164 case MachineState_Paused: 164 return "paused";165 return fShort ? "paused" : Info::tr("paused"); 165 166 case MachineState_Stuck: 166 return fShort ? "gurumeditation" : "guru meditation";167 return fShort ? "gurumeditation" : Info::tr("guru meditation"); 167 168 case MachineState_Teleporting: 168 return "teleporting";169 return fShort ? "teleporting" : Info::tr("teleporting"); 169 170 case MachineState_LiveSnapshotting: 170 return fShort ? "livesnapshotting" : "live snapshotting";171 return fShort ? "livesnapshotting" : Info::tr("live snapshotting"); 171 172 case MachineState_Starting: 172 return "starting";173 return fShort ? "starting" : Info::tr("starting"); 173 174 case MachineState_Stopping: 174 return "stopping";175 return fShort ? "stopping" : Info::tr("stopping"); 175 176 case MachineState_Saving: 176 return "saving";177 return fShort ? "saving" : Info::tr("saving"); 177 178 case MachineState_Restoring: 178 return "restoring";179 return fShort ? "restoring" : Info::tr("restoring"); 179 180 case MachineState_TeleportingPausedVM: 180 return fShort ? "teleportingpausedvm" : "teleporting paused vm";181 return fShort ? "teleportingpausedvm" : Info::tr("teleporting paused vm"); 181 182 case MachineState_TeleportingIn: 182 return fShort ? "teleportingin" : "teleporting (incoming)";183 return fShort ? "teleportingin" : Info::tr("teleporting (incoming)"); 183 184 case MachineState_DeletingSnapshotOnline: 184 return fShort ? "deletingsnapshotlive" : "deleting snapshot live";185 return fShort ? "deletingsnapshotlive" : Info::tr("deleting snapshot live"); 185 186 case MachineState_DeletingSnapshotPaused: 186 return fShort ? "deletingsnapshotlivepaused" : "deleting snapshot live paused";187 return fShort ? "deletingsnapshotlivepaused" : Info::tr("deleting snapshot live paused"); 187 188 case MachineState_OnlineSnapshotting: 188 return fShort ? "onlinesnapshotting" : "online snapshotting";189 return fShort ? "onlinesnapshotting" : Info::tr("online snapshotting"); 189 190 case MachineState_RestoringSnapshot: 190 return fShort ? "restoringsnapshot" : "restoring snapshot";191 return fShort ? "restoringsnapshot" : Info::tr("restoring snapshot"); 191 192 case MachineState_DeletingSnapshot: 192 return fShort ? "deletingsnapshot" : "deleting snapshot";193 return fShort ? "deletingsnapshot" : Info::tr("deleting snapshot"); 193 194 case MachineState_SettingUp: 194 return fShort ? "settingup" : "setting up";195 return fShort ? "settingup" : Info::tr("setting up"); 195 196 case MachineState_Snapshotting: 196 return fShort ? "snapshotting" : "offline snapshotting";197 return fShort ? "snapshotting" : Info::tr("offline snapshotting"); 197 198 default: 198 199 break; 199 200 } 200 return "unknown";201 return Info::tr("unknown"); 201 202 } 202 203 … … 206 207 { 207 208 case AdditionsFacilityStatus_Inactive: 208 return fShort ? "inactive" : "not active";209 return fShort ? "inactive" : Info::tr("not active"); 209 210 case AdditionsFacilityStatus_Paused: 210 return "paused";211 return fShort ? "paused" : Info::tr("paused"); 211 212 case AdditionsFacilityStatus_PreInit: 212 return fShort ? "preinit" : "pre-initializing";213 return fShort ? "preinit" : Info::tr("pre-initializing"); 213 214 case AdditionsFacilityStatus_Init: 214 return fShort ? "init" : "initializing";215 return fShort ? "init" : Info::tr("initializing"); 215 216 case AdditionsFacilityStatus_Active: 216 return fShort ? "active" : "active/running";217 return fShort ? "active" : Info::tr("active/running"); 217 218 case AdditionsFacilityStatus_Terminating: 218 return "terminating";219 return fShort ? "terminating" : Info::tr("terminating"); 219 220 case AdditionsFacilityStatus_Terminated: 220 return "terminated";221 return fShort ? "terminated" : Info::tr("terminated"); 221 222 case AdditionsFacilityStatus_Failed: 222 return "failed";223 return fShort ? "failed" : Info::tr("failed"); 223 224 case AdditionsFacilityStatus_Unknown: 224 225 default: 225 226 break; 226 227 } 227 return "unknown";228 return Info::tr("unknown"); 228 229 } 229 230 … … 324 325 switch (enmType) 325 326 { 326 case BandwidthGroupType_Null: return "Null";327 case BandwidthGroupType_Disk: return "Disk";328 case BandwidthGroupType_Network: return "Network";327 case BandwidthGroupType_Null: return Info::tr("Null"); 328 case BandwidthGroupType_Disk: return Info::tr("Disk"); 329 case BandwidthGroupType_Network: return Info::tr("Network"); 329 330 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 330 331 case BandwidthGroupType_32BitHack: break; /* Shut up compiler warnings. */ 331 332 #endif 332 333 } 333 return "unknown";334 return Info::tr("unknown"); 334 335 } 335 336 … … 363 364 if (cBytes == 0) 364 365 { 365 RTPrintf( "Name: '%ls', Type: %s, Limit: none (disabled)\n", strName.raw(), pszType);366 RTPrintf(Info::tr("Name: '%ls', Type: %s, Limit: none (disabled)\n"), strName.raw(), pszType); 366 367 continue; 367 368 } … … 404 405 pszNetUnits = "m"; 405 406 } 406 RTPrintf("Name: '%ls', Type: %s, Limit: %lld %sbits/sec (%lld %sbytes/sec)\n", strName.raw(), pszType, cBits, pszNetUnits, cBytes, pszUnits); 407 RTPrintf(Info::tr("Name: '%ls', Type: %s, Limit: %lld %sbits/sec (%lld %sbytes/sec)\n"), 408 strName.raw(), pszType, cBits, pszNetUnits, cBytes, pszUnits); 407 409 } 408 410 } 409 411 if (!pszNetUnits) 410 RTPrintf( "Name: '%ls', Type: %s, Limit: %lld %sbytes/sec\n", strName.raw(), pszType, cBytes, pszUnits);412 RTPrintf(Info::tr("Name: '%ls', Type: %s, Limit: %lld %sbytes/sec\n"), strName.raw(), pszType, cBytes, pszUnits); 411 413 } 412 414 } 413 415 if (details != VMINFO_MACHINEREADABLE) 414 RTPrintf(bwGroups.size() != 0 ? "\n" : "<none>\n\n");416 RTPrintf(bwGroups.size() != 0 ? "\n" : Info::tr("<none>\n\n")); 415 417 416 418 return rc; … … 439 441 else 440 442 { 441 RTPrintf("Name: '%ls', Host path: '%ls' (%s), %s%s", 442 name.raw(), hostPath.raw(), pszDesc, writable ? "writable" : "readonly", fAutoMount ? ", auto-mount" : ""); 443 RTPrintf(Info::tr("Name: '%ls', Host path: '%ls' (%s), %s%s"), 444 name.raw(), hostPath.raw(), pszDesc, writable ? Info::tr("writable") : Info::tr("readonly"), 445 fAutoMount ? Info::tr(", auto-mount") : ""); 443 446 if (bstrAutoMountPoint.isNotEmpty()) 444 RTPrintf( ", mount-point: '%ls'\n", bstrAutoMountPoint.raw());447 RTPrintf(Info::tr(", mount-point: '%ls'\n"), bstrAutoMountPoint.raw()); 445 448 else 446 449 RTPrintf("\n"); … … 457 460 if (details == VMINFO_MACHINEREADABLE) 458 461 return "none"; 459 return "None";462 return Info::tr("None"); 460 463 461 464 case IommuType_Automatic: 462 465 if (details == VMINFO_MACHINEREADABLE) 463 466 return "automatic"; 464 return "Automatic";467 return Info::tr("Automatic"); 465 468 466 469 case IommuType_AMD: … … 477 480 if (details == VMINFO_MACHINEREADABLE) 478 481 return "unknown"; 479 return "Unknown";482 return Info::tr("Unknown"); 480 483 } 481 484 } … … 489 492 if (details == VMINFO_MACHINEREADABLE) 490 493 return "none"; 491 return "None";494 return Info::tr("None"); 492 495 493 496 case ParavirtProvider_Default: 494 497 if (details == VMINFO_MACHINEREADABLE) 495 498 return "default"; 496 return "Default";499 return Info::tr("Default"); 497 500 498 501 case ParavirtProvider_Legacy: 499 502 if (details == VMINFO_MACHINEREADABLE) 500 503 return "legacy"; 501 return "Legacy";504 return Info::tr("Legacy"); 502 505 503 506 case ParavirtProvider_Minimal: 504 507 if (details == VMINFO_MACHINEREADABLE) 505 508 return "minimal"; 506 return "Minimal";509 return Info::tr("Minimal"); 507 510 508 511 case ParavirtProvider_HyperV: … … 519 522 if (details == VMINFO_MACHINEREADABLE) 520 523 return "unknown"; 521 return "Unknown";524 return Info::tr("Unknown"); 522 525 } 523 526 } … … 580 583 581 584 #define SHOW_BOOL_VALUE(a_pszMachine, a_pszHuman, a_fValue) \ 582 SHOW_BOOL_VALUE_EX(a_pszMachine, a_pszHuman, a_fValue, "enabled", "disabled")585 SHOW_BOOL_VALUE_EX(a_pszMachine, a_pszHuman, a_fValue, Info::tr("enabled"), Info::tr("disabled")) 583 586 584 587 #define SHOW_ULONG_VALUE(a_pszMachine, a_pszHuman, a_uValue, a_pszUnit) \ … … 603 606 604 607 #define SHOW_BOOLEAN_PROP(a_pObj, a_Prop, a_pszMachine, a_pszHuman) \ 605 SHOW_BOOLEAN_PROP_EX(a_pObj, a_Prop, a_pszMachine, a_pszHuman, "enabled", "disabled")608 SHOW_BOOLEAN_PROP_EX(a_pObj, a_Prop, a_pszMachine, a_pszHuman, Info::tr("enabled"), Info::tr("disabled")) 606 609 607 610 #define SHOW_BOOLEAN_PROP_EX(a_pObj, a_Prop, a_pszMachine, a_pszHuman, a_szTrue, a_szFalse) \ … … 626 629 outputMachineReadableString(a_pszMachine, f ? "on" : "off"); \ 627 630 else \ 628 RTPrintf("%-28s %s\n", a_pszHuman, f ? "enabled" : "disabled"); \631 RTPrintf("%-28s %s\n", a_pszHuman, f ? Info::tr("enabled") : Info::tr("disabled")); \ 629 632 } while (0) 630 633 … … 751 754 machine->COMGETTER(Id)(uuid.asOutParam()); 752 755 if (details == VMINFO_COMPACT) 753 RTPrintf( "\"<inaccessible>\" {%s}\n", Utf8Str(uuid).c_str());756 RTPrintf(Info::tr("\"<inaccessible>\" {%s}\n"), Utf8Str(uuid).c_str()); 754 757 else 755 758 { … … 757 760 RTPrintf("name=\"<inaccessible>\"\n"); 758 761 else 759 RTPrintf( "Name: <inaccessible!>\n");762 RTPrintf(Info::tr("Name: <inaccessible!>\n")); 760 763 if (details == VMINFO_MACHINEREADABLE) 761 764 RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).c_str()); … … 766 769 Bstr settingsFilePath; 767 770 rc = machine->COMGETTER(SettingsFilePath)(settingsFilePath.asOutParam()); 768 RTPrintf( "Config file: %ls\n", settingsFilePath.raw());771 RTPrintf(Info::tr("Config file: %ls\n"), settingsFilePath.raw()); 769 772 ComPtr<IVirtualBoxErrorInfo> accessError; 770 773 rc = machine->COMGETTER(AccessError)(accessError.asOutParam()); 771 RTPrintf( "Access error details:\n");774 RTPrintf(Info::tr("Access error details:\n")); 772 775 ErrorInfo ei(accessError); 773 776 GluePrintErrorInfo(ei); … … 789 792 } 790 793 791 SHOW_STRING_PROP( machine, Name, "name", "Name:");792 SHOW_STRINGARRAY_PROP( machine, Groups, "groups", "Groups:");794 SHOW_STRING_PROP( machine, Name, "name", Info::tr("Name:")); 795 SHOW_STRINGARRAY_PROP( machine, Groups, "groups", Info::tr("Groups:")); 793 796 Bstr osTypeId; 794 797 CHECK_ERROR2I_RET(machine, COMGETTER(OSTypeId)(osTypeId.asOutParam()), hrcCheck); … … 796 799 pVirtualBox->GetGuestOSType(osTypeId.raw(), osType.asOutParam()); 797 800 if (!osType.isNull()) 798 SHOW_STRING_PROP( osType, Description, "ostype", "Guest OS:");801 SHOW_STRING_PROP( osType, Description, "ostype", Info::tr("Guest OS:")); 799 802 else 800 SHOW_STRING_PROP( machine, OSTypeId, "ostype", "Guest OS:");803 SHOW_STRING_PROP( machine, OSTypeId, "ostype", Info::tr("Guest OS:")); 801 804 SHOW_UUID_PROP( machine, Id, "UUID", "UUID:"); 802 SHOW_STRING_PROP( machine, SettingsFilePath, "CfgFile", "Config file:");803 SHOW_STRING_PROP( machine, SnapshotFolder, "SnapFldr", "Snapshot folder:");804 SHOW_STRING_PROP( machine, LogFolder, "LogFldr", "Log folder:");805 SHOW_UUID_PROP( machine, HardwareUUID, "hardwareuuid", "Hardware UUID:");806 SHOW_ULONG_PROP( machine, MemorySize, "memory", "Memory size:", "MB");807 SHOW_BOOLEAN_PROP( machine, PageFusionEnabled, "pagefusion", "Page Fusion:");805 SHOW_STRING_PROP( machine, SettingsFilePath, "CfgFile", Info::tr("Config file:")); 806 SHOW_STRING_PROP( machine, SnapshotFolder, "SnapFldr", Info::tr("Snapshot folder:")); 807 SHOW_STRING_PROP( machine, LogFolder, "LogFldr", Info::tr("Log folder:")); 808 SHOW_UUID_PROP( machine, HardwareUUID, "hardwareuuid", Info::tr("Hardware UUID:")); 809 SHOW_ULONG_PROP( machine, MemorySize, "memory", Info::tr("Memory size:"), "MB"); 810 SHOW_BOOLEAN_PROP( machine, PageFusionEnabled, "pagefusion", Info::tr("Page Fusion:")); 808 811 ComPtr<IGraphicsAdapter> pGraphicsAdapter; 809 812 machine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam()); 810 SHOW_ULONG_PROP(pGraphicsAdapter, VRAMSize, "vram", "VRAM size:", "MB");811 SHOW_ULONG_PROP( machine, CPUExecutionCap, "cpuexecutioncap", "CPU exec cap:", "%");812 SHOW_BOOLEAN_PROP( machine, HPETEnabled, "hpet", "HPET:");813 SHOW_STRING_PROP_MAJ( machine, CPUProfile, "cpu-profile", "CPUProfile:", "host", 6);813 SHOW_ULONG_PROP(pGraphicsAdapter, VRAMSize, "vram", Info::tr("VRAM size:"), "MB"); 814 SHOW_ULONG_PROP( machine, CPUExecutionCap, "cpuexecutioncap", Info::tr("CPU exec cap:"), "%"); 815 SHOW_BOOLEAN_PROP( machine, HPETEnabled, "hpet", Info::tr("HPET:")); 816 SHOW_STRING_PROP_MAJ( machine, CPUProfile, "cpu-profile", Info::tr("CPUProfile:"), "host", 6); 814 817 815 818 ChipsetType_T chipsetType; … … 818 821 switch (chipsetType) 819 822 { 820 case ChipsetType_Null: pszChipsetType = "invalid"; break; 823 case ChipsetType_Null: 824 if (details == VMINFO_MACHINEREADABLE) 825 pszChipsetType = "invalid"; 826 else 827 pszChipsetType = Info::tr("invalid"); 828 break; 821 829 case ChipsetType_PIIX3: pszChipsetType = "piix3"; break; 822 830 case ChipsetType_ICH9: pszChipsetType = "ich9"; break; 823 default: AssertFailed(); pszChipsetType = "unknown"; break; 824 } 825 SHOW_UTF8_STRING("chipset", "Chipset:", pszChipsetType); 831 default: 832 AssertFailed(); 833 if (details == VMINFO_MACHINEREADABLE) 834 pszChipsetType = "unknown"; 835 else 836 pszChipsetType = Info::tr("unknown"); 837 break; 838 } 839 SHOW_UTF8_STRING("chipset", Info::tr("Chipset:"), pszChipsetType); 826 840 827 841 FirmwareType_T firmwareType; … … 835 849 case FirmwareType_EFI64: pszFirmwareType = "EFI64"; break; 836 850 case FirmwareType_EFIDUAL: pszFirmwareType = "EFIDUAL"; break; 837 default: AssertFailed(); pszFirmwareType = "unknown"; break; 838 } 839 SHOW_UTF8_STRING("firmware", "Firmware:", pszFirmwareType); 840 841 SHOW_ULONG_PROP( machine, CPUCount, "cpus", "Number of CPUs:", ""); 851 default: 852 AssertFailed(); 853 if (details == VMINFO_MACHINEREADABLE) 854 pszFirmwareType = "unknown"; 855 else 856 pszFirmwareType = Info::tr("unknown"); 857 break; 858 } 859 SHOW_UTF8_STRING("firmware", Info::tr("Firmware:"), pszFirmwareType); 860 861 SHOW_ULONG_PROP( machine, CPUCount, "cpus", Info::tr("Number of CPUs:"), ""); 842 862 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_PAE, &f), "pae", "PAE:"); 843 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_LongMode, &f), "longmode", "Long Mode:");844 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_TripleFaultReset, &f), "triplefaultreset", "Triple Fault Reset:");863 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_LongMode, &f), "longmode", Info::tr("Long Mode:")); 864 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_TripleFaultReset, &f), "triplefaultreset", Info::tr("Triple Fault Reset:")); 845 865 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_APIC, &f), "apic", "APIC:"); 846 866 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_X2APIC, &f), "x2apic", "X2APIC:"); 847 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_HWVirt, &f), "nested-hw-virt", "Nested VT-x/AMD-V:");848 SHOW_ULONG_PROP( machine, CPUIDPortabilityLevel, "cpuid-portability-level", "CPUID Portability Level:", "");867 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_HWVirt, &f), "nested-hw-virt", Info::tr("Nested VT-x/AMD-V:")); 868 SHOW_ULONG_PROP( machine, CPUIDPortabilityLevel, "cpuid-portability-level", Info::tr("CPUID Portability Level:"), ""); 849 869 850 870 if (details != VMINFO_MACHINEREADABLE) 851 RTPrintf("%-28s ", "CPUID overrides:");871 RTPrintf("%-28s ", Info::tr("CPUID overrides:")); 852 872 ULONG uOrdinal = 0; 853 873 for (uOrdinal = 0; uOrdinal < _4K; uOrdinal++) … … 862 882 { 863 883 if (!uOrdinal) 864 RTPrintf( "Leaf no. EAX EBX ECX EDX\n");884 RTPrintf(Info::tr("Leaf no. EAX EBX ECX EDX\n")); 865 885 RTPrintf("%-28s %08x/%03x %08x %08x %08x %08x\n", "", uLeaf, uSubLeaf, uEAX, uEBX, uECX, uEDX); 866 886 } … … 874 894 } 875 895 if (!uOrdinal && details != VMINFO_MACHINEREADABLE) 876 RTPrintf( "None\n");896 RTPrintf(Info::tr("None\n")); 877 897 878 898 ComPtr<IBIOSSettings> biosSettings; … … 888 908 { 889 909 case BIOSBootMenuMode_Disabled: 890 pszBootMenu = "disabled"; 910 if (details == VMINFO_MACHINEREADABLE) 911 pszBootMenu = "disabled"; 912 else 913 pszBootMenu = Info::tr("disabled"); 891 914 break; 892 915 case BIOSBootMenuMode_MenuOnly: … … 894 917 pszBootMenu = "menuonly"; 895 918 else 896 pszBootMenu = "menu only";919 pszBootMenu = Info::tr("menu only"); 897 920 break; 898 921 default: … … 900 923 pszBootMenu = "messageandmenu"; 901 924 else 902 pszBootMenu = "message and menu";903 } 904 SHOW_UTF8_STRING("bootmenu", "Boot menu mode:", pszBootMenu);925 pszBootMenu = Info::tr("message and menu"); 926 } 927 SHOW_UTF8_STRING("bootmenu", Info::tr("Boot menu mode:"), pszBootMenu); 905 928 906 929 ComPtr<ISystemProperties> systemProperties; … … 914 937 const char *pszDevice; 915 938 if (bootOrder == DeviceType_Floppy) 916 pszDevice = details == VMINFO_MACHINEREADABLE ? "floppy" : "Floppy";939 pszDevice = details == VMINFO_MACHINEREADABLE ? "floppy" : Info::tr("Floppy"); 917 940 else if (bootOrder == DeviceType_DVD) 918 941 pszDevice = details == VMINFO_MACHINEREADABLE ? "dvd" : "DVD"; 919 942 else if (bootOrder == DeviceType_HardDisk) 920 pszDevice = details == VMINFO_MACHINEREADABLE ? "disk" : "HardDisk";943 pszDevice = details == VMINFO_MACHINEREADABLE ? "disk" : Info::tr("HardDisk"); 921 944 else if (bootOrder == DeviceType_Network) 922 pszDevice = details == VMINFO_MACHINEREADABLE ? "net" : "Network";945 pszDevice = details == VMINFO_MACHINEREADABLE ? "net" : Info::tr("Network"); 923 946 else if (bootOrder == DeviceType_USB) 924 947 pszDevice = details == VMINFO_MACHINEREADABLE ? "usb" : "USB"; 925 948 else if (bootOrder == DeviceType_SharedFolder) 926 pszDevice = details == VMINFO_MACHINEREADABLE ? "sharedfolder" : "Shared Folder";949 pszDevice = details == VMINFO_MACHINEREADABLE ? "sharedfolder" : Info::tr("Shared Folder"); 927 950 else 928 pszDevice = details == VMINFO_MACHINEREADABLE ? "none" : "Not Assigned";929 SHOW_UTF8_STRING(FmtNm(szNm, "boot%u", i), FmtNm(szNm, "Boot Device %u:", i), pszDevice);951 pszDevice = details == VMINFO_MACHINEREADABLE ? "none" : Info::tr("Not Assigned"); 952 SHOW_UTF8_STRING(FmtNm(szNm, "boot%u", i), FmtNm(szNm, Info::tr("Boot Device %u:"), i), pszDevice); 930 953 } 931 954 … … 939 962 { 940 963 case APICMode_Disabled: 941 pszAPIC = "disabled"; 964 if (details == VMINFO_MACHINEREADABLE) 965 pszAPIC = "disabled"; 966 else 967 pszAPIC = Info::tr("disabled"); 942 968 break; 943 969 case APICMode_APIC: … … 955 981 break; 956 982 } 957 SHOW_UTF8_STRING("biosapic", "BIOS APIC mode:", pszAPIC);958 959 SHOW_LONG64_PROP(biosSettings, TimeOffset, "biossystemtimeoffset", "Time offset:", "ms");983 SHOW_UTF8_STRING("biosapic", Info::tr("BIOS APIC mode:"), pszAPIC); 984 985 SHOW_LONG64_PROP(biosSettings, TimeOffset, "biossystemtimeoffset", Info::tr("Time offset:"), Info::tr("ms")); 960 986 Bstr bstrNVRAMFile; 961 987 CHECK_ERROR2I_RET(nvramStore, COMGETTER(NonVolatileStorageFile)(bstrNVRAMFile.asOutParam()), hrcCheck); 962 988 if (bstrNVRAMFile.isNotEmpty()) 963 SHOW_BSTR_STRING("BIOS NVRAM File", "BIOS NVRAM File:", bstrNVRAMFile);964 SHOW_BOOLEAN_PROP_EX(machine, RTCUseUTC, "rtcuseutc", "RTC:", "UTC", "local time");965 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &f), "hwvirtex", "Hardware Virtualization:");966 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &f),"nestedpaging", "Nested Paging:");967 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_LargePages, &f), "largepages", "Large Pages:");989 SHOW_BSTR_STRING("BIOS NVRAM File", Info::tr("BIOS NVRAM File:"), bstrNVRAMFile); 990 SHOW_BOOLEAN_PROP_EX(machine, RTCUseUTC, "rtcuseutc", Info::tr("RTC:"), "UTC", Info::tr("local time")); 991 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &f), "hwvirtex", Info::tr("Hardware Virtualization:")); 992 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &f),"nestedpaging", Info::tr("Nested Paging:")); 993 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_LargePages, &f), "largepages", Info::tr("Large Pages:")); 968 994 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_VPID, &f), "vtxvpid", "VT-x VPID:"); 969 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, &f), "vtxux", "VT-x Unrestricted Exec.:");970 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_VirtVmsaveVmload, &f), "virtvmsavevmload", "AMD-V Virt. Vmsave/Vmload:");995 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, &f), "vtxux", Info::tr("VT-x Unrestricted Exec.:")); 996 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_VirtVmsaveVmload, &f), "virtvmsavevmload", Info::tr("AMD-V Virt. Vmsave/Vmload:")); 971 997 972 998 #ifdef VBOX_WITH_IOMMU_AMD … … 980 1006 CHECK_ERROR2I_RET(machine, COMGETTER(ParavirtProvider)(¶virtProvider), hrcCheck); 981 1007 const char *pszParavirtProvider = paravirtProviderToString(paravirtProvider, details); 982 SHOW_UTF8_STRING("paravirtprovider", "Paravirt. Provider:", pszParavirtProvider);1008 SHOW_UTF8_STRING("paravirtprovider", Info::tr("Paravirt. Provider:"), pszParavirtProvider); 983 1009 984 1010 ParavirtProvider_T effParavirtProvider; 985 1011 CHECK_ERROR2I_RET(machine, GetEffectiveParavirtProvider(&effParavirtProvider), hrcCheck); 986 1012 const char *pszEffParavirtProvider = paravirtProviderToString(effParavirtProvider, details); 987 SHOW_UTF8_STRING("effparavirtprovider", "Effective Paravirt. Prov.:", pszEffParavirtProvider);1013 SHOW_UTF8_STRING("effparavirtprovider", Info::tr("Effective Paravirt. Prov.:"), pszEffParavirtProvider); 988 1014 989 1015 Bstr paravirtDebug; 990 1016 CHECK_ERROR2I_RET(machine, COMGETTER(ParavirtDebug)(paravirtDebug.asOutParam()), hrcCheck); 991 1017 if (paravirtDebug.isNotEmpty()) 992 SHOW_BSTR_STRING("paravirtdebug", "Paravirt. Debug:", paravirtDebug);1018 SHOW_BSTR_STRING("paravirtdebug", Info::tr("Paravirt. Debug:"), paravirtDebug); 993 1019 994 1020 MachineState_T machineState; … … 1013 1039 } 1014 1040 else 1015 RTPrintf( "%-28s %s (since %s)\n", "State:", pszState, pszTime);1041 RTPrintf(Info::tr("%-28s %s (since %s)\n"), Info::tr("State:"), pszState, pszTime); 1016 1042 1017 1043 GraphicsControllerType_T enmGraphics; … … 1019 1045 if (SUCCEEDED(rc)) 1020 1046 { 1021 const char *pszCtrl = "Unknown";1047 const char *pszCtrl; 1022 1048 switch (enmGraphics) 1023 1049 { … … 1026 1052 pszCtrl = "null"; 1027 1053 else 1028 pszCtrl = "Null";1054 pszCtrl = Info::tr("Null"); 1029 1055 break; 1030 1056 case GraphicsControllerType_VBoxVGA: … … 1049 1075 if (details == VMINFO_MACHINEREADABLE) 1050 1076 pszCtrl = "unknown"; 1077 else 1078 pszCtrl = Info::tr("Unknown"); 1051 1079 break; 1052 1080 } … … 1055 1083 RTPrintf("graphicscontroller=\"%s\"\n", pszCtrl); 1056 1084 else 1057 RTPrintf("%-28s %s\n", "Graphics Controller:", pszCtrl);1058 } 1059 1060 SHOW_ULONG_PROP(pGraphicsAdapter, MonitorCount, "monitorcount", "Monitor count:", "");1061 SHOW_BOOLEAN_PROP(pGraphicsAdapter, Accelerate3DEnabled, "accelerate3d", "3D Acceleration:");1085 RTPrintf("%-28s %s\n", Info::tr("Graphics Controller:"), pszCtrl); 1086 } 1087 1088 SHOW_ULONG_PROP(pGraphicsAdapter, MonitorCount, "monitorcount", Info::tr("Monitor count:"), ""); 1089 SHOW_BOOLEAN_PROP(pGraphicsAdapter, Accelerate3DEnabled, "accelerate3d", Info::tr("3D Acceleration:")); 1062 1090 #ifdef VBOX_WITH_VIDEOHWACCEL 1063 SHOW_BOOLEAN_PROP(pGraphicsAdapter, Accelerate2DVideoEnabled, "accelerate2dvideo", "2D Video Acceleration:");1091 SHOW_BOOLEAN_PROP(pGraphicsAdapter, Accelerate2DVideoEnabled, "accelerate2dvideo", Info::tr("2D Video Acceleration:")); 1064 1092 #endif 1065 SHOW_BOOLEAN_PROP( machine, TeleporterEnabled, "teleporterenabled", "Teleporter Enabled:");1066 SHOW_ULONG_PROP( machine, TeleporterPort, "teleporterport", "Teleporter Port:", "");1067 SHOW_STRING_PROP( machine, TeleporterAddress, "teleporteraddress", "Teleporter Address:");1068 SHOW_STRING_PROP( machine, TeleporterPassword, "teleporterpassword", "Teleporter Password:");1069 SHOW_BOOLEAN_PROP( machine, TracingEnabled, "tracing-enabled", "Tracing Enabled:");1070 SHOW_BOOLEAN_PROP( machine, AllowTracingToAccessVM, "tracing-allow-vm-access", "Allow Tracing to Access VM:");1071 SHOW_STRING_PROP( machine, TracingConfig, "tracing-config", "Tracing Configuration:");1072 SHOW_BOOLEAN_PROP( machine, AutostartEnabled, "autostart-enabled", "Autostart Enabled:");1073 SHOW_ULONG_PROP( machine, AutostartDelay, "autostart-delay", "Autostart Delay:", "");1074 SHOW_STRING_PROP( machine, DefaultFrontend, "defaultfrontend", "Default Frontend:");1093 SHOW_BOOLEAN_PROP( machine, TeleporterEnabled, "teleporterenabled", Info::tr("Teleporter Enabled:")); 1094 SHOW_ULONG_PROP( machine, TeleporterPort, "teleporterport", Info::tr("Teleporter Port:"), ""); 1095 SHOW_STRING_PROP( machine, TeleporterAddress, "teleporteraddress", Info::tr("Teleporter Address:")); 1096 SHOW_STRING_PROP( machine, TeleporterPassword, "teleporterpassword", Info::tr("Teleporter Password:")); 1097 SHOW_BOOLEAN_PROP( machine, TracingEnabled, "tracing-enabled", Info::tr("Tracing Enabled:")); 1098 SHOW_BOOLEAN_PROP( machine, AllowTracingToAccessVM, "tracing-allow-vm-access", Info::tr("Allow Tracing to Access VM:")); 1099 SHOW_STRING_PROP( machine, TracingConfig, "tracing-config", Info::tr("Tracing Configuration:")); 1100 SHOW_BOOLEAN_PROP( machine, AutostartEnabled, "autostart-enabled", Info::tr("Autostart Enabled:")); 1101 SHOW_ULONG_PROP( machine, AutostartDelay, "autostart-delay", Info::tr("Autostart Delay:"), ""); 1102 SHOW_STRING_PROP( machine, DefaultFrontend, "defaultfrontend", Info::tr("Default Frontend:")); 1075 1103 1076 1104 VMProcPriority_T enmVMProcPriority; … … 1080 1108 { 1081 1109 case VMProcPriority_Flat: 1082 pszVMProcPriority = "flat"; 1110 if (details == VMINFO_MACHINEREADABLE) 1111 pszVMProcPriority = "flat"; 1112 else 1113 pszVMProcPriority = Info::tr("flat"); 1083 1114 break; 1084 1115 case VMProcPriority_Low: 1085 pszVMProcPriority = "low"; 1116 if (details == VMINFO_MACHINEREADABLE) 1117 pszVMProcPriority = "low"; 1118 else 1119 pszVMProcPriority = Info::tr("low"); 1086 1120 break; 1087 1121 case VMProcPriority_Normal: 1088 pszVMProcPriority = "normal"; 1122 if (details == VMINFO_MACHINEREADABLE) 1123 pszVMProcPriority = "normal"; 1124 else 1125 pszVMProcPriority = Info::tr("normal"); 1089 1126 break; 1090 1127 case VMProcPriority_High: 1091 pszVMProcPriority = "high"; 1128 if (details == VMINFO_MACHINEREADABLE) 1129 pszVMProcPriority = "high"; 1130 else 1131 pszVMProcPriority = Info::tr("high"); 1092 1132 break; 1093 1133 default: 1094 pszVMProcPriority = "default"; 1134 if (details == VMINFO_MACHINEREADABLE) 1135 pszVMProcPriority = "default"; 1136 else 1137 pszVMProcPriority = Info::tr("default"); 1095 1138 break; 1096 1139 } … … 1117 1160 RTPrintf("storagecontrollername%u=\"%ls\"\n", i, storageCtlName.raw()); 1118 1161 else 1119 RTPrintf( "Storage Controller Name (%u): %ls\n", i, storageCtlName.raw());1162 RTPrintf(Info::tr("Storage Controller Name (%u): %ls\n"), i, storageCtlName.raw()); 1120 1163 1121 1164 storageCtl->COMGETTER(ControllerType)(&enmCtlType); … … 1157 1200 1158 1201 default: 1159 pszCtl = "unknown"; 1202 if (details == VMINFO_MACHINEREADABLE) 1203 pszCtl = "unknown"; 1204 else 1205 pszCtl = Info::tr("unknown"); 1160 1206 } 1161 1207 if (details == VMINFO_MACHINEREADABLE) 1162 1208 RTPrintf("storagecontrollertype%u=\"%s\"\n", i, pszCtl); 1163 1209 else 1164 RTPrintf( "Storage Controller Type (%u): %s\n", i, pszCtl);1210 RTPrintf(Info::tr("Storage Controller Type (%u): %s\n"), i, pszCtl); 1165 1211 1166 1212 storageCtl->COMGETTER(Instance)(&ulValue); … … 1168 1214 RTPrintf("storagecontrollerinstance%u=\"%lu\"\n", i, ulValue); 1169 1215 else 1170 RTPrintf( "Storage Controller Instance Number (%u): %lu\n", i, ulValue);1216 RTPrintf(Info::tr("Storage Controller Instance Number (%u): %lu\n"), i, ulValue); 1171 1217 1172 1218 storageCtl->COMGETTER(MaxPortCount)(&ulValue); … … 1174 1220 RTPrintf("storagecontrollermaxportcount%u=\"%lu\"\n", i, ulValue); 1175 1221 else 1176 RTPrintf( "Storage Controller Max Port Count (%u): %lu\n", i, ulValue);1222 RTPrintf(Info::tr("Storage Controller Max Port Count (%u): %lu\n"), i, ulValue); 1177 1223 1178 1224 storageCtl->COMGETTER(PortCount)(&ulValue); … … 1180 1226 RTPrintf("storagecontrollerportcount%u=\"%lu\"\n", i, ulValue); 1181 1227 else 1182 RTPrintf( "Storage Controller Port Count (%u): %lu\n", i, ulValue);1228 RTPrintf(Info::tr("Storage Controller Port Count (%u): %lu\n"), i, ulValue); 1183 1229 1184 1230 storageCtl->COMGETTER(Bootable)(&fBootable); … … 1186 1232 RTPrintf("storagecontrollerbootable%u=\"%s\"\n", i, fBootable ? "on" : "off"); 1187 1233 else 1188 RTPrintf( "Storage Controller Bootable (%u): %s\n", i, fBootable ? "on" : "off");1234 RTPrintf(Info::tr("Storage Controller Bootable (%u): %s\n"), i, fBootable ? Info::tr("on") : Info::tr("off")); 1189 1235 } 1190 1236 … … 1255 1301 Utf8Str(uuid).c_str()); 1256 1302 if (fPassthrough) 1257 RTPrintf( " (passthrough enabled)");1303 RTPrintf(Info::tr(" (passthrough enabled)")); 1258 1304 if (fTempEject) 1259 RTPrintf( " (temp eject)");1305 RTPrintf(Info::tr(" (temp eject)")); 1260 1306 if (fIsEjected) 1261 RTPrintf( " (ejected)");1307 RTPrintf(Info::tr(" (ejected)")); 1262 1308 RTPrintf("\n"); 1263 1309 } … … 1274 1320 else 1275 1321 { 1276 RTPrintf( "%ls (%d, %d): Empty", storageCtlName.raw(), i, k);1322 RTPrintf(Info::tr("%ls (%d, %d): Empty"), storageCtlName.raw(), i, k); 1277 1323 if (fTempEject) 1278 RTPrintf( " (temp eject)");1324 RTPrintf(Info::tr(" (temp eject)")); 1279 1325 if (fIsEjected) 1280 RTPrintf( " (ejected)");1326 RTPrintf(Info::tr(" (ejected)")); 1281 1327 RTPrintf("\n"); 1282 1328 } … … 1300 1346 if (SUCCEEDED(rc) && nic) 1301 1347 { 1302 FmtNm(szNm, details == VMINFO_MACHINEREADABLE ? "nic%u" : "NIC %u:", currentNIC + 1);1348 FmtNm(szNm, details == VMINFO_MACHINEREADABLE ? "nic%u" : Info::tr("NIC %u:"), currentNIC + 1); 1303 1349 1304 1350 BOOL fEnabled; … … 1309 1355 RTPrintf("%s=\"none\"\n", szNm); 1310 1356 else 1311 RTPrintf( "%-28s disabled\n", szNm);1357 RTPrintf(Info::tr("%-28s disabled\n"), szNm); 1312 1358 } 1313 1359 else … … 1326 1372 strAttachment = "null"; 1327 1373 else 1328 strAttachment = "none";1374 strAttachment = Info::tr("none"); 1329 1375 break; 1330 1376 … … 1394 1440 strGuestIP.c_str(), strGuestPort.c_str()); 1395 1441 else 1396 strNatForwardings.printf( "%sNIC %d Rule(%d): name = %s, protocol = %s, host ip = %s, host port = %s, guest ip = %s, guest port = %s\n",1442 strNatForwardings.printf(Info::tr("%sNIC %d Rule(%d): name = %s, protocol = %s, host ip = %s, host port = %s, guest ip = %s, guest port = %s\n"), 1397 1443 strNatForwardings.c_str(), currentNIC + 1, i, strName.c_str(), 1398 1444 strProto.c_str(), strHostIP.c_str(), strHostPort.c_str(), … … 1417 1463 { 1418 1464 strAttachment = "NAT"; 1419 strNatSettings.printf( "NIC %d Settings: MTU: %d, Socket (send: %d, receive: %d), TCP Window (send:%d, receive: %d)\n",1465 strNatSettings.printf(Info::tr("NIC %d Settings: MTU: %d, Socket (send: %d, receive: %d), TCP Window (send:%d, receive: %d)\n"), 1420 1466 currentNIC + 1, mtu, sockSnd ? sockSnd : 64, sockRcv ? sockRcv : 64, tcpSnd ? tcpSnd : 64, tcpRcv ? tcpRcv : 64); 1421 1467 } … … 1433 1479 } 1434 1480 else 1435 strAttachment.printf( "Bridged Interface '%ls'", strBridgeAdp.raw());1481 strAttachment.printf(Info::tr("Bridged Interface '%ls'"), strBridgeAdp.raw()); 1436 1482 break; 1437 1483 } … … 1447 1493 } 1448 1494 else 1449 strAttachment.printf( "Internal Network '%s'", Utf8Str(strNetwork).c_str());1495 strAttachment.printf(Info::tr("Internal Network '%s'"), Utf8Str(strNetwork).c_str()); 1450 1496 break; 1451 1497 } … … 1461 1507 } 1462 1508 else 1463 strAttachment.printf( "Host-only Interface '%ls'", strHostonlyAdp.raw());1509 strAttachment.printf(Info::tr("Host-only Interface '%ls'"), strHostonlyAdp.raw()); 1464 1510 break; 1465 1511 } … … 1476 1522 else 1477 1523 { 1478 strAttachment.printf( "Generic '%ls'", strGenericDriver.raw());1524 strAttachment.printf(Info::tr("Generic '%ls'"), strGenericDriver.raw()); 1479 1525 1480 1526 // show the generic properties … … 1505 1551 } 1506 1552 else 1507 strAttachment.printf( "NAT Network '%s'", Utf8Str(strNetwork).c_str());1553 strAttachment.printf(Info::tr("NAT Network '%s'"), Utf8Str(strNetwork).c_str()); 1508 1554 break; 1509 1555 } … … 1520 1566 } 1521 1567 else 1522 strAttachment.printf( "Host Only Network '%s'", Utf8Str(strNetwork).c_str());1568 strAttachment.printf(Info::tr("Host Only Network '%s'"), Utf8Str(strNetwork).c_str()); 1523 1569 break; 1524 1570 } … … 1536 1582 } 1537 1583 else 1538 strAttachment.printf( "Cloud Network '%s'", Utf8Str(strNetwork).c_str());1584 strAttachment.printf(Info::tr("Cloud Network '%s'"), Utf8Str(strNetwork).c_str()); 1539 1585 break; 1540 1586 } … … 1542 1588 1543 1589 default: 1544 strAttachment = "unknown"; 1590 if (details == VMINFO_MACHINEREADABLE) 1591 strAttachment = "unknown"; 1592 else 1593 strAttachment = Info::tr("unknown"); 1545 1594 break; 1546 1595 } … … 1556 1605 switch (enmPromiscModePolicy) 1557 1606 { 1558 case NetworkAdapterPromiscModePolicy_Deny: pszPromiscuousGuestPolicy = "deny"; break;1559 case NetworkAdapterPromiscModePolicy_AllowNetwork: pszPromiscuousGuestPolicy = "allow-vms"; break;1560 case NetworkAdapterPromiscModePolicy_AllowAll: pszPromiscuousGuestPolicy = "allow-all"; break;1607 case NetworkAdapterPromiscModePolicy_Deny: pszPromiscuousGuestPolicy = Info::tr("deny"); break; 1608 case NetworkAdapterPromiscModePolicy_AllowNetwork: pszPromiscuousGuestPolicy = Info::tr("allow-vms"); break; 1609 case NetworkAdapterPromiscModePolicy_AllowAll: pszPromiscuousGuestPolicy = Info::tr("allow-all"); break; 1561 1610 default: AssertFailedReturn(E_INVALIDARG); 1562 1611 } … … 1589 1638 case NetworkAdapterType_Virtio_1_0: pszNICType = "virtio_1.0"; break; 1590 1639 #endif 1591 default: AssertFailed(); pszNICType = "unknown"; break; 1640 default: 1641 AssertFailed(); 1642 if (details == VMINFO_MACHINEREADABLE) 1643 pszNICType = "unknown"; 1644 else 1645 pszNICType = Info::tr("unknown"); 1646 break; 1592 1647 } 1593 1648 … … 1616 1671 } 1617 1672 else 1618 RTPrintf( "%-28s MAC: %ls, Attachment: %s, Cable connected: %s, Trace: %s (file: %ls), Type: %s, Reported speed: %d Mbps, Boot priority: %d, Promisc Policy: %s, Bandwidth group: %ls\n",1673 RTPrintf(Info::tr("%-28s MAC: %ls, Attachment: %s, Cable connected: %s, Trace: %s (file: %ls), Type: %s, Reported speed: %d Mbps, Boot priority: %d, Promisc Policy: %s, Bandwidth group: %ls\n"), 1619 1674 szNm, strMACAddress.raw(), strAttachment.c_str(), 1620 fConnected ? "on" : "off",1621 fTraceEnabled ? "on" : "off",1622 traceFile.isEmpty() ? Bstr( "none").raw() : traceFile.raw(),1675 fConnected ? Info::tr("on") : Info::tr("off"), 1676 fTraceEnabled ? Info::tr("on") : Info::tr("off"), 1677 traceFile.isEmpty() ? Bstr(Info::tr("none")).raw() : traceFile.raw(), 1623 1678 pszNICType, 1624 1679 ulLineSpeed / 1000, 1625 1680 (int)ulBootPriority, 1626 1681 pszPromiscuousGuestPolicy, 1627 strBwGroup.isEmpty() ? Bstr( "none").raw() : strBwGroup.raw());1682 strBwGroup.isEmpty() ? Bstr(Info::tr("none")).raw() : strBwGroup.raw()); 1628 1683 if (strNatSettings.length()) 1629 1684 RTPrintf(strNatSettings.c_str()); … … 1636 1691 /* Pointing device information */ 1637 1692 PointingHIDType_T aPointingHID; 1638 const char *pszHID = "Unknown";1693 const char *pszHID = Info::tr("Unknown"); 1639 1694 const char *pszMrHID = "unknown"; 1640 1695 machine->COMGETTER(PointingHIDType)(&aPointingHID); … … 1642 1697 { 1643 1698 case PointingHIDType_None: 1644 pszHID = "None";1699 pszHID = Info::tr("None"); 1645 1700 pszMrHID = "none"; 1646 1701 break; 1647 1702 case PointingHIDType_PS2Mouse: 1648 pszHID = "PS/2 Mouse";1703 pszHID = Info::tr("PS/2 Mouse"); 1649 1704 pszMrHID = "ps2mouse"; 1650 1705 break; 1651 1706 case PointingHIDType_USBMouse: 1652 pszHID = "USB Mouse";1707 pszHID = Info::tr("USB Mouse"); 1653 1708 pszMrHID = "usbmouse"; 1654 1709 break; 1655 1710 case PointingHIDType_USBTablet: 1656 pszHID = "USB Tablet";1711 pszHID = Info::tr("USB Tablet"); 1657 1712 pszMrHID = "usbtablet"; 1658 1713 break; 1659 1714 case PointingHIDType_ComboMouse: 1660 pszHID = "USB Tablet and PS/2 Mouse";1715 pszHID = Info::tr("USB Tablet and PS/2 Mouse"); 1661 1716 pszMrHID = "combomouse"; 1662 1717 break; 1663 1718 case PointingHIDType_USBMultiTouch: 1664 pszHID = "USB Multi-Touch";1719 pszHID = Info::tr("USB Multi-Touch"); 1665 1720 pszMrHID = "usbmultitouch"; 1666 1721 break; … … 1668 1723 break; 1669 1724 } 1670 SHOW_UTF8_STRING("hidpointing", "Pointing Device:", details == VMINFO_MACHINEREADABLE ? pszMrHID : pszHID);1725 SHOW_UTF8_STRING("hidpointing", Info::tr("Pointing Device:"), details == VMINFO_MACHINEREADABLE ? pszMrHID : pszHID); 1671 1726 1672 1727 /* Keyboard device information */ 1673 1728 KeyboardHIDType_T aKeyboardHID; 1674 1729 machine->COMGETTER(KeyboardHIDType)(&aKeyboardHID); 1675 pszHID = "Unknown";1730 pszHID = Info::tr("Unknown"); 1676 1731 pszMrHID = "unknown"; 1677 1732 switch (aKeyboardHID) 1678 1733 { 1679 1734 case KeyboardHIDType_None: 1680 pszHID = "None";1735 pszHID = Info::tr("None"); 1681 1736 pszMrHID = "none"; 1682 1737 break; 1683 1738 case KeyboardHIDType_PS2Keyboard: 1684 pszHID = "PS/2 Keyboard";1739 pszHID = Info::tr("PS/2 Keyboard"); 1685 1740 pszMrHID = "ps2kbd"; 1686 1741 break; 1687 1742 case KeyboardHIDType_USBKeyboard: 1688 pszHID = "USB Keyboard";1743 pszHID = Info::tr("USB Keyboard"); 1689 1744 pszMrHID = "usbkbd"; 1690 1745 break; 1691 1746 case KeyboardHIDType_ComboKeyboard: 1692 pszHID = "USB and PS/2 Keyboard";1747 pszHID = Info::tr("USB and PS/2 Keyboard"); 1693 1748 pszMrHID = "combokbd"; 1694 1749 break; … … 1696 1751 break; 1697 1752 } 1698 SHOW_UTF8_STRING("hidkeyboard", "Keyboard Device:", details == VMINFO_MACHINEREADABLE ? pszMrHID : pszHID);1753 SHOW_UTF8_STRING("hidkeyboard", Info::tr("Keyboard Device:"), details == VMINFO_MACHINEREADABLE ? pszMrHID : pszHID); 1699 1754 1700 1755 ComPtr<ISystemProperties> sysProps; … … 1710 1765 if (SUCCEEDED(rc) && uart) 1711 1766 { 1712 FmtNm(szNm, details == VMINFO_MACHINEREADABLE ? "uart%u" : "UART %u:", currentUART + 1);1767 FmtNm(szNm, details == VMINFO_MACHINEREADABLE ? "uart%u" : Info::tr("UART %u:"), currentUART + 1); 1713 1768 1714 1769 /* show the config of this UART */ … … 1720 1775 RTPrintf("%s=\"off\"\n", szNm); 1721 1776 else 1722 RTPrintf( "%-28s disabled\n", szNm);1777 RTPrintf(Info::tr("%-28s disabled\n"), szNm); 1723 1778 } 1724 1779 else … … 1739 1794 RTPrintf("%s=\"%#06x,%d\"\n", szNm, ulIOBase, ulIRQ); 1740 1795 else 1741 RTPrintf( "%-28s I/O base: %#06x, IRQ: %d", szNm, ulIOBase, ulIRQ);1796 RTPrintf(Info::tr("%-28s I/O base: %#06x, IRQ: %d"), szNm, ulIOBase, ulIRQ); 1742 1797 switch (HostMode) 1743 1798 { … … 1747 1802 RTPrintf("uartmode%d=\"disconnected\"\n", currentUART + 1); 1748 1803 else 1749 RTPrintf( ", disconnected");1804 RTPrintf(Info::tr(", disconnected")); 1750 1805 break; 1751 1806 case PortMode_RawFile: … … 1754 1809 path.raw()); 1755 1810 else 1756 RTPrintf( ", attached to raw file '%ls'\n",1811 RTPrintf(Info::tr(", attached to raw file '%ls'\n"), 1757 1812 path.raw()); 1758 1813 break; … … 1762 1817 fServer ? "tcpserver" : "tcpclient", path.raw()); 1763 1818 else 1764 RTPrintf( ", attached to tcp (%s) '%ls'",1765 fServer ? "server" : "client", path.raw());1819 RTPrintf(Info::tr(", attached to tcp (%s) '%ls'"), 1820 fServer ? Info::tr("server") : Info::tr("client"), path.raw()); 1766 1821 break; 1767 1822 case PortMode_HostPipe: … … 1770 1825 fServer ? "server" : "client", path.raw()); 1771 1826 else 1772 RTPrintf( ", attached to pipe (%s) '%ls'",1773 fServer ? "server" : "client", path.raw());1827 RTPrintf(Info::tr(", attached to pipe (%s) '%ls'"), 1828 fServer ? Info::tr("server") : Info::tr("client"), path.raw()); 1774 1829 break; 1775 1830 case PortMode_HostDevice: … … 1778 1833 path.raw()); 1779 1834 else 1780 RTPrintf( ", attached to device '%ls'", path.raw());1835 RTPrintf(Info::tr(", attached to device '%ls'"), path.raw()); 1781 1836 break; 1782 1837 } … … 1816 1871 if (SUCCEEDED(rc) && lpt) 1817 1872 { 1818 FmtNm(szNm, details == VMINFO_MACHINEREADABLE ? "lpt%u" : "LPT %u:", currentLPT + 1);1873 FmtNm(szNm, details == VMINFO_MACHINEREADABLE ? "lpt%u" : Info::tr("LPT %u:"), currentLPT + 1); 1819 1874 1820 1875 /* show the config of this LPT */ … … 1826 1881 RTPrintf("%s=\"off\"\n", szNm); 1827 1882 else 1828 RTPrintf( "%-28s disabled\n", szNm);1883 RTPrintf(Info::tr("%-28s disabled\n"), szNm); 1829 1884 } 1830 1885 else … … 1839 1894 RTPrintf("%s=\"%#06x,%d\"\n", szNm, ulIOBase, ulIRQ); 1840 1895 else 1841 RTPrintf( "%-28s I/O base: %#06x, IRQ: %d", szNm, ulIOBase, ulIRQ);1896 RTPrintf(Info::tr("%-28s I/O base: %#06x, IRQ: %d"), szNm, ulIOBase, ulIRQ); 1842 1897 if (details == VMINFO_MACHINEREADABLE) 1843 1898 RTPrintf("lptmode%d=\"%ls\"\n", currentLPT + 1, path.raw()); 1844 1899 else 1845 RTPrintf( ", attached to device '%ls'\n", path.raw());1900 RTPrintf(Info::tr(", attached to device '%ls'\n"), path.raw()); 1846 1901 } 1847 1902 } … … 1852 1907 if (SUCCEEDED(rc)) 1853 1908 { 1854 const char *pszDrv = "Unknown";1855 const char *pszCtrl = "Unknown";1856 const char *pszCodec = "Unknown";1909 const char *pszDrv = Info::tr("Unknown"); 1910 const char *pszCtrl = Info::tr("Unknown"); 1911 const char *pszCodec = Info::tr("Unknown"); 1857 1912 BOOL fEnabled; 1858 1913 rc = AudioAdapter->COMGETTER(Enabled)(&fEnabled); … … 1867 1922 pszDrv = "null"; 1868 1923 else 1869 pszDrv = "Null";1924 pszDrv = Info::tr("Null"); 1870 1925 break; 1871 1926 case AudioDriverType_WinMM: … … 1968 2023 else 1969 2024 { 1970 RTPrintf("%-28s %s", "Audio:", fEnabled ? "enabled" : "disabled");2025 RTPrintf("%-28s %s", Info::tr("Audio:"), fEnabled ? Info::tr("enabled") : Info::tr("disabled")); 1971 2026 if (fEnabled) 1972 RTPrintf( " (Driver: %s, Controller: %s, Codec: %s)", pszDrv, pszCtrl, pszCodec);2027 RTPrintf(Info::tr(" (Driver: %s, Controller: %s, Codec: %s)"), pszDrv, pszCtrl, pszCodec); 1973 2028 RTPrintf("\n"); 1974 2029 } 1975 SHOW_BOOLEAN_PROP(AudioAdapter, EnabledOut, "audio_out", "Audio playback:");1976 SHOW_BOOLEAN_PROP(AudioAdapter, EnabledIn, "audio_in", "Audio capture:");2030 SHOW_BOOLEAN_PROP(AudioAdapter, EnabledOut, "audio_out", Info::tr("Audio playback:")); 2031 SHOW_BOOLEAN_PROP(AudioAdapter, EnabledIn, "audio_in", Info::tr("Audio capture:")); 1977 2032 } 1978 2033 … … 1988 2043 break; 1989 2044 case ClipboardMode_HostToGuest: 1990 psz = details == VMINFO_MACHINEREADABLE ? "hosttoguest" : "HostToGuest";2045 psz = details == VMINFO_MACHINEREADABLE ? "hosttoguest" : Info::tr("HostToGuest"); 1991 2046 break; 1992 2047 case ClipboardMode_GuestToHost: 1993 psz = details == VMINFO_MACHINEREADABLE ? "guesttohost" : "GuestToHost";2048 psz = details == VMINFO_MACHINEREADABLE ? "guesttohost" : Info::tr("GuestToHost"); 1994 2049 break; 1995 2050 case ClipboardMode_Bidirectional: 1996 psz = details == VMINFO_MACHINEREADABLE ? "bidirectional" : "Bidirectional";2051 psz = details == VMINFO_MACHINEREADABLE ? "bidirectional" : Info::tr("Bidirectional"); 1997 2052 break; 1998 2053 default: 1999 psz = details == VMINFO_MACHINEREADABLE ? "unknown" : "Unknown";2000 break; 2001 } 2002 SHOW_UTF8_STRING("clipboard", "Clipboard Mode:", psz);2054 psz = details == VMINFO_MACHINEREADABLE ? "unknown" : Info::tr("Unknown"); 2055 break; 2056 } 2057 SHOW_UTF8_STRING("clipboard", Info::tr("Clipboard Mode:"), psz); 2003 2058 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 2004 SHOW_BOOLEAN_PROP(machine, ClipboardFileTransfersEnabled, "clipboard_file_transfers", "Clipboard file transfers:");2059 SHOW_BOOLEAN_PROP(machine, ClipboardFileTransfersEnabled, "clipboard_file_transfers", Info::tr("Clipboard file transfers:")); 2005 2060 #endif 2006 2061 } … … 2017 2072 break; 2018 2073 case DnDMode_HostToGuest: 2019 psz = details == VMINFO_MACHINEREADABLE ? "hosttoguest" : "HostToGuest";2074 psz = details == VMINFO_MACHINEREADABLE ? "hosttoguest" : Info::tr("HostToGuest"); 2020 2075 break; 2021 2076 case DnDMode_GuestToHost: 2022 psz = details == VMINFO_MACHINEREADABLE ? "guesttohost" : "GuestToHost";2077 psz = details == VMINFO_MACHINEREADABLE ? "guesttohost" : Info::tr("GuestToHost"); 2023 2078 break; 2024 2079 case DnDMode_Bidirectional: 2025 psz = details == VMINFO_MACHINEREADABLE ? "bidirectional" : "Bidirectional";2080 psz = details == VMINFO_MACHINEREADABLE ? "bidirectional" : Info::tr("Bidirectional"); 2026 2081 break; 2027 2082 default: 2028 psz = details == VMINFO_MACHINEREADABLE ? "unknown" : "Unknown";2029 break; 2030 } 2031 SHOW_UTF8_STRING("draganddrop", "Drag and drop Mode:", psz);2083 psz = details == VMINFO_MACHINEREADABLE ? "unknown" : Info::tr("Unknown"); 2084 break; 2085 } 2086 SHOW_UTF8_STRING("draganddrop", Info::tr("Drag and drop Mode:"), psz); 2032 2087 } 2033 2088 … … 2040 2095 rc = machine->COMGETTER(SessionName)(sessName.asOutParam()); 2041 2096 if (SUCCEEDED(rc) && !sessName.isEmpty()) 2042 SHOW_BSTR_STRING("SessionName", "Session name:", sessName);2097 SHOW_BSTR_STRING("SessionName", Info::tr("Session name:"), sessName); 2043 2098 } 2044 2099 } … … 2073 2128 else 2074 2129 { 2075 const char *pszMonitorStatus = "unknown status";2130 const char *pszMonitorStatus = Info::tr("unknown status"); 2076 2131 switch (monitorStatus) 2077 2132 { 2078 case GuestMonitorStatus_Blank: pszMonitorStatus = "blank"; break;2079 case GuestMonitorStatus_Enabled: pszMonitorStatus = "enabled"; break;2080 case GuestMonitorStatus_Disabled: pszMonitorStatus = "disabled"; break;2133 case GuestMonitorStatus_Blank: pszMonitorStatus = Info::tr("blank"); break; 2134 case GuestMonitorStatus_Enabled: pszMonitorStatus = Info::tr("enabled"); break; 2135 case GuestMonitorStatus_Disabled: pszMonitorStatus = Info::tr("disabled"); break; 2081 2136 default: break; 2082 2137 } 2083 RTPrintf("%-28s %dx%dx%d at %d,%d %s\n", "Video mode:", xRes, yRes, bpp, xOrigin, yOrigin, pszMonitorStatus);2138 RTPrintf("%-28s %dx%dx%d at %d,%d %s\n", Info::tr("Video mode:"), xRes, yRes, bpp, xOrigin, yOrigin, pszMonitorStatus); 2084 2139 } 2085 2140 } … … 2119 2174 { 2120 2175 case AuthType_Null: 2121 strAuthType = "null"; 2176 if (details == VMINFO_MACHINEREADABLE) 2177 strAuthType = "null"; 2178 else 2179 strAuthType = Info::tr("null"); 2122 2180 break; 2123 2181 case AuthType_External: 2124 strAuthType = "external"; 2182 if (details == VMINFO_MACHINEREADABLE) 2183 strAuthType = "external"; 2184 else 2185 strAuthType = Info::tr("external"); 2125 2186 break; 2126 2187 case AuthType_Guest: 2127 strAuthType = "guest"; 2188 if (details == VMINFO_MACHINEREADABLE) 2189 strAuthType = "guest"; 2190 else 2191 strAuthType = Info::tr("guest"); 2128 2192 break; 2129 2193 default: 2130 strAuthType = "unknown"; 2194 if (details == VMINFO_MACHINEREADABLE) 2195 strAuthType = "unknown"; 2196 else 2197 strAuthType = Info::tr("unknown"); 2131 2198 break; 2132 2199 } … … 2167 2234 if (address.isEmpty()) 2168 2235 address = "0.0.0.0"; 2169 RTPrintf("%-28s enabled (Address %ls, Ports %ls, MultiConn: %s, ReuseSingleConn: %s, Authentication type: %s)\n", 2170 "VRDE:", address.raw(), ports.raw(), fMultiCon ? "on" : "off", fReuseCon ? "on" : "off", strAuthType); 2236 RTPrintf(Info::tr("%-28s enabled (Address %ls, Ports %ls, MultiConn: %s, ReuseSingleConn: %s, Authentication type: %s)\n"), 2237 "VRDE:", address.raw(), ports.raw(), fMultiCon ? Info::tr("on") : Info::tr("off"), 2238 fReuseCon ? Info::tr("on") : Info::tr("off"), strAuthType); 2171 2239 if (pConsole && currentPort != -1 && currentPort != 0) 2172 RTPrintf("%-28s %d\n", "VRDE port:", currentPort);2240 RTPrintf("%-28s %d\n", Info::tr("VRDE port:"), currentPort); 2173 2241 if (fVideoChannel) 2174 RTPrintf( "%-28s enabled (Quality %ls)\n", "Video redirection:", videoChannelQuality.raw());2242 RTPrintf(Info::tr("%-28s enabled (Quality %ls)\n"), Info::tr("Video redirection:"), videoChannelQuality.raw()); 2175 2243 else 2176 RTPrintf( "%-28s disabled\n", "Video redirection:");2244 RTPrintf(Info::tr("%-28s disabled\n"), Info::tr("Video redirection:")); 2177 2245 } 2178 2246 com::SafeArray<BSTR> aProperties; … … 2194 2262 { 2195 2263 if (value.isEmpty()) 2196 RTPrintf( "%-28s: %-10lS = <not set>\n", "VRDE property", aProperties[i]);2264 RTPrintf(Info::tr("%-28s: %-10lS = <not set>\n"), Info::tr("VRDE property"), aProperties[i]); 2197 2265 else 2198 RTPrintf("%-28s: %-10lS = \"%ls\"\n", "VRDE property", aProperties[i], value.raw());2266 RTPrintf("%-28s: %-10lS = \"%ls\"\n", Info::tr("VRDE property"), aProperties[i], value.raw()); 2199 2267 } 2200 2268 } … … 2206 2274 RTPrintf("vrde=\"off\"\n"); 2207 2275 else 2208 RTPrintf( "%-28s disabled\n", "VRDE:");2276 RTPrintf(Info::tr("%-28s disabled\n"), "VRDE:"); 2209 2277 } 2210 2278 } … … 2259 2327 { 2260 2328 if (details != VMINFO_MACHINEREADABLE) 2261 RTPrintf( "\nUSB Device Filters:\n\n");2329 RTPrintf(Info::tr("\nUSB Device Filters:\n\n")); 2262 2330 2263 2331 if (Coll.size() == 0) 2264 2332 { 2265 2333 if (details != VMINFO_MACHINEREADABLE) 2266 RTPrintf( "<none>\n\n");2334 RTPrintf(Info::tr("<none>\n\n")); 2267 2335 } 2268 2336 else … … 2273 2341 2274 2342 if (details != VMINFO_MACHINEREADABLE) 2275 SHOW_UTF8_STRING("index", "Index:", FmtNm(szNm, "%zu", index));2276 SHOW_BOOLEAN_PROP_EX(DevPtr, Active, FmtNm(szNm, "USBFilterActive%zu", index + 1), "Active:", "yes", "no");2277 SHOW_STRING_PROP(DevPtr, Name, FmtNm(szNm, "USBFilterName%zu", index + 1), "Name:");2278 SHOW_STRING_PROP(DevPtr, VendorId, FmtNm(szNm, "USBFilterVendorId%zu", index + 1), "VendorId:");2279 SHOW_STRING_PROP(DevPtr, ProductId, FmtNm(szNm, "USBFilterProductId%zu", index + 1), "ProductId:");2280 SHOW_STRING_PROP(DevPtr, Revision, FmtNm(szNm, "USBFilterRevision%zu", index + 1), "Revision:");2281 SHOW_STRING_PROP(DevPtr, Manufacturer, FmtNm(szNm, "USBFilterManufacturer%zu", index + 1), "Manufacturer:");2282 SHOW_STRING_PROP(DevPtr, Product, FmtNm(szNm, "USBFilterProduct%zu", index + 1), "Product:");2283 SHOW_STRING_PROP(DevPtr, Remote, FmtNm(szNm, "USBFilterRemote%zu", index + 1), "Remote:");2284 SHOW_STRING_PROP(DevPtr, SerialNumber, FmtNm(szNm, "USBFilterSerialNumber%zu", index + 1), "Serial Number:");2343 SHOW_UTF8_STRING("index", Info::tr("Index:"), FmtNm(szNm, "%zu", index)); 2344 SHOW_BOOLEAN_PROP_EX(DevPtr, Active, FmtNm(szNm, "USBFilterActive%zu", index + 1), Info::tr("Active:"), Info::tr("yes"), Info::tr("no")); 2345 SHOW_STRING_PROP(DevPtr, Name, FmtNm(szNm, "USBFilterName%zu", index + 1), Info::tr("Name:")); 2346 SHOW_STRING_PROP(DevPtr, VendorId, FmtNm(szNm, "USBFilterVendorId%zu", index + 1), Info::tr("VendorId:")); 2347 SHOW_STRING_PROP(DevPtr, ProductId, FmtNm(szNm, "USBFilterProductId%zu", index + 1), Info::tr("ProductId:")); 2348 SHOW_STRING_PROP(DevPtr, Revision, FmtNm(szNm, "USBFilterRevision%zu", index + 1), Info::tr("Revision:")); 2349 SHOW_STRING_PROP(DevPtr, Manufacturer, FmtNm(szNm, "USBFilterManufacturer%zu", index + 1), Info::tr("Manufacturer:")); 2350 SHOW_STRING_PROP(DevPtr, Product, FmtNm(szNm, "USBFilterProduct%zu", index + 1), Info::tr("Product:")); 2351 SHOW_STRING_PROP(DevPtr, Remote, FmtNm(szNm, "USBFilterRemote%zu", index + 1), Info::tr("Remote:")); 2352 SHOW_STRING_PROP(DevPtr, SerialNumber, FmtNm(szNm, "USBFilterSerialNumber%zu", index + 1), Info::tr("Serial Number:")); 2285 2353 if (details != VMINFO_MACHINEREADABLE) 2286 2354 { … … 2288 2356 CHECK_ERROR_RET(DevPtr, COMGETTER(MaskedInterfaces)(&fMaskedIfs), rc); 2289 2357 if (fMaskedIfs) 2290 RTPrintf("%-28s %#010x\n", "Masked Interfaces:", fMaskedIfs);2358 RTPrintf("%-28s %#010x\n", Info::tr("Masked Interfaces:"), fMaskedIfs); 2291 2359 RTPrintf("\n"); 2292 2360 } … … 2300 2368 { 2301 2369 if (details != VMINFO_MACHINEREADABLE) 2302 RTPrintf( "Available remote USB devices:\n\n");2370 RTPrintf(Info::tr("Available remote USB devices:\n\n")); 2303 2371 2304 2372 SafeIfaceArray <IHostUSBDevice> coll; … … 2308 2376 { 2309 2377 if (details != VMINFO_MACHINEREADABLE) 2310 RTPrintf( "<none>\n\n");2378 RTPrintf(Info::tr("<none>\n\n")); 2311 2379 } 2312 2380 else … … 2319 2387 2320 2388 SHOW_STRING_PROP(dev, Id, FmtNm(szNm, "%sActive%zu", pszPfx, i + 1), "UUID:"); 2321 SHOW_USHORT_PROP_EX2(dev, VendorId, FmtNm(szNm, "%sVendorId%zu", pszPfx, i + 1), "VendorId:", "", "%#06x", "%#06x (%04X)");2322 SHOW_USHORT_PROP_EX2(dev, ProductId, FmtNm(szNm, "%sProductId%zu", pszPfx, i + 1), "ProductId:", "", "%#06x", "%#06x (%04X)");2389 SHOW_USHORT_PROP_EX2(dev, VendorId, FmtNm(szNm, "%sVendorId%zu", pszPfx, i + 1), Info::tr("VendorId:"), "", "%#06x", "%#06x (%04X)"); 2390 SHOW_USHORT_PROP_EX2(dev, ProductId, FmtNm(szNm, "%sProductId%zu", pszPfx, i + 1), Info::tr("ProductId:"), "", "%#06x", "%#06x (%04X)"); 2323 2391 2324 2392 USHORT bcdRevision; … … 2329 2397 RTStrPrintf(szValue, sizeof(szValue), "%u.%u (%02u%02u)\n", 2330 2398 bcdRevision >> 8, bcdRevision & 0xff, bcdRevision >> 8, bcdRevision & 0xff); 2331 SHOW_UTF8_STRING(FmtNm(szNm, "%sRevision%zu", pszPfx, i + 1), "Revision:", szValue);2332 2333 SHOW_STRING_PROP_NOT_EMPTY(dev, Manufacturer, FmtNm(szNm, "%sManufacturer%zu", pszPfx, i + 1), "Manufacturer:");2334 SHOW_STRING_PROP_NOT_EMPTY(dev, Product, FmtNm(szNm, "%sProduct%zu", pszPfx, i + 1), "Product:");2335 SHOW_STRING_PROP_NOT_EMPTY(dev, SerialNumber, FmtNm(szNm, "%sSerialNumber%zu", pszPfx, i + 1), "SerialNumber:");2336 SHOW_STRING_PROP_NOT_EMPTY(dev, Address, FmtNm(szNm, "%sAddress%zu", pszPfx, i + 1), "Address:");2399 SHOW_UTF8_STRING(FmtNm(szNm, "%sRevision%zu", pszPfx, i + 1), Info::tr("Revision:"), szValue); 2400 2401 SHOW_STRING_PROP_NOT_EMPTY(dev, Manufacturer, FmtNm(szNm, "%sManufacturer%zu", pszPfx, i + 1), Info::tr("Manufacturer:")); 2402 SHOW_STRING_PROP_NOT_EMPTY(dev, Product, FmtNm(szNm, "%sProduct%zu", pszPfx, i + 1), Info::tr("Product:")); 2403 SHOW_STRING_PROP_NOT_EMPTY(dev, SerialNumber, FmtNm(szNm, "%sSerialNumber%zu", pszPfx, i + 1), Info::tr("SerialNumber:")); 2404 SHOW_STRING_PROP_NOT_EMPTY(dev, Address, FmtNm(szNm, "%sAddress%zu", pszPfx, i + 1), Info::tr("Address:")); 2337 2405 2338 2406 if (details != VMINFO_MACHINEREADABLE) … … 2345 2413 { 2346 2414 if (details != VMINFO_MACHINEREADABLE) 2347 RTPrintf( "Currently Attached USB Devices:\n\n");2415 RTPrintf(Info::tr("Currently Attached USB Devices:\n\n")); 2348 2416 2349 2417 SafeIfaceArray <IUSBDevice> coll; … … 2353 2421 { 2354 2422 if (details != VMINFO_MACHINEREADABLE) 2355 RTPrintf( "<none>\n\n");2423 RTPrintf(Info::tr("<none>\n\n")); 2356 2424 } 2357 2425 else … … 2364 2432 2365 2433 SHOW_STRING_PROP(dev, Id, FmtNm(szNm, "%sActive%zu", pszPfx, i + 1), "UUID:"); 2366 SHOW_USHORT_PROP_EX2(dev, VendorId, FmtNm(szNm, "%sVendorId%zu", pszPfx, i + 1), "VendorId:", "", "%#06x", "%#06x (%04X)");2367 SHOW_USHORT_PROP_EX2(dev, ProductId, FmtNm(szNm, "%sProductId%zu", pszPfx, i + 1), "ProductId:", "", "%#06x", "%#06x (%04X)");2434 SHOW_USHORT_PROP_EX2(dev, VendorId, FmtNm(szNm, "%sVendorId%zu", pszPfx, i + 1), Info::tr("VendorId:"), "", "%#06x", "%#06x (%04X)"); 2435 SHOW_USHORT_PROP_EX2(dev, ProductId, FmtNm(szNm, "%sProductId%zu", pszPfx, i + 1), Info::tr("ProductId:"), "", "%#06x", "%#06x (%04X)"); 2368 2436 2369 2437 USHORT bcdRevision; … … 2374 2442 RTStrPrintf(szValue, sizeof(szValue), "%u.%u (%02u%02u)\n", 2375 2443 bcdRevision >> 8, bcdRevision & 0xff, bcdRevision >> 8, bcdRevision & 0xff); 2376 SHOW_UTF8_STRING(FmtNm(szNm, "%sRevision%zu", pszPfx, i + 1), "Revision:", szValue);2377 2378 SHOW_STRING_PROP_NOT_EMPTY(dev, Manufacturer, FmtNm(szNm, "%sManufacturer%zu", pszPfx, i + 1), "Manufacturer:");2379 SHOW_STRING_PROP_NOT_EMPTY(dev, Product, FmtNm(szNm, "%sProduct%zu", pszPfx, i + 1), "Product:");2380 SHOW_STRING_PROP_NOT_EMPTY(dev, SerialNumber, FmtNm(szNm, "%sSerialNumber%zu", pszPfx, i + 1), "SerialNumber:");2381 SHOW_STRING_PROP_NOT_EMPTY(dev, Address, FmtNm(szNm, "%sAddress%zu", pszPfx, i + 1), "Address:");2444 SHOW_UTF8_STRING(FmtNm(szNm, "%sRevision%zu", pszPfx, i + 1), Info::tr("Revision:"), szValue); 2445 2446 SHOW_STRING_PROP_NOT_EMPTY(dev, Manufacturer, FmtNm(szNm, "%sManufacturer%zu", pszPfx, i + 1), Info::tr("Manufacturer:")); 2447 SHOW_STRING_PROP_NOT_EMPTY(dev, Product, FmtNm(szNm, "%sProduct%zu", pszPfx, i + 1), Info::tr("Product:")); 2448 SHOW_STRING_PROP_NOT_EMPTY(dev, SerialNumber, FmtNm(szNm, "%sSerialNumber%zu", pszPfx, i + 1), Info::tr("SerialNumber:")); 2449 SHOW_STRING_PROP_NOT_EMPTY(dev, Address, FmtNm(szNm, "%sAddress%zu", pszPfx, i + 1), Info::tr("Address:")); 2382 2450 2383 2451 if (details != VMINFO_MACHINEREADABLE) … … 2398 2466 if (assignments.size() > 0 && (details != VMINFO_MACHINEREADABLE)) 2399 2467 { 2400 RTPrintf( "\nAttached physical PCI devices:\n\n");2468 RTPrintf(Info::tr("\nAttached physical PCI devices:\n\n")); 2401 2469 } 2402 2470 … … 2417 2485 RTPrintf("AttachedHostPCI=%s,%s\n", szHostPCIAddress, szGuestPCIAddress); 2418 2486 else 2419 RTPrintf( " Host device %ls at %s attached as %s\n", DevName.raw(), szHostPCIAddress, szGuestPCIAddress);2487 RTPrintf(Info::tr(" Host device %ls at %s attached as %s\n"), DevName.raw(), szHostPCIAddress, szGuestPCIAddress); 2420 2488 } 2421 2489 … … 2433 2501 */ 2434 2502 if (details != VMINFO_MACHINEREADABLE) 2435 RTPrintf( "Bandwidth groups: ");2503 RTPrintf(Info::tr("Bandwidth groups: ")); 2436 2504 { 2437 2505 ComPtr<IBandwidthControl> bwCtrl; … … 2446 2514 */ 2447 2515 if (details != VMINFO_MACHINEREADABLE) 2448 RTPrintf( "Shared folders:");2516 RTPrintf(Info::tr("Shared folders:")); 2449 2517 uint32_t numSharedFolders = 0; 2450 2518 #if 0 // not yet implemented … … 2456 2524 { 2457 2525 ComPtr<ISharedFolder> sf = sfColl[i]; 2458 showSharedFolder(sf, details, "global mapping", "GlobalMapping", i + 1, numSharedFolders == 0);2526 showSharedFolder(sf, details, Info::tr("global mapping"), "GlobalMapping", i + 1, numSharedFolders == 0); 2459 2527 ++numSharedFolders; 2460 2528 } … … 2468 2536 { 2469 2537 ComPtr<ISharedFolder> sf = folders[i]; 2470 showSharedFolder(sf, details, "machine mapping", "MachineMapping", i + 1, numSharedFolders == 0);2538 showSharedFolder(sf, details, Info::tr("machine mapping"), "MachineMapping", i + 1, numSharedFolders == 0); 2471 2539 ++numSharedFolders; 2472 2540 } … … 2480 2548 { 2481 2549 ComPtr<ISharedFolder> sf = folders[i]; 2482 showSharedFolder(sf, details, "transient mapping", "TransientMapping", i + 1, numSharedFolders == 0);2550 showSharedFolder(sf, details, Info::tr("transient mapping"), "TransientMapping", i + 1, numSharedFolders == 0); 2483 2551 ++numSharedFolders; 2484 2552 } 2485 2553 } 2486 2554 if (!numSharedFolders && details != VMINFO_MACHINEREADABLE) 2487 RTPrintf( "<none>\n");2555 RTPrintf(Info::tr("<none>\n")); 2488 2556 if (details != VMINFO_MACHINEREADABLE) 2489 2557 RTPrintf("\n"); … … 2529 2597 } 2530 2598 2531 SHOW_BOOL_VALUE_EX("VRDEActiveConnection", "VRDE Connection:", fActive, "active", "not active");2532 SHOW_ULONG_VALUE("VRDEClients=", "Clients so far:", cNumberOfClients, "");2599 SHOW_BOOL_VALUE_EX("VRDEActiveConnection", Info::tr("VRDE Connection:"), fActive, Info::tr("active"), Info::tr("not active")); 2600 SHOW_ULONG_VALUE("VRDEClients=", Info::tr("Clients so far:"), cNumberOfClients, ""); 2533 2601 2534 2602 if (cNumberOfClients > 0) … … 2537 2605 makeTimeStr(szTimeValue, sizeof(szTimeValue), BeginTime); 2538 2606 if (fActive) 2539 SHOW_UTF8_STRING("VRDEStartTime", "Start time:", szTimeValue);2607 SHOW_UTF8_STRING("VRDEStartTime", Info::tr("Start time:"), szTimeValue); 2540 2608 else 2541 2609 { 2542 SHOW_UTF8_STRING("VRDELastStartTime", "Last started:", szTimeValue);2610 SHOW_UTF8_STRING("VRDELastStartTime", Info::tr("Last started:"), szTimeValue); 2543 2611 makeTimeStr(szTimeValue, sizeof(szTimeValue), EndTime); 2544 SHOW_UTF8_STRING("VRDELastEndTime", "Last ended:", szTimeValue);2612 SHOW_UTF8_STRING("VRDELastEndTime", Info::tr("Last ended:"), szTimeValue); 2545 2613 } 2546 2614 … … 2552 2620 ThroughputReceive = (BytesReceived * 1000) / (EndTime - BeginTime); 2553 2621 } 2554 SHOW_LONG64_VALUE("VRDEBytesSent", "Sent:", BytesSent, "Bytes");2555 SHOW_LONG64_VALUE("VRDEThroughputSend", "Average speed:", ThroughputSend, "B/s");2556 SHOW_LONG64_VALUE("VRDEBytesSentTotal", "Sent total:", BytesSentTotal, "Bytes");2557 2558 SHOW_LONG64_VALUE("VRDEBytesReceived", "Received:", BytesReceived, "Bytes");2559 SHOW_LONG64_VALUE("VRDEThroughputReceive", "Speed:", ThroughputReceive, "B/s");2560 SHOW_LONG64_VALUE("VRDEBytesReceivedTotal", "Received total:", BytesReceivedTotal, "Bytes");2622 SHOW_LONG64_VALUE("VRDEBytesSent", Info::tr("Sent:"), BytesSent, Info::tr("Bytes")); 2623 SHOW_LONG64_VALUE("VRDEThroughputSend", Info::tr("Average speed:"), ThroughputSend, Info::tr("B/s")); 2624 SHOW_LONG64_VALUE("VRDEBytesSentTotal", Info::tr("Sent total:"), BytesSentTotal, Info::tr("Bytes")); 2625 2626 SHOW_LONG64_VALUE("VRDEBytesReceived", Info::tr("Received:"), BytesReceived, Info::tr("Bytes")); 2627 SHOW_LONG64_VALUE("VRDEThroughputReceive", Info::tr("Speed:"), ThroughputReceive, Info::tr("B/s")); 2628 SHOW_LONG64_VALUE("VRDEBytesReceivedTotal", Info::tr("Received total:"), BytesReceivedTotal, Info::tr("Bytes")); 2561 2629 2562 2630 if (fActive) 2563 2631 { 2564 SHOW_BSTR_STRING("VRDEUserName", "User name:", User);2565 SHOW_BSTR_STRING("VRDEDomain", "Domain:", Domain);2566 SHOW_BSTR_STRING("VRDEClientName", "Client name:", ClientName);2567 SHOW_BSTR_STRING("VRDEClientIP", "Client IP:", ClientIP);2568 SHOW_ULONG_VALUE("VRDEClientVersion", "Client version:", ClientVersion, "");2569 SHOW_UTF8_STRING("VRDEEncryption", "Encryption:", EncryptionStyle == 0 ? "RDP4" : "RDP5 (X.509)");2632 SHOW_BSTR_STRING("VRDEUserName", Info::tr("User name:"), User); 2633 SHOW_BSTR_STRING("VRDEDomain", Info::tr("Domain:"), Domain); 2634 SHOW_BSTR_STRING("VRDEClientName", Info::tr("Client name:"), ClientName); 2635 SHOW_BSTR_STRING("VRDEClientIP", Info::tr("Client IP:"), ClientIP); 2636 SHOW_ULONG_VALUE("VRDEClientVersion", Info::tr("Client version:"), ClientVersion, ""); 2637 SHOW_UTF8_STRING("VRDEEncryption", Info::tr("Encryption:"), EncryptionStyle == 0 ? "RDP4" : "RDP5 (X.509)"); 2570 2638 } 2571 2639 } … … 2622 2690 } 2623 2691 2624 SHOW_BOOL_VALUE_EX("videocap", "Capturing:", fCaptureVideo, "active", "not active");2692 SHOW_BOOL_VALUE_EX("videocap", Info::tr("Capturing:"), fCaptureVideo, Info::tr("active"), Info::tr("not active")); 2625 2693 # ifdef VBOX_WITH_AUDIO_RECORDING 2626 SHOW_BOOL_VALUE_EX("videocapaudio", "Capture audio:", fCaptureAudio, "active", "not active");2694 SHOW_BOOL_VALUE_EX("videocapaudio", Info::tr("Capture audio:"), fCaptureAudio, Info::tr("active"), Info::tr("not active")); 2627 2695 # endif 2628 2696 szValue[0] = '\0'; … … 2634 2702 off += RTStrPrintf(&szValue[off], sizeof(szValue) - off, off ? ",%zu" : "%zu", i); 2635 2703 } 2636 SHOW_UTF8_STRING("capturescreens", "Capture screens:", szValue);2637 SHOW_BSTR_STRING("capturefilename", "Capture file:", bstrFile);2704 SHOW_UTF8_STRING("capturescreens", Info::tr("Capture screens:"), szValue); 2705 SHOW_BSTR_STRING("capturefilename", Info::tr("Capture file:"), bstrFile); 2638 2706 RTStrPrintf(szValue, sizeof(szValue), "%ux%u", Width, Height); 2639 SHOW_UTF8_STRING("captureres", "Capture dimensions:", szValue);2640 SHOW_ULONG_VALUE("capturevideorate", "Capture rate:", Rate, "kbps");2641 SHOW_ULONG_VALUE("capturevideofps", "Capture FPS:", Fps, "kbps");2642 SHOW_BSTR_STRING("captureopts", "Capture options:", bstrOptions);2707 SHOW_UTF8_STRING("captureres", Info::tr("Capture dimensions:"), szValue); 2708 SHOW_ULONG_VALUE("capturevideorate", Info::tr("Capture rate:"), Rate, Info::tr("kbps")); 2709 SHOW_ULONG_VALUE("capturevideofps", Info::tr("Capture FPS:"), Fps, Info::tr("kbps")); 2710 SHOW_BSTR_STRING("captureopts", Info::tr("Capture options:"), bstrOptions); 2643 2711 2644 2712 if (details != VMINFO_MACHINEREADABLE) … … 2659 2727 outputMachineReadableString("description", &description); 2660 2728 else 2661 RTPrintf( "Description:\n%ls\n", description.raw());2729 RTPrintf(Info::tr("Description:\n%ls\n"), description.raw()); 2662 2730 } 2663 2731 } 2664 2732 2665 2733 if (details != VMINFO_MACHINEREADABLE) 2666 RTPrintf( "Guest:\n\n");2667 2668 SHOW_ULONG_PROP(machine, MemoryBalloonSize, "GuestMemoryBalloon", "Configured memory balloon size:", "MB");2734 RTPrintf(Info::tr("Guest:\n\n")); 2735 2736 SHOW_ULONG_PROP(machine, MemoryBalloonSize, "GuestMemoryBalloon", Info::tr("Configured memory balloon size:"), Info::tr("MB")); 2669 2737 2670 2738 if (pConsole) … … 2674 2742 if (SUCCEEDED(rc) && !guest.isNull()) 2675 2743 { 2676 SHOW_STRING_PROP_NOT_EMPTY(guest, OSTypeId, "GuestOSType", "OS type:");2744 SHOW_STRING_PROP_NOT_EMPTY(guest, OSTypeId, "GuestOSType", Info::tr("OS type:")); 2677 2745 2678 2746 AdditionsRunLevelType_T guestRunLevel; /** @todo Add a runlevel-to-string (e.g. 0 = "None") method? */ 2679 2747 rc = guest->COMGETTER(AdditionsRunLevel)(&guestRunLevel); 2680 2748 if (SUCCEEDED(rc)) 2681 SHOW_ULONG_VALUE("GuestAdditionsRunLevel", "Additions run level:", (ULONG)guestRunLevel, "");2749 SHOW_ULONG_VALUE("GuestAdditionsRunLevel", Info::tr("Additions run level:"), (ULONG)guestRunLevel, ""); 2682 2750 2683 2751 Bstr guestString; … … 2691 2759 uRevision = 0; 2692 2760 RTStrPrintf(szValue, sizeof(szValue), "%ls r%u", guestString.raw(), uRevision); 2693 SHOW_UTF8_STRING("GuestAdditionsVersion", "Additions version:", szValue);2761 SHOW_UTF8_STRING("GuestAdditionsVersion", Info::tr("Additions version:"), szValue); 2694 2762 } 2695 2763 2696 2764 if (details != VMINFO_MACHINEREADABLE) 2697 RTPrintf( "\nGuest Facilities:\n\n");2765 RTPrintf(Info::tr("\nGuest Facilities:\n\n")); 2698 2766 2699 2767 /* Print information about known Guest Additions facilities: */ … … 2719 2787 { 2720 2788 makeTimeStr(szLastUpdated, sizeof(szLastUpdated), lLastUpdatedMS); 2721 RTPrintf( "Facility \"%ls\": %s (last update: %s)\n",2789 RTPrintf(Info::tr("Facility \"%ls\": %s (last update: %s)\n"), 2722 2790 guestString.raw(), facilityStateToName(curStatus, false /* No short naming */), szLastUpdated); 2723 2791 } … … 2730 2798 } 2731 2799 if (!collFac.size() && details != VMINFO_MACHINEREADABLE) 2732 RTPrintf( "No active facilities.\n");2800 RTPrintf(Info::tr("No active facilities.\n")); 2733 2801 } 2734 2802 } … … 2749 2817 { 2750 2818 if (details != VMINFO_MACHINEREADABLE) 2751 RTPrintf( "Snapshots:\n\n");2819 RTPrintf(Info::tr("Snapshots:\n\n")); 2752 2820 showSnapshots(snapshot, currentSnapshot, details); 2753 2821 } … … 2809 2877 VMNameOrUuid = ValueUnion.psz; 2810 2878 else 2811 return errorSyntax(USAGE_SHOWVMINFO, "Invalid parameter '%s'", ValueUnion.psz);2879 return errorSyntax(USAGE_SHOWVMINFO, Info::tr("Invalid parameter '%s'"), ValueUnion.psz); 2812 2880 break; 2813 2881 … … 2819 2887 /* check for required options */ 2820 2888 if (!VMNameOrUuid) 2821 return errorSyntax(USAGE_SHOWVMINFO, "VM name or UUID required");2889 return errorSyntax(USAGE_SHOWVMINFO, Info::tr("VM name or UUID required")); 2822 2890 2823 2891 /* try to find the given machine */ … … 2830 2898 /* Printing the log is exclusive. */ 2831 2899 if (fLog && (fMachinereadable || fDetails)) 2832 return errorSyntax(USAGE_SHOWVMINFO, "Option --log is exclusive");2900 return errorSyntax(USAGE_SHOWVMINFO, Info::tr("Option --log is exclusive")); 2833 2901 2834 2902 if (fLog) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r91416 r92372 44 44 using namespace com; 45 45 46 DECLARE_TRANSLATION_CONTEXT(List); 47 46 48 #ifdef VBOX_WITH_HOSTNETIF_API 47 49 static const char *getHostIfMediumTypeText(HostNetworkInterfaceMediumType_T enmType) … … 52 54 case HostNetworkInterfaceMediumType_PPP: return "PPP"; 53 55 case HostNetworkInterfaceMediumType_SLIP: return "SLIP"; 54 case HostNetworkInterfaceMediumType_Unknown: return "Unknown";56 case HostNetworkInterfaceMediumType_Unknown: return List::tr("Unknown"); 55 57 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 56 58 case HostNetworkInterfaceMediumType_32BitHack: break; /* Shut up compiler warnings. */ 57 59 #endif 58 60 } 59 return "unknown";61 return List::tr("unknown"); 60 62 } 61 63 … … 64 66 switch (enmStatus) 65 67 { 66 case HostNetworkInterfaceStatus_Up: return "Up";67 case HostNetworkInterfaceStatus_Down: return "Down";68 case HostNetworkInterfaceStatus_Unknown: return "Unknown";68 case HostNetworkInterfaceStatus_Up: return List::tr("Up"); 69 case HostNetworkInterfaceStatus_Down: return List::tr("Down"); 70 case HostNetworkInterfaceStatus_Unknown: return List::tr("Unknown"); 69 71 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 70 72 case HostNetworkInterfaceStatus_32BitHack: break; /* Shut up compiler warnings. */ 71 73 #endif 72 74 } 73 return "unknown";75 return List::tr("unknown"); 74 76 } 75 77 #endif /* VBOX_WITH_HOSTNETIF_API */ … … 79 81 switch (enmType) 80 82 { 81 case DeviceType_HardDisk: return "HardDisk";83 case DeviceType_HardDisk: return List::tr("HardDisk"); 82 84 case DeviceType_DVD: return "DVD"; 83 case DeviceType_Floppy: return "Floppy";85 case DeviceType_Floppy: return List::tr("Floppy"); 84 86 /* Make MSC happy */ 85 87 case DeviceType_Null: return "Null"; 86 case DeviceType_Network: return "Network";88 case DeviceType_Network: return List::tr("Network"); 87 89 case DeviceType_USB: return "USB"; 88 case DeviceType_SharedFolder: return "SharedFolder";89 case DeviceType_Graphics3D: return "Graphics3D";90 case DeviceType_SharedFolder: return List::tr("SharedFolder"); 91 case DeviceType_Graphics3D: return List::tr("Graphics3D"); 90 92 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 91 93 case DeviceType_32BitHack: break; /* Shut up compiler warnings. */ 92 94 #endif 93 95 } 94 return "Unknown";96 return List::tr("Unknown"); 95 97 } 96 98 … … 109 111 for (size_t i = 0; i < internalNetworks.size(); ++i) 110 112 { 111 RTPrintf( "Name: %ls\n", internalNetworks[i]);113 RTPrintf(List::tr("Name: %ls\n"), internalNetworks[i]); 112 114 } 113 115 return rc; … … 147 149 Bstr interfaceName; 148 150 networkInterface->COMGETTER(Name)(interfaceName.asOutParam()); 149 RTPrintf( "Name: %ls\n", interfaceName.raw());151 RTPrintf(List::tr("Name: %ls\n"), interfaceName.raw()); 150 152 Guid interfaceGuid; 151 153 networkInterface->COMGETTER(Id)(interfaceGuid.asOutParam()); … … 154 156 Bstr interfaceName; 155 157 networkInterface->COMGETTER(Name)(interfaceName.asOutParam()); 156 RTPrintf( "Name: %ls\n", interfaceName.raw());158 RTPrintf(List::tr("Name: %ls\n"), interfaceName.raw()); 157 159 Bstr interfaceGuid; 158 160 networkInterface->COMGETTER(Id)(interfaceGuid.asOutParam()); … … 160 162 BOOL fDHCPEnabled = FALSE; 161 163 networkInterface->COMGETTER(DHCPEnabled)(&fDHCPEnabled); 162 RTPrintf("DHCP: %s\n", fDHCPEnabled ? "Enabled" : "Disabled");164 RTPrintf("DHCP: %s\n", fDHCPEnabled ? List::tr("Enabled") : List::tr("Disabled")); 163 165 164 166 Bstr IPAddress; 165 167 networkInterface->COMGETTER(IPAddress)(IPAddress.asOutParam()); 166 RTPrintf( "IPAddress: %ls\n", IPAddress.raw());168 RTPrintf(List::tr("IPAddress: %ls\n"), IPAddress.raw()); 167 169 Bstr NetworkMask; 168 170 networkInterface->COMGETTER(NetworkMask)(NetworkMask.asOutParam()); 169 RTPrintf( "NetworkMask: %ls\n", NetworkMask.raw());171 RTPrintf(List::tr("NetworkMask: %ls\n"), NetworkMask.raw()); 170 172 Bstr IPV6Address; 171 173 networkInterface->COMGETTER(IPV6Address)(IPV6Address.asOutParam()); 172 RTPrintf( "IPV6Address: %ls\n", IPV6Address.raw());174 RTPrintf(List::tr("IPV6Address: %ls\n"), IPV6Address.raw()); 173 175 ULONG IPV6NetworkMaskPrefixLength; 174 176 networkInterface->COMGETTER(IPV6NetworkMaskPrefixLength)(&IPV6NetworkMaskPrefixLength); 175 RTPrintf( "IPV6NetworkMaskPrefixLength: %d\n", IPV6NetworkMaskPrefixLength);177 RTPrintf(List::tr("IPV6NetworkMaskPrefixLength: %d\n"), IPV6NetworkMaskPrefixLength); 176 178 Bstr HardwareAddress; 177 179 networkInterface->COMGETTER(HardwareAddress)(HardwareAddress.asOutParam()); 178 RTPrintf( "HardwareAddress: %ls\n", HardwareAddress.raw());180 RTPrintf(List::tr("HardwareAddress: %ls\n"), HardwareAddress.raw()); 179 181 HostNetworkInterfaceMediumType_T Type; 180 182 networkInterface->COMGETTER(MediumType)(&Type); 181 RTPrintf( "MediumType: %s\n", getHostIfMediumTypeText(Type));183 RTPrintf(List::tr("MediumType: %s\n"), getHostIfMediumTypeText(Type)); 182 184 BOOL fWireless = FALSE; 183 185 networkInterface->COMGETTER(Wireless)(&fWireless); 184 RTPrintf( "Wireless: %s\n", fWireless ? "Yes" : "No");186 RTPrintf(List::tr("Wireless: %s\n"), fWireless ? List::tr("Yes") : List::tr("No")); 185 187 HostNetworkInterfaceStatus_T Status; 186 188 networkInterface->COMGETTER(Status)(&Status); 187 RTPrintf( "Status: %s\n", getHostIfStatusText(Status));189 RTPrintf(List::tr("Status: %s\n"), getHostIfStatusText(Status)); 188 190 Bstr netName; 189 191 networkInterface->COMGETTER(NetworkName)(netName.asOutParam()); 190 RTPrintf( "VBoxNetworkName: %ls\n\n", netName.raw());192 RTPrintf(List::tr("VBoxNetworkName: %ls\n\n"), netName.raw()); 191 193 #endif 192 194 } … … 213 215 Bstr networkName; 214 216 hostOnlyNetwork->COMGETTER(NetworkName)(networkName.asOutParam()); 215 RTPrintf( "Name: %ls\n", networkName.raw());217 RTPrintf(List::tr("Name: %ls\n"), networkName.raw()); 216 218 Bstr networkGuid; 217 219 hostOnlyNetwork->COMGETTER(Id)(networkGuid.asOutParam()); … … 219 221 BOOL fEnabled = FALSE; 220 222 hostOnlyNetwork->COMGETTER(Enabled)(&fEnabled); 221 RTPrintf( "State: %s\n", fEnabled ? "Enabled" : "Disabled");223 RTPrintf(List::tr("State: %s\n"), fEnabled ? List::tr("Enabled") : List::tr("Disabled")); 222 224 223 225 Bstr networkMask; 224 226 hostOnlyNetwork->COMGETTER(NetworkMask)(networkMask.asOutParam()); 225 RTPrintf( "NetworkMask: %ls\n", networkMask.raw());227 RTPrintf(List::tr("NetworkMask: %ls\n"), networkMask.raw()); 226 228 Bstr lowerIP; 227 229 hostOnlyNetwork->COMGETTER(LowerIP)(lowerIP.asOutParam()); 228 RTPrintf( "LowerIP: %ls\n", lowerIP.raw());230 RTPrintf(List::tr("LowerIP: %ls\n"), lowerIP.raw()); 229 231 Bstr upperIP; 230 232 hostOnlyNetwork->COMGETTER(UpperIP)(upperIP.asOutParam()); 231 RTPrintf( "UpperIP: %ls\n", upperIP.raw());233 RTPrintf(List::tr("UpperIP: %ls\n"), upperIP.raw()); 232 234 // Bstr NetworkId; 233 235 // hostOnlyNetwork->COMGETTER(Id)(NetworkId.asOutParam()); 234 236 // RTPrintf("NetworkId: %ls\n", NetworkId.raw()); 235 237 Bstr netName = BstrFmt("hostonly-%ls", networkName.raw()); 236 RTPrintf( "VBoxNetworkName: %ls\n\n", netName.raw());238 RTPrintf(List::tr("VBoxNetworkName: %ls\n\n"), netName.raw()); 237 239 } 238 240 return rc; … … 259 261 Bstr networkName; 260 262 cloudNetwork->COMGETTER(NetworkName)(networkName.asOutParam()); 261 RTPrintf( "Name: %ls\n", networkName.raw());263 RTPrintf(List::tr("Name: %ls\n"), networkName.raw()); 262 264 // Guid interfaceGuid; 263 265 // cloudNetwork->COMGETTER(Id)(interfaceGuid.asOutParam()); … … 265 267 BOOL fEnabled = FALSE; 266 268 cloudNetwork->COMGETTER(Enabled)(&fEnabled); 267 RTPrintf( "State: %s\n", fEnabled ? "Enabled" : "Disabled");269 RTPrintf(List::tr("State: %s\n"), fEnabled ? List::tr("Enabled") : List::tr("Disabled")); 268 270 269 271 Bstr Provider; 270 272 cloudNetwork->COMGETTER(Provider)(Provider.asOutParam()); 271 RTPrintf( "CloudProvider: %ls\n", Provider.raw());273 RTPrintf(List::tr("CloudProvider: %ls\n"), Provider.raw()); 272 274 Bstr Profile; 273 275 cloudNetwork->COMGETTER(Profile)(Profile.asOutParam()); 274 RTPrintf( "CloudProfile: %ls\n", Profile.raw());276 RTPrintf(List::tr("CloudProfile: %ls\n"), Profile.raw()); 275 277 Bstr NetworkId; 276 278 cloudNetwork->COMGETTER(NetworkId)(NetworkId.asOutParam()); 277 RTPrintf( "CloudNetworkId: %ls\n", NetworkId.raw());279 RTPrintf(List::tr("CloudNetworkId: %ls\n"), NetworkId.raw()); 278 280 Bstr netName = BstrFmt("cloud-%ls", networkName.raw()); 279 RTPrintf( "VBoxNetworkName: %ls\n\n", netName.raw());281 RTPrintf(List::tr("VBoxNetworkName: %ls\n\n"), netName.raw()); 280 282 } 281 283 return rc; … … 299 301 = 300 302 { 301 { ProcessorFeature_HWVirtEx, "HW virtualization"},303 { ProcessorFeature_HWVirtEx, List::tr("HW virtualization") }, 302 304 { ProcessorFeature_PAE, "PAE" }, 303 { ProcessorFeature_LongMode, "long mode"},304 { ProcessorFeature_NestedPaging, "nested paging"},305 { ProcessorFeature_UnrestrictedGuest, "unrestricted guest"},306 { ProcessorFeature_NestedHWVirt, "nested HW virtualization"},307 { ProcessorFeature_VirtVmsaveVmload, "virt. vmsave/vmload"},305 { ProcessorFeature_LongMode, List::tr("long mode") }, 306 { ProcessorFeature_NestedPaging, List::tr("nested paging") }, 307 { ProcessorFeature_UnrestrictedGuest, List::tr("unrestricted guest") }, 308 { ProcessorFeature_NestedHWVirt, List::tr("nested HW virtualization") }, 309 { ProcessorFeature_VirtVmsaveVmload, List::tr("virt. vmsave/vmload") }, 308 310 }; 309 311 HRESULT rc; … … 311 313 CHECK_ERROR(pVirtualBox, COMGETTER(Host)(Host.asOutParam())); 312 314 313 RTPrintf( "Host Information:\n\n");315 RTPrintf(List::tr("Host Information:\n\n")); 314 316 315 317 LONG64 u64UtcTime = 0; … … 317 319 RTTIMESPEC timeSpec; 318 320 char szTime[32]; 319 RTPrintf( "Host time: %s\n", RTTimeSpecToString(RTTimeSpecSetMilli(&timeSpec, u64UtcTime), szTime, sizeof(szTime)));321 RTPrintf(List::tr("Host time: %s\n"), RTTimeSpecToString(RTTimeSpecSetMilli(&timeSpec, u64UtcTime), szTime, sizeof(szTime))); 320 322 321 323 ULONG processorOnlineCount = 0; 322 324 CHECK_ERROR(Host, COMGETTER(ProcessorOnlineCount)(&processorOnlineCount)); 323 RTPrintf( "Processor online count: %lu\n", processorOnlineCount);325 RTPrintf(List::tr("Processor online count: %lu\n"), processorOnlineCount); 324 326 ULONG processorCount = 0; 325 327 CHECK_ERROR(Host, COMGETTER(ProcessorCount)(&processorCount)); 326 RTPrintf( "Processor count: %lu\n", processorCount);328 RTPrintf(List::tr("Processor count: %lu\n"), processorCount); 327 329 ULONG processorOnlineCoreCount = 0; 328 330 CHECK_ERROR(Host, COMGETTER(ProcessorOnlineCoreCount)(&processorOnlineCoreCount)); 329 RTPrintf( "Processor online core count: %lu\n", processorOnlineCoreCount);331 RTPrintf(List::tr("Processor online core count: %lu\n"), processorOnlineCoreCount); 330 332 ULONG processorCoreCount = 0; 331 333 CHECK_ERROR(Host, COMGETTER(ProcessorCoreCount)(&processorCoreCount)); 332 RTPrintf( "Processor core count: %lu\n", processorCoreCount);334 RTPrintf(List::tr("Processor core count: %lu\n"), processorCoreCount); 333 335 for (unsigned i = 0; i < RT_ELEMENTS(features); i++) 334 336 { 335 337 BOOL supported; 336 338 CHECK_ERROR(Host, GetProcessorFeature(features[i].feature, &supported)); 337 RTPrintf( "Processor supports %s: %s\n", features[i].pszName, supported ? "yes" : "no");339 RTPrintf(List::tr("Processor supports %s: %s\n"), features[i].pszName, supported ? List::tr("yes") : List::tr("no")); 338 340 } 339 341 for (ULONG i = 0; i < processorCount; i++) … … 342 344 CHECK_ERROR(Host, GetProcessorSpeed(i, &processorSpeed)); 343 345 if (processorSpeed) 344 RTPrintf( "Processor#%u speed: %lu MHz\n", i, processorSpeed);346 RTPrintf(List::tr("Processor#%u speed: %lu MHz\n"), i, processorSpeed); 345 347 else 346 RTPrintf( "Processor#%u speed: unknown\n", i);348 RTPrintf(List::tr("Processor#%u speed: unknown\n"), i); 347 349 Bstr processorDescription; 348 350 CHECK_ERROR(Host, GetProcessorDescription(i, processorDescription.asOutParam())); 349 RTPrintf( "Processor#%u description: %ls\n", i, processorDescription.raw());351 RTPrintf(List::tr("Processor#%u description: %ls\n"), i, processorDescription.raw()); 350 352 } 351 353 352 354 ULONG memorySize = 0; 353 355 CHECK_ERROR(Host, COMGETTER(MemorySize)(&memorySize)); 354 RTPrintf( "Memory size: %lu MByte\n", memorySize);356 RTPrintf(List::tr("Memory size: %lu MByte\n"), memorySize); 355 357 356 358 ULONG memoryAvailable = 0; 357 359 CHECK_ERROR(Host, COMGETTER(MemoryAvailable)(&memoryAvailable)); 358 RTPrintf( "Memory available: %lu MByte\n", memoryAvailable);360 RTPrintf(List::tr("Memory available: %lu MByte\n"), memoryAvailable); 359 361 360 362 Bstr operatingSystem; 361 363 CHECK_ERROR(Host, COMGETTER(OperatingSystem)(operatingSystem.asOutParam())); 362 RTPrintf( "Operating system: %ls\n", operatingSystem.raw());364 RTPrintf(List::tr("Operating system: %ls\n"), operatingSystem.raw()); 363 365 364 366 Bstr oSVersion; 365 367 CHECK_ERROR(Host, COMGETTER(OSVersion)(oSVersion.asOutParam())); 366 RTPrintf( "Operating system version: %ls\n", oSVersion.raw());368 RTPrintf(List::tr("Operating system version: %ls\n"), oSVersion.raw()); 367 369 return rc; 368 370 } … … 422 424 CHECK_ERROR(systemProperties, COMGETTER(MediumFormats)(ComSafeArrayAsOutParam(mediumFormats))); 423 425 424 RTPrintf( "Supported hard disk backends:\n\n");426 RTPrintf(List::tr("Supported hard disk backends:\n\n")); 425 427 for (size_t i = 0; i < mediumFormats.size(); ++i) 426 428 { … … 441 443 442 444 443 RTPrintf( "Backend %u: id='%ls' description='%ls' capabilities=%#06x extensions='",445 RTPrintf(List::tr("Backend %u: id='%ls' description='%ls' capabilities=%#06x extensions='"), 444 446 i, id.raw(), description.raw(), caps); 445 447 … … 470 472 ComSafeArrayAsOutParam(propertyDefaults))); 471 473 472 RTPrintf( " properties=(");474 RTPrintf(List::tr(" properties=(")); 473 475 if (propertyNames.size() > 0) 474 476 { 475 477 for (size_t j = 0; j < propertyNames.size(); ++j) 476 478 { 477 RTPrintf( "\n name='%ls' desc='%ls' type=",479 RTPrintf(List::tr("\n name='%ls' desc='%ls' type="), 478 480 Bstr(propertyNames[j]).raw(), Bstr(propertyDescriptions[j]).raw()); 479 481 switch (propertyTypes[j]) 480 482 { 481 case DataType_Int32: RTPrintf( "int"); break;482 case DataType_Int8: RTPrintf( "byte"); break;483 case DataType_String: RTPrintf( "string"); break;483 case DataType_Int32: RTPrintf(List::tr("int")); break; 484 case DataType_Int8: RTPrintf(List::tr("byte")); break; 485 case DataType_String: RTPrintf(List::tr("string")); break; 484 486 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 485 487 case DataType_32BitHack: break; /* Shut up compiler warnings. */ 486 488 #endif 487 489 } 488 RTPrintf( " flags=%#04x", propertyFlags[j]);489 RTPrintf( " default='%ls'", Bstr(propertyDefaults[j]).raw());490 RTPrintf(List::tr(" flags=%#04x"), propertyFlags[j]); 491 RTPrintf(List::tr(" default='%ls'"), Bstr(propertyDefaults[j]).raw()); 490 492 if (j != propertyNames.size()-1) 491 493 RTPrintf(", "); … … 513 515 CHECK_ERROR_RET(Host, COMGETTER(USBDevices)(ComSafeArrayAsOutParam(CollPtr)), 1); 514 516 515 RTPrintf( "Host USB Devices:\n\n");517 RTPrintf(List::tr("Host USB Devices:\n\n")); 516 518 517 519 if (CollPtr.size() == 0) 518 520 { 519 RTPrintf( "<none>\n\n");521 RTPrintf(List::tr("<none>\n\n")); 520 522 } 521 523 else … … 541 543 CHECK_ERROR_RET(dev, COMGETTER(Speed)(&enmSpeed), 1); 542 544 543 RTPrintf("UUID: %s\n" 544 "VendorId: %#06x (%04X)\n" 545 "ProductId: %#06x (%04X)\n" 546 "Revision: %u.%u (%02u%02u)\n" 547 "Port: %u\n", 545 RTPrintf(List::tr( 546 "UUID: %s\n" 547 "VendorId: %#06x (%04X)\n" 548 "ProductId: %#06x (%04X)\n" 549 "Revision: %u.%u (%02u%02u)\n" 550 "Port: %u\n"), 548 551 Utf8Str(id).c_str(), 549 552 usVendorId, usVendorId, usProductId, usProductId, … … 556 559 { 557 560 case USBConnectionSpeed_Low: 558 pszSpeed = "Low";561 pszSpeed = List::tr("Low"); 559 562 break; 560 563 case USBConnectionSpeed_Full: 561 pszSpeed = "Full";564 pszSpeed = List::tr("Full"); 562 565 break; 563 566 case USBConnectionSpeed_High: 564 pszSpeed = "High";567 pszSpeed = List::tr("High"); 565 568 break; 566 569 case USBConnectionSpeed_Super: 567 pszSpeed = "Super";570 pszSpeed = List::tr("Super"); 568 571 break; 569 572 case USBConnectionSpeed_SuperPlus: 570 pszSpeed = "SuperPlus";573 pszSpeed = List::tr("SuperPlus"); 571 574 break; 572 575 default: … … 575 578 } 576 579 577 RTPrintf( "USB version/speed: %u/%s\n", usVersion, pszSpeed);580 RTPrintf(List::tr("USB version/speed: %u/%s\n"), usVersion, pszSpeed); 578 581 579 582 /* optional stuff. */ … … 584 587 bstr = Bstr(CollDevInfo[0]); 585 588 if (!bstr.isEmpty()) 586 RTPrintf( "Manufacturer: %ls\n", bstr.raw());589 RTPrintf(List::tr("Manufacturer: %ls\n"), bstr.raw()); 587 590 if (CollDevInfo.size() >= 2) 588 591 bstr = Bstr(CollDevInfo[1]); 589 592 if (!bstr.isEmpty()) 590 RTPrintf( "Product: %ls\n", bstr.raw());593 RTPrintf(List::tr("Product: %ls\n"), bstr.raw()); 591 594 CHECK_ERROR_RET(dev, COMGETTER(SerialNumber)(bstr.asOutParam()), 1); 592 595 if (!bstr.isEmpty()) 593 RTPrintf( "SerialNumber: %ls\n", bstr.raw());596 RTPrintf(List::tr("SerialNumber: %ls\n"), bstr.raw()); 594 597 CHECK_ERROR_RET(dev, COMGETTER(Address)(bstr.asOutParam()), 1); 595 598 if (!bstr.isEmpty()) 596 RTPrintf( "Address: %ls\n", bstr.raw());599 RTPrintf(List::tr("Address: %ls\n"), bstr.raw()); 597 600 CHECK_ERROR_RET(dev, COMGETTER(PortPath)(bstr.asOutParam()), 1); 598 601 if (!bstr.isEmpty()) 599 RTPrintf( "Port path: %ls\n", bstr.raw());602 RTPrintf(List::tr("Port path: %ls\n"), bstr.raw()); 600 603 601 604 /* current state */ … … 606 609 { 607 610 case USBDeviceState_NotSupported: 608 pszState = "Not supported";611 pszState = List::tr("Not supported"); 609 612 break; 610 613 case USBDeviceState_Unavailable: 611 pszState = "Unavailable";614 pszState = List::tr("Unavailable"); 612 615 break; 613 616 case USBDeviceState_Busy: 614 pszState = "Busy";617 pszState = List::tr("Busy"); 615 618 break; 616 619 case USBDeviceState_Available: 617 pszState = "Available";620 pszState = List::tr("Available"); 618 621 break; 619 622 case USBDeviceState_Held: 620 pszState = "Held";623 pszState = List::tr("Held"); 621 624 break; 622 625 case USBDeviceState_Captured: 623 pszState = "Captured";626 pszState = List::tr("Captured"); 624 627 break; 625 628 default: … … 627 630 break; 628 631 } 629 RTPrintf( "Current State: %s\n\n", pszState);632 RTPrintf(List::tr("Current State: %s\n\n"), pszState); 630 633 } 631 634 } … … 644 647 HRESULT rc; 645 648 646 RTPrintf( "Global USB Device Filters:\n\n");649 RTPrintf(List::tr("Global USB Device Filters:\n\n")); 647 650 648 651 ComPtr<IHost> host; … … 654 657 if (coll.size() == 0) 655 658 { 656 RTPrintf( "<none>\n\n");659 RTPrintf(List::tr("<none>\n\n")); 657 660 } 658 661 else … … 664 667 /* Query info. */ 665 668 666 RTPrintf( "Index: %zu\n", index);669 RTPrintf(List::tr("Index: %zu\n"), index); 667 670 668 671 BOOL active = FALSE; 669 672 CHECK_ERROR_RET(flt, COMGETTER(Active)(&active), 1); 670 RTPrintf( "Active: %s\n", active ? "yes" : "no");673 RTPrintf(List::tr("Active: %s\n"), active ? List::tr("yes") : List::tr("no")); 671 674 672 675 USBDeviceFilterAction_T action; 673 676 CHECK_ERROR_RET(flt, COMGETTER(Action)(&action), 1); 674 const char *pszAction = "<invalid>";677 const char *pszAction = List::tr("<invalid>"); 675 678 switch (action) 676 679 { 677 680 case USBDeviceFilterAction_Ignore: 678 pszAction = "Ignore";681 pszAction = List::tr("Ignore"); 679 682 break; 680 683 case USBDeviceFilterAction_Hold: 681 pszAction = "Hold";684 pszAction = List::tr("Hold"); 682 685 break; 683 686 default: 684 687 break; 685 688 } 686 RTPrintf( "Action: %s\n", pszAction);689 RTPrintf(List::tr("Action: %s\n"), pszAction); 687 690 688 691 Bstr bstr; 689 692 CHECK_ERROR_RET(flt, COMGETTER(Name)(bstr.asOutParam()), 1); 690 RTPrintf( "Name: %ls\n", bstr.raw());693 RTPrintf(List::tr("Name: %ls\n"), bstr.raw()); 691 694 CHECK_ERROR_RET(flt, COMGETTER(VendorId)(bstr.asOutParam()), 1); 692 RTPrintf( "VendorId: %ls\n", bstr.raw());695 RTPrintf(List::tr("VendorId: %ls\n"), bstr.raw()); 693 696 CHECK_ERROR_RET(flt, COMGETTER(ProductId)(bstr.asOutParam()), 1); 694 RTPrintf( "ProductId: %ls\n", bstr.raw());697 RTPrintf(List::tr("ProductId: %ls\n"), bstr.raw()); 695 698 CHECK_ERROR_RET(flt, COMGETTER(Revision)(bstr.asOutParam()), 1); 696 RTPrintf( "Revision: %ls\n", bstr.raw());699 RTPrintf(List::tr("Revision: %ls\n"), bstr.raw()); 697 700 CHECK_ERROR_RET(flt, COMGETTER(Manufacturer)(bstr.asOutParam()), 1); 698 RTPrintf( "Manufacturer: %ls\n", bstr.raw());701 RTPrintf(List::tr("Manufacturer: %ls\n"), bstr.raw()); 699 702 CHECK_ERROR_RET(flt, COMGETTER(Product)(bstr.asOutParam()), 1); 700 RTPrintf( "Product: %ls\n", bstr.raw());703 RTPrintf(List::tr("Product: %ls\n"), bstr.raw()); 701 704 CHECK_ERROR_RET(flt, COMGETTER(SerialNumber)(bstr.asOutParam()), 1); 702 RTPrintf( "Serial Number: %ls\n\n", bstr.raw());705 RTPrintf(List::tr("Serial Number: %ls\n\n"), bstr.raw()); 703 706 } 704 707 } … … 725 728 726 729 pVirtualBox->COMGETTER(APIVersion)(str.asOutParam()); 727 RTPrintf( "API version: %ls\n", str.raw());730 RTPrintf(List::tr("API version: %ls\n"), str.raw()); 728 731 729 732 systemProperties->COMGETTER(MinGuestRAM)(&ulValue); 730 RTPrintf( "Minimum guest RAM size: %u Megabytes\n", ulValue);733 RTPrintf(List::tr("Minimum guest RAM size: %u Megabytes\n"), ulValue); 731 734 systemProperties->COMGETTER(MaxGuestRAM)(&ulValue); 732 RTPrintf( "Maximum guest RAM size: %u Megabytes\n", ulValue);735 RTPrintf(List::tr("Maximum guest RAM size: %u Megabytes\n"), ulValue); 733 736 systemProperties->COMGETTER(MinGuestVRAM)(&ulValue); 734 RTPrintf( "Minimum video RAM size: %u Megabytes\n", ulValue);737 RTPrintf(List::tr("Minimum video RAM size: %u Megabytes\n"), ulValue); 735 738 systemProperties->COMGETTER(MaxGuestVRAM)(&ulValue); 736 RTPrintf( "Maximum video RAM size: %u Megabytes\n", ulValue);739 RTPrintf(List::tr("Maximum video RAM size: %u Megabytes\n"), ulValue); 737 740 systemProperties->COMGETTER(MaxGuestMonitors)(&ulValue); 738 RTPrintf( "Maximum guest monitor count: %u\n", ulValue);741 RTPrintf(List::tr("Maximum guest monitor count: %u\n"), ulValue); 739 742 systemProperties->COMGETTER(MinGuestCPUCount)(&ulValue); 740 RTPrintf( "Minimum guest CPU count: %u\n", ulValue);743 RTPrintf(List::tr("Minimum guest CPU count: %u\n"), ulValue); 741 744 systemProperties->COMGETTER(MaxGuestCPUCount)(&ulValue); 742 RTPrintf( "Maximum guest CPU count: %u\n", ulValue);745 RTPrintf(List::tr("Maximum guest CPU count: %u\n"), ulValue); 743 746 systemProperties->COMGETTER(InfoVDSize)(&i64Value); 744 RTPrintf( "Virtual disk limit (info): %lld Bytes\n", i64Value);747 RTPrintf(List::tr("Virtual disk limit (info): %lld Bytes\n"), i64Value); 745 748 systemProperties->COMGETTER(SerialPortCount)(&ulValue); 746 RTPrintf( "Maximum Serial Port count: %u\n", ulValue);749 RTPrintf(List::tr("Maximum Serial Port count: %u\n"), ulValue); 747 750 systemProperties->COMGETTER(ParallelPortCount)(&ulValue); 748 RTPrintf( "Maximum Parallel Port count: %u\n", ulValue);751 RTPrintf(List::tr("Maximum Parallel Port count: %u\n"), ulValue); 749 752 systemProperties->COMGETTER(MaxBootPosition)(&ulValue); 750 RTPrintf( "Maximum Boot Position: %u\n", ulValue);753 RTPrintf(List::tr("Maximum Boot Position: %u\n"), ulValue); 751 754 systemProperties->GetMaxNetworkAdapters(ChipsetType_PIIX3, &ulValue); 752 RTPrintf( "Maximum PIIX3 Network Adapter count: %u\n", ulValue);755 RTPrintf(List::tr("Maximum PIIX3 Network Adapter count: %u\n"), ulValue); 753 756 systemProperties->GetMaxNetworkAdapters(ChipsetType_ICH9, &ulValue); 754 RTPrintf( "Maximum ICH9 Network Adapter count: %u\n", ulValue);757 RTPrintf(List::tr("Maximum ICH9 Network Adapter count: %u\n"), ulValue); 755 758 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_IDE, &ulValue); 756 RTPrintf( "Maximum PIIX3 IDE Controllers: %u\n", ulValue);759 RTPrintf(List::tr("Maximum PIIX3 IDE Controllers: %u\n"), ulValue); 757 760 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_IDE, &ulValue); 758 RTPrintf( "Maximum ICH9 IDE Controllers: %u\n", ulValue);761 RTPrintf(List::tr("Maximum ICH9 IDE Controllers: %u\n"), ulValue); 759 762 systemProperties->GetMaxPortCountForStorageBus(StorageBus_IDE, &ulValue); 760 RTPrintf( "Maximum IDE Port count: %u\n", ulValue);763 RTPrintf(List::tr("Maximum IDE Port count: %u\n"), ulValue); 761 764 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_IDE, &ulValue); 762 RTPrintf( "Maximum Devices per IDE Port: %u\n", ulValue);765 RTPrintf(List::tr("Maximum Devices per IDE Port: %u\n"), ulValue); 763 766 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SATA, &ulValue); 764 RTPrintf( "Maximum PIIX3 SATA Controllers: %u\n", ulValue);767 RTPrintf(List::tr("Maximum PIIX3 SATA Controllers: %u\n"), ulValue); 765 768 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SATA, &ulValue); 766 RTPrintf( "Maximum ICH9 SATA Controllers: %u\n", ulValue);769 RTPrintf(List::tr("Maximum ICH9 SATA Controllers: %u\n"), ulValue); 767 770 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SATA, &ulValue); 768 RTPrintf( "Maximum SATA Port count: %u\n", ulValue);771 RTPrintf(List::tr("Maximum SATA Port count: %u\n"), ulValue); 769 772 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SATA, &ulValue); 770 RTPrintf( "Maximum Devices per SATA Port: %u\n", ulValue);773 RTPrintf(List::tr("Maximum Devices per SATA Port: %u\n"), ulValue); 771 774 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SCSI, &ulValue); 772 RTPrintf( "Maximum PIIX3 SCSI Controllers: %u\n", ulValue);775 RTPrintf(List::tr("Maximum PIIX3 SCSI Controllers: %u\n"), ulValue); 773 776 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SCSI, &ulValue); 774 RTPrintf( "Maximum ICH9 SCSI Controllers: %u\n", ulValue);777 RTPrintf(List::tr("Maximum ICH9 SCSI Controllers: %u\n"), ulValue); 775 778 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SCSI, &ulValue); 776 RTPrintf( "Maximum SCSI Port count: %u\n", ulValue);779 RTPrintf(List::tr("Maximum SCSI Port count: %u\n"), ulValue); 777 780 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SCSI, &ulValue); 778 RTPrintf( "Maximum Devices per SCSI Port: %u\n", ulValue);781 RTPrintf(List::tr("Maximum Devices per SCSI Port: %u\n"), ulValue); 779 782 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SAS, &ulValue); 780 RTPrintf( "Maximum SAS PIIX3 Controllers: %u\n", ulValue);783 RTPrintf(List::tr("Maximum SAS PIIX3 Controllers: %u\n"), ulValue); 781 784 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SAS, &ulValue); 782 RTPrintf( "Maximum SAS ICH9 Controllers: %u\n", ulValue);785 RTPrintf(List::tr("Maximum SAS ICH9 Controllers: %u\n"), ulValue); 783 786 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SAS, &ulValue); 784 RTPrintf( "Maximum SAS Port count: %u\n", ulValue);787 RTPrintf(List::tr("Maximum SAS Port count: %u\n"), ulValue); 785 788 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SAS, &ulValue); 786 RTPrintf( "Maximum Devices per SAS Port: %u\n", ulValue);789 RTPrintf(List::tr("Maximum Devices per SAS Port: %u\n"), ulValue); 787 790 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_PCIe, &ulValue); 788 RTPrintf( "Maximum NVMe PIIX3 Controllers: %u\n", ulValue);791 RTPrintf(List::tr("Maximum NVMe PIIX3 Controllers: %u\n"), ulValue); 789 792 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_PCIe, &ulValue); 790 RTPrintf( "Maximum NVMe ICH9 Controllers: %u\n", ulValue);793 RTPrintf(List::tr("Maximum NVMe ICH9 Controllers: %u\n"), ulValue); 791 794 systemProperties->GetMaxPortCountForStorageBus(StorageBus_PCIe, &ulValue); 792 RTPrintf( "Maximum NVMe Port count: %u\n", ulValue);795 RTPrintf(List::tr("Maximum NVMe Port count: %u\n"), ulValue); 793 796 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_PCIe, &ulValue); 794 RTPrintf( "Maximum Devices per NVMe Port: %u\n", ulValue);797 RTPrintf(List::tr("Maximum Devices per NVMe Port: %u\n"), ulValue); 795 798 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_VirtioSCSI, &ulValue); 796 RTPrintf( "Maximum virtio-scsi PIIX3 Controllers: %u\n", ulValue);799 RTPrintf(List::tr("Maximum virtio-scsi PIIX3 Controllers: %u\n"), ulValue); 797 800 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_VirtioSCSI, &ulValue); 798 RTPrintf( "Maximum virtio-scsi ICH9 Controllers: %u\n", ulValue);801 RTPrintf(List::tr("Maximum virtio-scsi ICH9 Controllers: %u\n"), ulValue); 799 802 systemProperties->GetMaxPortCountForStorageBus(StorageBus_VirtioSCSI, &ulValue); 800 RTPrintf( "Maximum virtio-scsi Port count: %u\n", ulValue);803 RTPrintf(List::tr("Maximum virtio-scsi Port count: %u\n"), ulValue); 801 804 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_VirtioSCSI, &ulValue); 802 RTPrintf( "Maximum Devices per virtio-scsi Port: %u\n", ulValue);805 RTPrintf(List::tr("Maximum Devices per virtio-scsi Port: %u\n"), ulValue); 803 806 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_Floppy, &ulValue); 804 RTPrintf( "Maximum PIIX3 Floppy Controllers:%u\n", ulValue);807 RTPrintf(List::tr("Maximum PIIX3 Floppy Controllers:%u\n"), ulValue); 805 808 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_Floppy, &ulValue); 806 RTPrintf( "Maximum ICH9 Floppy Controllers: %u\n", ulValue);809 RTPrintf(List::tr("Maximum ICH9 Floppy Controllers: %u\n"), ulValue); 807 810 systemProperties->GetMaxPortCountForStorageBus(StorageBus_Floppy, &ulValue); 808 RTPrintf( "Maximum Floppy Port count: %u\n", ulValue);811 RTPrintf(List::tr("Maximum Floppy Port count: %u\n"), ulValue); 809 812 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_Floppy, &ulValue); 810 RTPrintf( "Maximum Devices per Floppy Port: %u\n", ulValue);813 RTPrintf(List::tr("Maximum Devices per Floppy Port: %u\n"), ulValue); 811 814 #if 0 812 815 systemProperties->GetFreeDiskSpaceWarning(&i64Value); 813 RTPrintf( "Free disk space warning at: %u Bytes\n", i64Value);816 RTPrintf(List::tr("Free disk space warning at: %u Bytes\n"), i64Value); 814 817 systemProperties->GetFreeDiskSpacePercentWarning(&ulValue); 815 RTPrintf( "Free disk space warning at: %u %%\n", ulValue);818 RTPrintf(List::tr("Free disk space warning at: %u %%\n"), ulValue); 816 819 systemProperties->GetFreeDiskSpaceError(&i64Value); 817 RTPrintf( "Free disk space error at: %u Bytes\n", i64Value);820 RTPrintf(List::tr("Free disk space error at: %u Bytes\n"), i64Value); 818 821 systemProperties->GetFreeDiskSpacePercentError(&ulValue); 819 RTPrintf( "Free disk space error at: %u %%\n", ulValue);822 RTPrintf(List::tr("Free disk space error at: %u %%\n"), ulValue); 820 823 #endif 821 824 systemProperties->COMGETTER(DefaultMachineFolder)(str.asOutParam()); 822 RTPrintf( "Default machine folder: %ls\n", str.raw());825 RTPrintf(List::tr("Default machine folder: %ls\n"), str.raw()); 823 826 systemProperties->COMGETTER(RawModeSupported)(&fValue); 824 RTPrintf( "Raw-mode Supported: %s\n", fValue ? "yes" : "no");827 RTPrintf(List::tr("Raw-mode Supported: %s\n"), fValue ? List::tr("yes") : List::tr("no")); 825 828 systemProperties->COMGETTER(ExclusiveHwVirt)(&fValue); 826 RTPrintf( "Exclusive HW virtualization use: %s\n", fValue ? "on" : "off");829 RTPrintf(List::tr("Exclusive HW virtualization use: %s\n"), fValue ? List::tr("on") : List::tr("off")); 827 830 systemProperties->COMGETTER(DefaultHardDiskFormat)(str.asOutParam()); 828 RTPrintf( "Default hard disk format: %ls\n", str.raw());831 RTPrintf(List::tr("Default hard disk format: %ls\n"), str.raw()); 829 832 systemProperties->COMGETTER(VRDEAuthLibrary)(str.asOutParam()); 830 RTPrintf( "VRDE auth library: %ls\n", str.raw());833 RTPrintf(List::tr("VRDE auth library: %ls\n"), str.raw()); 831 834 systemProperties->COMGETTER(WebServiceAuthLibrary)(str.asOutParam()); 832 RTPrintf( "Webservice auth. library: %ls\n", str.raw());835 RTPrintf(List::tr("Webservice auth. library: %ls\n"), str.raw()); 833 836 systemProperties->COMGETTER(DefaultVRDEExtPack)(str.asOutParam()); 834 RTPrintf( "Remote desktop ExtPack: %ls\n", str.raw());837 RTPrintf(List::tr("Remote desktop ExtPack: %ls\n"), str.raw()); 835 838 systemProperties->COMGETTER(LogHistoryCount)(&ulValue); 836 RTPrintf( "Log history count: %u\n", ulValue);839 RTPrintf(List::tr("Log history count: %u\n"), ulValue); 837 840 systemProperties->COMGETTER(DefaultFrontend)(str.asOutParam()); 838 RTPrintf( "Default frontend: %ls\n", str.raw());841 RTPrintf(List::tr("Default frontend: %ls\n"), str.raw()); 839 842 AudioDriverType_T enmAudio; 840 843 systemProperties->COMGETTER(DefaultAudioDriver)(&enmAudio); 841 844 switch (enmAudio) 842 845 { 843 case AudioDriverType_Null: psz = "Null";break;846 case AudioDriverType_Null: psz = List::tr("Null"); break; 844 847 case AudioDriverType_WinMM: psz = "WinMM"; break; 845 848 case AudioDriverType_OSS: psz = "OSS"; break; … … 850 853 case AudioDriverType_Pulse: psz = "Pulse"; break; 851 854 case AudioDriverType_SolAudio: psz = "SolAudio"; break; 852 default: psz = "Unknown";853 } 854 RTPrintf( "Default audio driver: %s\n", psz);855 default: psz = List::tr("Unknown"); 856 } 857 RTPrintf(List::tr("Default audio driver: %s\n"), psz); 855 858 systemProperties->COMGETTER(AutostartDatabasePath)(str.asOutParam()); 856 RTPrintf( "Autostart database path: %ls\n", str.raw());859 RTPrintf(List::tr("Autostart database path: %ls\n"), str.raw()); 857 860 systemProperties->COMGETTER(DefaultAdditionsISO)(str.asOutParam()); 858 RTPrintf( "Default Guest Additions ISO: %ls\n", str.raw());861 RTPrintf(List::tr("Default Guest Additions ISO: %ls\n"), str.raw()); 859 862 systemProperties->COMGETTER(LoggingLevel)(str.asOutParam()); 860 RTPrintf( "Logging Level: %ls\n", str.raw());863 RTPrintf(List::tr("Logging Level: %ls\n"), str.raw()); 861 864 ProxyMode_T enmProxyMode = (ProxyMode_T)42; 862 865 systemProperties->COMGETTER(ProxyMode)(&enmProxyMode); 863 psz = "Unknown";866 psz = List::tr("Unknown"); 864 867 switch (enmProxyMode) 865 868 { 866 case ProxyMode_System: psz = "System"; break;867 case ProxyMode_NoProxy: psz = "NoProxy"; break;868 case ProxyMode_Manual: psz = "Manual"; break;869 case ProxyMode_System: psz = List::tr("System"); break; 870 case ProxyMode_NoProxy: psz = List::tr("NoProxy"); break; 871 case ProxyMode_Manual: psz = List::tr("Manual"); break; 869 872 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 870 873 case ProxyMode_32BitHack: break; /* Shut up compiler warnings. */ 871 874 #endif 872 875 } 873 RTPrintf( "Proxy Mode: %s\n", psz);876 RTPrintf(List::tr("Proxy Mode: %s\n"), psz); 874 877 systemProperties->COMGETTER(ProxyURL)(str.asOutParam()); 875 RTPrintf( "Proxy URL: %ls\n", str.raw());878 RTPrintf(List::tr("Proxy URL: %ls\n"), str.raw()); 876 879 systemProperties->COMGETTER(VBoxUpdateEnabled)(&fValue); 877 RTPrintf( "Update check enabled: %s\n", fValue ? "yes" : "no");880 RTPrintf(List::tr("Update check enabled: %s\n"), fValue ? List::tr("yes") : List::tr("no")); 878 881 systemProperties->COMGETTER(VBoxUpdateCount)(&ulValue); 879 RTPrintf( "Update check count: %u\n", ulValue);882 RTPrintf(List::tr("Update check count: %u\n"), ulValue); 880 883 systemProperties->COMGETTER(VBoxUpdateFrequency)(&ulValue); 881 884 if (ulValue == 0) 882 RTPrintf( "Update check frequency: never\n");885 RTPrintf(List::tr("Update check frequency: never\n")); 883 886 else if (ulValue == 1) 884 RTPrintf( "Update check frequency: every day\n");887 RTPrintf(List::tr("Update check frequency: every day\n")); 885 888 else 886 RTPrintf( "Update check frequency: every %u days\n", ulValue);889 RTPrintf(List::tr("Update check frequency: every %u days\n"), ulValue); 887 890 VBoxUpdateTarget_T enmVBoxUpdateTarget; 888 891 systemProperties->COMGETTER(VBoxUpdateTarget)(&enmVBoxUpdateTarget); … … 890 893 { 891 894 case VBoxUpdateTarget_Stable: 892 psz = "Stable: new minor and maintenance releases";895 psz = List::tr("Stable: new minor and maintenance releases"); 893 896 break; 894 897 case VBoxUpdateTarget_AllReleases: 895 psz = "All releases: new minor, maintenance, and major releases";898 psz = List::tr("All releases: new minor, maintenance, and major releases"); 896 899 break; 897 900 case VBoxUpdateTarget_WithBetas: 898 psz = "With Betas: new minor, maintenance, major, and beta releases";901 psz = List::tr("With Betas: new minor, maintenance, major, and beta releases"); 899 902 break; 900 903 default: 901 psz = "Unset";902 break; 903 } 904 RTPrintf( "Update check target: %s\n", psz);904 psz = List::tr("Unset"); 905 break; 906 } 907 RTPrintf(List::tr("Update check target: %s\n"), psz); 905 908 systemProperties->COMGETTER(VBoxUpdateLastCheckDate)(str.asOutParam()); 906 RTPrintf( "Last check date: %ls\n", str.raw());909 RTPrintf(List::tr("Last check date: %ls\n"), str.raw()); 907 910 #ifdef VBOX_WITH_MAIN_NLS 908 911 systemProperties->COMGETTER(LanguageId)(str.asOutParam()); 909 RTPrintf( "User language: %ls\n", str.raw());912 RTPrintf(List::tr("User language: %ls\n"), str.raw()); 910 913 #endif 911 914 return S_OK; … … 923 926 CHECK_ERROR2I_STMT(ptrConfig, COMGETTER(MinLeaseTime)(&secs), hrcRet = hrcCheck); 924 927 if (secs == 0) 925 RTPrintf( " minLeaseTime: default\n");928 RTPrintf(List::tr(" minLeaseTime: default\n")); 926 929 else 927 RTPrintf( " minLeaseTime: %u sec\n", secs);930 RTPrintf(List::tr(" minLeaseTime: %u sec\n"), secs); 928 931 929 932 secs = 0; 930 933 CHECK_ERROR2I_STMT(ptrConfig, COMGETTER(DefaultLeaseTime)(&secs), hrcRet = hrcCheck); 931 934 if (secs == 0) 932 RTPrintf( " defaultLeaseTime: default\n");935 RTPrintf(List::tr(" defaultLeaseTime: default\n")); 933 936 else 934 RTPrintf( " defaultLeaseTime: %u sec\n", secs);937 RTPrintf(List::tr(" defaultLeaseTime: %u sec\n"), secs); 935 938 936 939 secs = 0; 937 940 CHECK_ERROR2I_STMT(ptrConfig, COMGETTER(MaxLeaseTime)(&secs), hrcRet = hrcCheck); 938 941 if (secs == 0) 939 RTPrintf( " maxLeaseTime: default\n");942 RTPrintf(List::tr(" maxLeaseTime: default\n")); 940 943 else 941 RTPrintf( " maxLeaseTime: %u sec\n", secs);944 RTPrintf(List::tr(" maxLeaseTime: %u sec\n"), secs); 942 945 943 946 com::SafeArray<DHCPOption_T> Options; … … 945 948 CHECK_ERROR2_STMT(hrc, ptrConfig, COMGETTER(ForcedOptions(ComSafeArrayAsOutParam(Options))), hrcRet = hrc); 946 949 if (FAILED(hrc)) 947 RTPrintf( " Forced options: %Rhrc\n", hrc);950 RTPrintf(List::tr(" Forced options: %Rhrc\n"), hrc); 948 951 else if (Options.size() == 0) 949 RTPrintf( " Forced options: None\n");952 RTPrintf(List::tr(" Forced options: None\n")); 950 953 else 951 954 { 952 RTPrintf( " Forced options: ");955 RTPrintf(List::tr(" Forced options: ")); 953 956 for (size_t i = 0; i < Options.size(); i++) 954 957 RTPrintf(i ? ", %u" : "%u", Options[i]); … … 958 961 CHECK_ERROR2_STMT(hrc, ptrConfig, COMGETTER(SuppressedOptions(ComSafeArrayAsOutParam(Options))), hrcRet = hrc); 959 962 if (FAILED(hrc)) 960 RTPrintf( " Suppressed opt.s: %Rhrc\n", hrc);963 RTPrintf(List::tr(" Suppressed opt.s: %Rhrc\n"), hrc); 961 964 else if (Options.size() == 0) 962 RTPrintf( " Suppressed opts.: None\n");965 RTPrintf(List::tr(" Suppressed opts.: None\n")); 963 966 else 964 967 { 965 RTPrintf( " Suppressed opts.: ");968 RTPrintf(List::tr(" Suppressed opts.: ")); 966 969 for (size_t i = 0; i < Options.size(); i++) 967 970 RTPrintf(i ? ", %u" : "%u", Options[i]); … … 975 978 ComSafeArrayAsOutParam(Values)), hrcRet = hrc); 976 979 if (FAILED(hrc)) 977 RTPrintf( " DHCP options: %Rhrc\n", hrc);980 RTPrintf(List::tr(" DHCP options: %Rhrc\n"), hrc); 978 981 else if (Options.size() != Encodings.size() || Options.size() != Values.size()) 979 982 { 980 RTPrintf(" DHCP options: Return count mismatch: %zu, %zu, %zu\n", Options.size(), Encodings.size(), Values.size()); 983 RTPrintf(List::tr(" DHCP options: Return count mismatch: %zu, %zu, %zu\n"), 984 Options.size(), Encodings.size(), Values.size()); 981 985 hrcRet = E_FAIL; 982 986 } 983 987 else if (Options.size() == 0) 984 RTPrintf( " DHCP options: None\n");988 RTPrintf(List::tr(" DHCP options: None\n")); 985 989 else 986 990 for (size_t i = 0; i < Options.size(); i++) … … 989 993 { 990 994 case DHCPOptionEncoding_Normal: 991 RTPrintf( " %3d/legacy: %ls\n", Options[i], Values[i]);995 RTPrintf(List::tr(" %3d/legacy: %ls\n"), Options[i], Values[i]); 992 996 break; 993 997 case DHCPOptionEncoding_Hex: 994 RTPrintf( " %3d/hex: %ls\n", Options[i], Values[i]);998 RTPrintf(List::tr(" %3d/hex: %ls\n"), Options[i], Values[i]); 995 999 break; 996 1000 default: 997 RTPrintf( " %3d/%u?: %ls\n", Options[i], Encodings[i], Values[i]);1001 RTPrintf(List::tr(" %3d/%u?: %ls\n"), Options[i], Encodings[i], Values[i]); 998 1002 break; 999 1003 } … … 1023 1027 Bstr bstr; 1024 1028 CHECK_ERROR2I_STMT(ptrDHCPServer, COMGETTER(NetworkName)(bstr.asOutParam()), hrcRet = hrcCheck); 1025 RTPrintf( "NetworkName: %ls\n", bstr.raw());1029 RTPrintf(List::tr("NetworkName: %ls\n"), bstr.raw()); 1026 1030 1027 1031 CHECK_ERROR2I_STMT(ptrDHCPServer, COMGETTER(IPAddress)(bstr.asOutParam()), hrcRet = hrcCheck); 1028 RTPrintf( "Dhcpd IP: %ls\n", bstr.raw());1032 RTPrintf(List::tr("Dhcpd IP: %ls\n"), bstr.raw()); 1029 1033 1030 1034 CHECK_ERROR2I_STMT(ptrDHCPServer, COMGETTER(LowerIP)(bstr.asOutParam()), hrcRet = hrcCheck); 1031 RTPrintf( "LowerIPAddress: %ls\n", bstr.raw());1035 RTPrintf(List::tr("LowerIPAddress: %ls\n"), bstr.raw()); 1032 1036 1033 1037 CHECK_ERROR2I_STMT(ptrDHCPServer, COMGETTER(UpperIP)(bstr.asOutParam()), hrcRet = hrcCheck); 1034 RTPrintf( "UpperIPAddress: %ls\n", bstr.raw());1038 RTPrintf(List::tr("UpperIPAddress: %ls\n"), bstr.raw()); 1035 1039 1036 1040 CHECK_ERROR2I_STMT(ptrDHCPServer, COMGETTER(NetworkMask)(bstr.asOutParam()), hrcRet = hrcCheck); 1037 RTPrintf( "NetworkMask: %ls\n", bstr.raw());1041 RTPrintf(List::tr("NetworkMask: %ls\n"), bstr.raw()); 1038 1042 1039 1043 BOOL fEnabled = FALSE; 1040 1044 CHECK_ERROR2I_STMT(ptrDHCPServer, COMGETTER(Enabled)(&fEnabled), hrcRet = hrcCheck); 1041 RTPrintf( "Enabled: %s\n", fEnabled ? "Yes" : "No");1045 RTPrintf(List::tr("Enabled: %s\n"), fEnabled ? List::tr("Yes") : List::tr("No")); 1042 1046 1043 1047 /* Global configuration: */ 1044 RTPrintf( "Global Configuration:\n");1048 RTPrintf(List::tr("Global Configuration:\n")); 1045 1049 HRESULT hrc; 1046 1050 ComPtr<IDHCPGlobalConfig> ptrGlobal; … … 1057 1061 CHECK_ERROR2_STMT(hrc, ptrDHCPServer, COMGETTER(GroupConfigs)(ComSafeArrayAsOutParam(Groups)), hrcRet = hrc); 1058 1062 if (FAILED(hrc)) 1059 RTPrintf( "Groups: %Rrc\n", hrc);1063 RTPrintf(List::tr("Groups: %Rrc\n"), hrc); 1060 1064 else if (Groups.size() == 0) 1061 RTPrintf( "Groups: None\n");1065 RTPrintf(List::tr("Groups: None\n")); 1062 1066 else 1063 1067 { … … 1065 1069 { 1066 1070 CHECK_ERROR2I_STMT(Groups[iGrp], COMGETTER(Name)(bstr.asOutParam()), hrcRet = hrcCheck); 1067 RTPrintf( "Group: %ls\n", bstr.raw());1071 RTPrintf(List::tr("Group: %ls\n"), bstr.raw()); 1068 1072 1069 1073 com::SafeIfaceArray<IDHCPGroupCondition> Conditions; 1070 1074 CHECK_ERROR2_STMT(hrc, Groups[iGrp], COMGETTER(Conditions)(ComSafeArrayAsOutParam(Conditions)), hrcRet = hrc); 1071 1075 if (FAILED(hrc)) 1072 RTPrintf( " Conditions: %Rhrc\n", hrc);1076 RTPrintf(List::tr(" Conditions: %Rhrc\n"), hrc); 1073 1077 else if (Conditions.size() == 0) 1074 RTPrintf( " Conditions: None\n");1078 RTPrintf(List::tr(" Conditions: None\n")); 1075 1079 else 1076 1080 for (size_t iCond = 0; iCond < Conditions.size(); iCond++) … … 1082 1086 CHECK_ERROR2_STMT(hrc, Conditions[iCond], COMGETTER(Value)(bstr.asOutParam()), hrcRet = hrc); 1083 1087 1084 RTPrintf( " Conditions: %s %s %ls\n",1085 fInclusive ? "include" : "exclude",1088 RTPrintf(List::tr(" Conditions: %s %s %ls\n"), 1089 fInclusive ? List::tr("include") : List::tr("exclude"), 1086 1090 enmType == DHCPGroupConditionType_MAC ? "MAC " 1087 1091 : enmType == DHCPGroupConditionType_MACWildcard ? "MAC* " … … 1105 1109 CHECK_ERROR2_STMT(hrc, ptrDHCPServer, COMGETTER(IndividualConfigs)(ComSafeArrayAsOutParam(Hosts)), hrcRet = hrc); 1106 1110 if (FAILED(hrc)) 1107 RTPrintf( "Individual Configs: %Rrc\n", hrc);1111 RTPrintf(List::tr("Individual Configs: %Rrc\n"), hrc); 1108 1112 else if (Hosts.size() == 0) 1109 RTPrintf( "Individual Configs: None\n");1113 RTPrintf(List::tr("Individual Configs: None\n")); 1110 1114 else 1111 1115 { … … 1118 1122 { 1119 1123 CHECK_ERROR2I_STMT(Hosts[iHost], COMGETTER(MACAddress)(bstr.asOutParam()), hrcRet = hrcCheck); 1120 RTPrintf( "Individual Config: MAC %ls\n", bstr.raw());1124 RTPrintf(List::tr("Individual Config: MAC %ls\n"), bstr.raw()); 1121 1125 } 1122 1126 else … … 1128 1132 hrc = Hosts[iHost]->COMGETTER(MACAddress)(bstrMACAddress.asOutParam()); /* No CHECK_ERROR2 stuff! */ 1129 1133 if (SUCCEEDED(hrc)) 1130 RTPrintf("Individual Config: VM NIC: %ls slot %u, MAC %ls\n", bstr.raw(), uSlot, bstrMACAddress.raw()); 1134 RTPrintf(List::tr("Individual Config: VM NIC: %ls slot %u, MAC %ls\n"), bstr.raw(), uSlot, 1135 bstrMACAddress.raw()); 1131 1136 else 1132 RTPrintf( "Individual Config: VM NIC: %ls slot %u, MAC %Rhrc\n", bstr.raw(), uSlot, hrc);1137 RTPrintf(List::tr("Individual Config: VM NIC: %ls slot %u, MAC %Rhrc\n"), bstr.raw(), uSlot, hrc); 1133 1138 } 1134 1139 1135 1140 CHECK_ERROR2I_STMT(Hosts[iHost], COMGETTER(FixedAddress)(bstr.asOutParam()), hrcRet = hrcCheck); 1136 1141 if (bstr.isNotEmpty()) 1137 RTPrintf( " Fixed Address: %ls\n", bstr.raw());1142 RTPrintf(List::tr(" Fixed Address: %ls\n"), bstr.raw()); 1138 1143 else 1139 RTPrintf( " Fixed Address: dynamic\n");1144 RTPrintf(List::tr(" Fixed Address: dynamic\n")); 1140 1145 1141 1146 hrc = showDhcpConfig(Hosts[iHost]); … … 1163 1168 SafeIfaceArray<IExtPack> extPacks; 1164 1169 CHECK_ERROR2I_RET(ptrExtPackMgr, COMGETTER(InstalledExtPacks)(ComSafeArrayAsOutParam(extPacks)), hrcCheck); 1165 RTPrintf( "Extension Packs: %u\n", extPacks.size());1170 RTPrintf(List::tr("Extension Packs: %u\n"), extPacks.size()); 1166 1171 1167 1172 HRESULT hrc = S_OK; … … 1189 1194 if (i) 1190 1195 RTPrintf("\n"); 1191 RTPrintf("Pack no.%2zu: %ls\n" 1192 "Version: %ls\n" 1193 "Revision: %u\n" 1194 "Edition: %ls\n" 1195 "Description: %ls\n" 1196 "VRDE Module: %ls\n" 1197 "Usable: %RTbool\n" 1198 "Why unusable: %ls\n", 1196 RTPrintf(List::tr( 1197 "Pack no.%2zu: %ls\n" 1198 "Version: %ls\n" 1199 "Revision: %u\n" 1200 "Edition: %ls\n" 1201 "Description: %ls\n" 1202 "VRDE Module: %ls\n" 1203 "Usable: %RTbool\n" 1204 "Why unusable: %ls\n"), 1199 1205 i, bstrName.raw(), 1200 1206 bstrVersion.raw(), … … 1244 1250 com::SafeIfaceArray<IHostVideoInputDevice> hostVideoInputDevices; 1245 1251 CHECK_ERROR(host, COMGETTER(VideoInputDevices)(ComSafeArrayAsOutParam(hostVideoInputDevices))); 1246 RTPrintf( "Video Input Devices: %u\n", hostVideoInputDevices.size());1252 RTPrintf(List::tr("Video Input Devices: %u\n"), hostVideoInputDevices.size()); 1247 1253 for (size_t i = 0; i < hostVideoInputDevices.size(); ++i) 1248 1254 { … … 1273 1279 CHECK_ERROR(systemProperties, COMGETTER(ScreenShotFormats)(ComSafeArrayAsOutParam(formats))); 1274 1280 1275 RTPrintf( "Supported %d screen shot formats:\n", formats.size());1281 RTPrintf(List::tr("Supported %d screen shot formats:\n"), formats.size()); 1276 1282 for (size_t i = 0; i < formats.size(); ++i) 1277 1283 { … … 1302 1308 CHECK_ERROR(pCloudProviderManager, COMGETTER(Providers)(ComSafeArrayAsOutParam(apCloudProviders))); 1303 1309 1304 RTPrintf( "Supported %d cloud providers:\n", apCloudProviders.size());1310 RTPrintf(List::tr("Supported %d cloud providers:\n"), apCloudProviders.size()); 1305 1311 for (size_t i = 0; i < apCloudProviders.size(); ++i) 1306 1312 { … … 1308 1314 Bstr bstrProviderName; 1309 1315 pCloudProvider->COMGETTER(Name)(bstrProviderName.asOutParam()); 1310 RTPrintf( "Name: %ls\n", bstrProviderName.raw());1316 RTPrintf(List::tr("Name: %ls\n"), bstrProviderName.raw()); 1311 1317 pCloudProvider->COMGETTER(ShortName)(bstrProviderName.asOutParam()); 1312 RTPrintf( "Short Name: %ls\n", bstrProviderName.raw());1318 RTPrintf(List::tr("Short Name: %ls\n"), bstrProviderName.raw()); 1313 1319 Bstr bstrProviderID; 1314 1320 pCloudProvider->COMGETTER(Id)(bstrProviderID.asOutParam()); … … 1346 1352 Bstr bstrProfileName; 1347 1353 pCloudProfile->COMGETTER(Name)(bstrProfileName.asOutParam()); 1348 RTPrintf( "Name: %ls\n", bstrProfileName.raw());1354 RTPrintf(List::tr("Name: %ls\n"), bstrProfileName.raw()); 1349 1355 Bstr bstrProviderID; 1350 1356 pCloudProfile->COMGETTER(ProviderId)(bstrProviderID.asOutParam()); 1351 RTPrintf( "Provider GUID: %ls\n", bstrProviderID.raw());1357 RTPrintf(List::tr("Provider GUID: %ls\n"), bstrProviderID.raw()); 1352 1358 1353 1359 if (fOptLong) … … 1365 1371 value = values[k]; 1366 1372 RTPrintf("%s%ls=%ls\n", 1367 fFirst ? "Property: ": " ",1373 fFirst ? List::tr("Property: ") : " ", 1368 1374 names[k], value.raw()); 1369 1375 fFirst = false; … … 1403 1409 else 1404 1410 { 1405 RTPrintf( "CPU Profile #%02zu:\n", idx);1406 RTPrintf( " Architecture: %s\n", pszArchitecture);1407 RTPrintf( " Name: %ls\n", bstrName.raw());1411 RTPrintf(List::tr("CPU Profile #%02zu:\n"), idx); 1412 RTPrintf(List::tr(" Architecture: %s\n"), pszArchitecture); 1413 RTPrintf(List::tr(" Name: %ls\n"), bstrName.raw()); 1408 1414 CHECK_ERROR2I_RET(pProfile, COMGETTER(FullName)(bstrName.asOutParam()), hrcCheck); 1409 RTPrintf( " Full Name: %ls\n", bstrName.raw());1415 RTPrintf(List::tr(" Full Name: %ls\n"), bstrName.raw()); 1410 1416 } 1411 1417 return hrc; … … 1657 1663 CHECK_ERROR(pHostDrive,COMGETTER(DrivePath)(bstrDrivePath.asOutParam())); 1658 1664 if (SUCCEEDED(rc)) 1659 RTPrintf( "%sDrive: %ls\n", i > 0 ? "\n" : "", bstrDrivePath.raw());1665 RTPrintf(List::tr("%sDrive: %ls\n"), i > 0 ? "\n" : "", bstrDrivePath.raw()); 1660 1666 else 1661 RTPrintf( "%sDrive: %Rhrc\n", i > 0 ? "\n" : "", rc);1667 RTPrintf(List::tr("%sDrive: %Rhrc\n"), i > 0 ? "\n" : "", rc); 1662 1668 1663 1669 com::Bstr bstrModel; 1664 1670 CHECK_ERROR(pHostDrive,COMGETTER(Model)(bstrModel.asOutParam())); 1665 1671 if (FAILED(rc)) 1666 RTPrintf( "Model: %Rhrc\n", rc);1672 RTPrintf(List::tr("Model: %Rhrc\n"), rc); 1667 1673 else if (bstrModel.isNotEmpty()) 1668 RTPrintf( "Model: \"%ls\"\n", bstrModel.raw());1674 RTPrintf(List::tr("Model: \"%ls\"\n"), bstrModel.raw()); 1669 1675 else 1670 RTPrintf( "Model: unknown/inaccessible\n");1676 RTPrintf(List::tr("Model: unknown/inaccessible\n")); 1671 1677 1672 1678 /* The other attributes are not accessible in limited mode and will fail … … 1678 1684 else if (rc == E_ACCESSDENIED) 1679 1685 { 1680 RTPrintf( "Further disk and partitioning information is not available for drive \"%ls\". (E_ACCESSDENIED)\n",1686 RTPrintf(List::tr("Further disk and partitioning information is not available for drive \"%ls\". (E_ACCESSDENIED)\n"), 1681 1687 bstrDrivePath.raw()); 1682 1688 continue; … … 1691 1697 rc = pHostDrive->COMGETTER(Size)(&cbSize); 1692 1698 if (SUCCEEDED(rc) && fOptLong) 1693 RTPrintf( "Size: %llu bytes (%Rhcb)\n", cbSize, cbSize);1699 RTPrintf(List::tr("Size: %llu bytes (%Rhcb)\n"), cbSize, cbSize); 1694 1700 else if (SUCCEEDED(rc)) 1695 RTPrintf( "Size: %Rhcb\n", cbSize);1701 RTPrintf(List::tr("Size: %Rhcb\n"), cbSize); 1696 1702 else 1697 1703 { 1698 RTPrintf( "Size: %Rhrc\n", rc);1704 RTPrintf(List::tr("Size: %Rhrc\n"), rc); 1699 1705 com::GlueHandleComErrorNoCtx(pHostDrive, rc); 1700 1706 } … … 1703 1709 rc = pHostDrive->COMGETTER(SectorSize)(&cbSectorSize); 1704 1710 if (SUCCEEDED(rc)) 1705 RTPrintf( "Sector Size: %u bytes\n", cbSectorSize);1711 RTPrintf(List::tr("Sector Size: %u bytes\n"), cbSectorSize); 1706 1712 else 1707 1713 { 1708 RTPrintf( "Sector Size: %Rhrc\n", rc);1714 RTPrintf(List::tr("Sector Size: %Rhrc\n"), rc); 1709 1715 com::GlueHandleComErrorNoCtx(pHostDrive, rc); 1710 1716 } … … 1713 1719 rc = pHostDrive->COMGETTER(PartitioningType)(&partitioningType); 1714 1720 if (SUCCEEDED(rc)) 1715 RTPrintf( "Scheme: %s\n", partitioningType == PartitioningType_MBR ? "MBR" : "GPT");1721 RTPrintf(List::tr("Scheme: %s\n"), partitioningType == PartitioningType_MBR ? "MBR" : "GPT"); 1716 1722 else 1717 1723 { 1718 RTPrintf( "Scheme: %Rhrc\n", rc);1724 RTPrintf(List::tr("Scheme: %Rhrc\n"), rc); 1719 1725 com::GlueHandleComErrorNoCtx(pHostDrive, rc); 1720 1726 } … … 1724 1730 if (FAILED(rc)) 1725 1731 { 1726 RTPrintf( "Partitions: %Rhrc\n", rc);1732 RTPrintf(List::tr("Partitions: %Rhrc\n"), rc); 1727 1733 com::GlueHandleComErrorNoCtx(pHostDrive, rc); 1728 1734 } 1729 1735 else if (apHostDrivesPartitions.size() == 0) 1730 RTPrintf( "Partitions: None (or not able to grok them).\n");1736 RTPrintf(List::tr("Partitions: None (or not able to grok them).\n")); 1731 1737 else if (partitioningType == PartitioningType_MBR) 1732 1738 { 1733 1739 if (fOptLong) 1734 RTPrintf( "Partitions: First Last\n"1735 "## Type Byte Size Byte Offset Cyl/Head/Sec Cyl/Head/Sec Active\n");1740 RTPrintf(List::tr("Partitions: First Last\n" 1741 "## Type Byte Size Byte Offset Cyl/Head/Sec Cyl/Head/Sec Active\n")); 1736 1742 else 1737 RTPrintf( "Partitions: First Last\n"1738 "## Type Size Start Cyl/Head/Sec Cyl/Head/Sec Active\n");1743 RTPrintf(List::tr("Partitions: First Last\n" 1744 "## Type Size Start Cyl/Head/Sec Cyl/Head/Sec Active\n")); 1739 1745 for (size_t j = 0; j < apHostDrivesPartitions.size(); ++j) 1740 1746 { … … 1771 1777 idx, uType, cbSize, offStart, 1772 1778 uStartCylinder, uStartHead, uStartSector, uEndCylinder, uEndHead, uEndSector, 1773 fActive ? "yes" : "no", PartitionTypeToString(enmType, ""));1779 fActive ? List::tr("yes") : List::tr("no"), PartitionTypeToString(enmType, "")); 1774 1780 else 1775 1781 RTPrintf("%2u %02x %8Rhcb %8Rhcb %4u/%3u/%2u %4u/%3u/%2u %s %s\n", 1776 1782 idx, uType, (uint64_t)cbSize, (uint64_t)offStart, 1777 1783 uStartCylinder, uStartHead, uStartSector, uEndCylinder, uEndHead, uEndSector, 1778 fActive ? "yes" : "no", PartitionTypeToString(enmType, ""));1784 fActive ? List::tr("yes") : List::tr("no"), PartitionTypeToString(enmType, "")); 1779 1785 } 1780 1786 } … … 1794 1800 1795 1801 if (fOptLong) 1796 RTPrintf("Partitions:\n" 1797 "## %-*s Uuid Byte Size Byte Offset Active Name\n", 1798 (int)cchMaxType, "Type"); 1802 RTPrintf(List::tr( 1803 "Partitions:\n" 1804 "## %-*s Uuid Byte Size Byte Offset Active Name\n"), 1805 (int)cchMaxType, List::tr("Type")); 1799 1806 else 1800 RTPrintf("Partitions:\n" 1801 "## %-*s Uuid Size Start Active Name\n", 1802 (int)cchMaxType, "Type"); 1807 RTPrintf(List::tr( 1808 "Partitions:\n" 1809 "## %-*s Uuid Size Start Active Name\n"), 1810 (int)cchMaxType, List::tr("Type")); 1803 1811 1804 1812 for (size_t j = 0; j < apHostDrivesPartitions.size(); ++j) … … 1833 1841 if (fOptLong) 1834 1842 RTPrintf("%2u %-*s %36ls %19llu %19llu %-3s %ls\n", idx, cchMaxType, pszTypeNm, 1835 bstrUuidPartition.raw(), cbSize, offStart, fActive ? "on" : "off", bstrName.raw()); 1843 bstrUuidPartition.raw(), cbSize, offStart, fActive ? List::tr("on") : List::tr("off"), 1844 bstrName.raw()); 1836 1845 else 1837 1846 RTPrintf("%2u %-*s %36ls %8Rhcb %8Rhcb %-3s %ls\n", idx, cchMaxType, pszTypeNm, 1838 bstrUuidPartition.raw(), cbSize, offStart, fActive ? "on" : "off", bstrName.raw()); 1847 bstrUuidPartition.raw(), cbSize, offStart, fActive ? List::tr("on") : List::tr("off"), 1848 bstrName.raw()); 1839 1849 } 1840 1850 } … … 2004 2014 Bstr guestDescription; 2005 2015 guestOS->COMGETTER(Description)(guestDescription.asOutParam()); 2006 RTPrintf( "Description: %ls\n", guestDescription.raw());2016 RTPrintf(List::tr("Description: %ls\n"), guestDescription.raw()); 2007 2017 Bstr familyId; 2008 2018 guestOS->COMGETTER(FamilyId)(familyId.asOutParam()); 2009 RTPrintf( "Family ID: %ls\n", familyId.raw());2019 RTPrintf(List::tr("Family ID: %ls\n"), familyId.raw()); 2010 2020 Bstr familyDescription; 2011 2021 guestOS->COMGETTER(FamilyDescription)(familyDescription.asOutParam()); 2012 RTPrintf( "Family Desc: %ls\n", familyDescription.raw());2022 RTPrintf(List::tr("Family Desc: %ls\n"), familyDescription.raw()); 2013 2023 BOOL is64Bit; 2014 2024 guestOS->COMGETTER(Is64Bit)(&is64Bit); 2015 RTPrintf( "64 bit: %RTbool\n", is64Bit);2025 RTPrintf(List::tr("64 bit: %RTbool\n"), is64Bit); 2016 2026 RTPrintf("\n"); 2017 2027 } … … 2036 2046 Bstr location; 2037 2047 dvdDrive->COMGETTER(Location)(location.asOutParam()); 2038 RTPrintf( "Name: %ls\n\n", location.raw());2048 RTPrintf(List::tr("Name: %ls\n\n"), location.raw()); 2039 2049 } 2040 2050 } … … 2058 2068 Bstr location; 2059 2069 floppyDrive->COMGETTER(Location)(location.asOutParam()); 2060 RTPrintf( "Name: %ls\n\n", location.raw());2070 RTPrintf(List::tr("Name: %ls\n\n"), location.raw()); 2061 2071 } 2062 2072 } … … 2095 2105 CHECK_ERROR(pVirtualBox, COMGETTER(Host)(Host.asOutParam())); 2096 2106 2097 RTPrintf( "Host CPUIDs:\n\nLeaf no. EAX EBX ECX EDX\n");2107 RTPrintf(List::tr("Host CPUIDs:\n\nLeaf no. EAX EBX ECX EDX\n")); 2098 2108 ULONG uCpuNo = 0; /* ASSUMES that CPU#0 is online. */ 2099 2109 static uint32_t const s_auCpuIdRanges[] = … … 2127 2137 com::SafeIfaceArray<IMedium> hdds; 2128 2138 CHECK_ERROR(pVirtualBox, COMGETTER(HardDisks)(ComSafeArrayAsOutParam(hdds))); 2129 rc = listMedia(pVirtualBox, hdds, "base", fOptLong);2139 rc = listMedia(pVirtualBox, hdds, List::tr("base"), fOptLong); 2130 2140 break; 2131 2141 } … … 2180 2190 Bstr netName; 2181 2191 net->COMGETTER(NetworkName)(netName.asOutParam()); 2182 RTPrintf( "NetworkName: %ls\n", netName.raw());2192 RTPrintf(List::tr("NetworkName: %ls\n"), netName.raw()); 2183 2193 Bstr gateway; 2184 2194 net->COMGETTER(Gateway)(gateway.asOutParam()); … … 2186 2196 Bstr network; 2187 2197 net->COMGETTER(Network)(network.asOutParam()); 2188 RTPrintf( "Network: %ls\n", network.raw());2198 RTPrintf(List::tr("Network: %ls\n"), network.raw()); 2189 2199 BOOL fEnabled; 2190 2200 net->COMGETTER(IPv6Enabled)(&fEnabled); 2191 RTPrintf( "IPv6 Enabled: %s\n", fEnabled ? "Yes" : "No");2201 RTPrintf(List::tr("IPv6 Enabled: %s\n"), fEnabled ? List::tr("Yes") : List::tr("No")); 2192 2202 Bstr ipv6prefix; 2193 2203 net->COMGETTER(IPv6Prefix)(ipv6prefix.asOutParam()); 2194 RTPrintf( "IPv6 Prefix: %ls\n", ipv6prefix.raw());2204 RTPrintf(List::tr("IPv6 Prefix: %ls\n"), ipv6prefix.raw()); 2195 2205 net->COMGETTER(NeedDhcpServer)(&fEnabled); 2196 RTPrintf( "DHCP Enabled: %s\n", fEnabled ? "Yes" : "No");2206 RTPrintf(List::tr("DHCP Enabled: %s\n"), fEnabled ? List::tr("Yes") : List::tr("No")); 2197 2207 net->COMGETTER(Enabled)(&fEnabled); 2198 RTPrintf( "Enabled: %s\n", fEnabled ? "Yes" : "No");2208 RTPrintf(List::tr("Enabled: %s\n"), fEnabled ? List::tr("Yes") : List::tr("No")); 2199 2209 2200 2210 #define PRINT_STRING_ARRAY(title) \ … … 2210 2220 2211 2221 CHECK_ERROR(nets[i], COMGETTER(PortForwardRules4)(ComSafeArrayAsOutParam(strs))); 2212 PRINT_STRING_ARRAY( "Port-forwarding (ipv4)\n");2222 PRINT_STRING_ARRAY(List::tr("Port-forwarding (ipv4)\n")); 2213 2223 strs.setNull(); 2214 2224 2215 2225 CHECK_ERROR(nets[i], COMGETTER(PortForwardRules6)(ComSafeArrayAsOutParam(strs))); 2216 PRINT_STRING_ARRAY( "Port-forwarding (ipv6)\n");2226 PRINT_STRING_ARRAY(List::tr("Port-forwarding (ipv6)\n")); 2217 2227 strs.setNull(); 2218 2228 2219 2229 CHECK_ERROR(nets[i], COMGETTER(LocalMappings)(ComSafeArrayAsOutParam(strs))); 2220 PRINT_STRING_ARRAY( "loopback mappings (ipv4)\n");2230 PRINT_STRING_ARRAY(List::tr("loopback mappings (ipv4)\n")); 2221 2231 strs.setNull(); 2222 2232 … … 2390 2400 2391 2401 case VINF_GETOPT_NOT_OPTION: 2392 return errorSyntax(USAGE_LIST, "Unknown subcommand \"%s\".", ValueUnion.psz);2402 return errorSyntax(USAGE_LIST, List::tr("Unknown subcommand \"%s\"."), ValueUnion.psz); 2393 2403 2394 2404 default: … … 2401 2411 */ 2402 2412 if (enmOptCommand == kListNotSpecified) 2403 return errorSyntax(USAGE_LIST, "Missing subcommand for \"list\" command.\n");2413 return errorSyntax(USAGE_LIST, List::tr("Missing subcommand for \"list\" command.\n")); 2404 2414 if (!fOptMultiple) 2405 2415 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
r85121 r92372 41 41 using namespace com; 42 42 43 DECLARE_TRANSLATION_CONTEXT(Metrics); 43 44 44 45 // funcs … … 89 90 else 90 91 { 91 errorArgument( "Invalid machine name: '%s'", argv[0]);92 errorArgument(Metrics::tr("Invalid machine name: '%s'"), argv[0]); 92 93 return rc; 93 94 } … … 127 128 ComPtr<IHost> host = aObject; 128 129 if (!host.isNull()) 129 return Bstr( "host");130 return Bstr(Metrics::tr("host")); 130 131 131 132 ComPtr<IMachine> machine = aObject; … … 137 138 return name; 138 139 } 139 return Bstr( "unknown");140 return Bstr(Metrics::tr("unknown")); 140 141 } 141 142 … … 148 149 ComPtr<IUnknown> object; 149 150 Bstr metricName; 150 RTPrintf( "The following metrics were modified:\n\n"151 "Object Metric\n"152 "---------- --------------------\n");151 RTPrintf(Metrics::tr("The following metrics were modified:\n\n" 152 "Object Metric\n" 153 "---------- --------------------\n")); 153 154 for (size_t i = 0; i < metrics.size(); i++) 154 155 { … … 162 163 else 163 164 { 164 RTMsgError( "No metrics match the specified filter!");165 RTMsgError(Metrics::tr("No metrics match the specified filter!")); 165 166 } 166 167 } … … 194 195 ULONG period, count; 195 196 LONG minimum, maximum; 196 RTPrintf( 197 RTPrintf(Metrics::tr( 197 198 "Object Metric Unit Minimum Maximum Period Count Description\n" 198 "--------------- ---------------------------------------- ---- ---------- ---------- ---------- ---------- -----------\n") ;199 "--------------- ---------------------------------------- ---- ---------- ---------- ---------- ---------- -----------\n")); 199 200 for (size_t i = 0; i < metricInfo.size(); i++) 200 201 { … … 235 236 { 236 237 if (argc <= i + 1) 237 return errorArgument( "Missing argument to '%s'", argv[i]);238 return errorArgument(Metrics::tr("Missing argument to '%s'"), argv[i]); 238 239 if ( VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &period) 239 240 || !period) 240 return errorArgument( "Invalid value for 'period' parameter: '%s'", argv[i]);241 return errorArgument(Metrics::tr("Invalid value for 'period' parameter: '%s'"), argv[i]); 241 242 } 242 243 else if ( !strcmp(argv[i], "--samples") … … 244 245 { 245 246 if (argc <= i + 1) 246 return errorArgument( "Missing argument to '%s'", argv[i]);247 return errorArgument(Metrics::tr("Missing argument to '%s'"), argv[i]); 247 248 if ( VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &samples) 248 249 || !samples) 249 return errorArgument( "Invalid value for 'samples' parameter: '%s'", argv[i]);250 return errorArgument(Metrics::tr("Invalid value for 'samples' parameter: '%s'"), argv[i]); 250 251 } 251 252 else if ( !strcmp(argv[i], "--list") … … 312 313 ComSafeArrayAsOutParam(retData)) ); 313 314 314 RTPrintf("Object Metric Values\n" 315 "--------------- ---------------------------------------- --------------------------------------------\n"); 315 RTPrintf(Metrics::tr( 316 "Object Metric Values\n" 317 "--------------- ---------------------------------------- --------------------------------------------\n")); 316 318 for (unsigned i = 0; i < retNames.size(); i++) 317 319 { … … 401 403 { 402 404 if (argc <= i + 1) 403 return errorArgument( "Missing argument to '%s'", argv[i]);405 return errorArgument(Metrics::tr("Missing argument to '%s'"), argv[i]); 404 406 if ( VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &period) 405 407 || !period) 406 return errorArgument( "Invalid value for 'period' parameter: '%s'", argv[i]);408 return errorArgument(Metrics::tr("Invalid value for 'period' parameter: '%s'"), argv[i]); 407 409 } 408 410 else if ( !strcmp(argv[i], "--samples") … … 410 412 { 411 413 if (argc <= i + 1) 412 return errorArgument( "Missing argument to '%s'", argv[i]);414 return errorArgument(Metrics::tr("Missing argument to '%s'"), argv[i]); 413 415 if ( VINF_SUCCESS != RTStrToUInt32Full(argv[++i], 10, &samples) 414 416 || !samples) 415 return errorArgument( "Invalid value for 'samples' parameter: '%s'", argv[i]);417 return errorArgument(Metrics::tr("Invalid value for 'samples' parameter: '%s'"), argv[i]); 416 418 } 417 419 else if ( !strcmp(argv[i], "--list") … … 472 474 if (isDetached) 473 475 { 474 RTMsgWarning( "The background process holding collected metrics will shutdown\n"475 "in few seconds, discarding all collected data and parameters.");476 RTMsgWarning(Metrics::tr("The background process holding collected metrics will shutdown\n" 477 "in few seconds, discarding all collected data and parameters.")); 476 478 return RTEXITCODE_SUCCESS; 477 479 } … … 481 483 #endif /* RT_OS_WINDOWS */ 482 484 483 RTPrintf( "Time stamp Object Metric Value\n");485 RTPrintf(Metrics::tr("Time stamp Object Metric Value\n")); 484 486 485 487 while (g_fKeepGoing) … … 624 626 /* at least one option: subcommand name */ 625 627 if (a->argc < 1) 626 return errorSyntax(USAGE_METRICS, "Subcommand missing");628 return errorSyntax(USAGE_METRICS, Metrics::tr("Subcommand missing")); 627 629 628 630 ComPtr<IPerformanceCollector> performanceCollector; … … 643 645 rcExit = handleMetricsDisable(a->argc, a->argv, a->virtualBox, performanceCollector); 644 646 else 645 return errorSyntax(USAGE_METRICS, "Invalid subcommand '%s'", a->argv[0]);647 return errorSyntax(USAGE_METRICS, Metrics::tr("Invalid subcommand '%s'"), a->argv[0]); 646 648 647 649 return rcExit; … … 649 651 650 652 #endif /* !VBOX_ONLY_DOCS */ 651 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r92143 r92372 59 59 using namespace com; 60 60 61 61 DECLARE_TRANSLATION_CONTEXT(Misc); 62 62 63 63 RTEXITCODE handleRegisterVM(HandlerArg *a) … … 66 66 67 67 if (a->argc != 1) 68 return errorSyntax(USAGE_REGISTERVM, "Incorrect number of parameters");68 return errorSyntax(USAGE_REGISTERVM, Misc::tr("Incorrect number of parameters")); 69 69 70 70 ComPtr<IMachine> machine; … … 79 79 int vrc = RTPathAbs(a->argv[0], szVMFileAbs, sizeof(szVMFileAbs)); 80 80 if (RT_FAILURE(vrc)) 81 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot convert filename \"%s\" to absolute path: %Rrc", a->argv[0], vrc); 81 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("Cannot convert filename \"%s\" to absolute path: %Rrc"), 82 a->argv[0], vrc); 82 83 CHECK_ERROR(a->virtualBox, OpenMachine(Bstr(szVMFileAbs).raw(), 83 84 machine.asOutParam())); … … 124 125 VMName = ValueUnion.psz; 125 126 else 126 return errorSyntax(USAGE_UNREGISTERVM, "Invalid parameter '%s'", ValueUnion.psz);127 return errorSyntax(USAGE_UNREGISTERVM, Misc::tr("Invalid parameter '%s'"), ValueUnion.psz); 127 128 break; 128 129 … … 131 132 { 132 133 if (RT_C_IS_PRINT(c)) 133 return errorSyntax(USAGE_UNREGISTERVM, "Invalid option -%c", c);134 return errorSyntax(USAGE_UNREGISTERVM, "Invalid option case %i", c);134 return errorSyntax(USAGE_UNREGISTERVM, Misc::tr("Invalid option -%c"), c); 135 return errorSyntax(USAGE_UNREGISTERVM, Misc::tr("Invalid option case %i"), c); 135 136 } 136 137 if (c == VERR_GETOPT_UNKNOWN_OPTION) 137 return errorSyntax(USAGE_UNREGISTERVM, "unknown option: %s\n", ValueUnion.psz);138 return errorSyntax(USAGE_UNREGISTERVM, Misc::tr("unknown option: %s\n"), ValueUnion.psz); 138 139 if (ValueUnion.pDef) 139 140 return errorSyntax(USAGE_UNREGISTERVM, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 140 return errorSyntax(USAGE_UNREGISTERVM, "error: %Rrs", c);141 return errorSyntax(USAGE_UNREGISTERVM, Misc::tr("error: %Rrs"), c); 141 142 } 142 143 } … … 144 145 /* check for required options */ 145 146 if (!VMName) 146 return errorSyntax(USAGE_UNREGISTERVM, "VM name required");147 return errorSyntax(USAGE_UNREGISTERVM, Misc::tr("VM name required")); 147 148 148 149 ComPtr<IMachine> machine; … … 161 162 162 163 rc = showProgress(pProgress); 163 CHECK_PROGRESS_ERROR_RET(pProgress, ( "Machine delete failed"), RTEXITCODE_FAILURE);164 CHECK_PROGRESS_ERROR_RET(pProgress, (Misc::tr("Machine delete failed")), RTEXITCODE_FAILURE); 164 165 } 165 166 else … … 255 256 /* check for required options */ 256 257 if (bstrName.isEmpty()) 257 return errorSyntax(USAGE_CREATEVM, "Parameter --name is required");258 return errorSyntax(USAGE_CREATEVM, Misc::tr("Parameter --name is required")); 258 259 259 260 do … … 297 298 Bstr settingsFile; 298 299 CHECK_ERROR_BREAK(machine, COMGETTER(SettingsFilePath)(settingsFile.asOutParam())); 299 RTPrintf( "Virtual machine '%ls' is created%s.\n"300 "UUID: %s\n"301 "Settings file: '%ls'\n",302 bstrName.raw(), fRegister ? " and registered": "",300 RTPrintf(Misc::tr("Virtual machine '%ls' is created%s.\n" 301 "UUID: %s\n" 302 "Settings file: '%ls'\n"), 303 bstrName.raw(), fRegister ? Misc::tr(" and registered") : "", 303 304 Utf8Str(uuid).c_str(), settingsFile.raw()); 304 305 } … … 342 343 vrc = RTPathAbs(ValueUnion.psz, szTargetFolder, sizeof(szTargetFolder)); 343 344 if (RT_FAILURE(vrc)) 344 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAbs(%s,,) failed with rc=%Rrc", ValueUnion.psz, vrc); 345 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("RTPathAbs(%s,,) failed with rc=%Rrc"), 346 ValueUnion.psz, vrc); 345 347 } else { 346 348 szTargetFolder[0] = '\0'; … … 352 354 pszSrcName = ValueUnion.psz; 353 355 else 354 return errorSyntax(USAGE_MOVEVM, "Invalid parameter '%s'", ValueUnion.psz);356 return errorSyntax(USAGE_MOVEVM, Misc::tr("Invalid parameter '%s'"), ValueUnion.psz); 355 357 break; 356 358 … … 368 370 /* Check for required options */ 369 371 if (!pszSrcName) 370 return errorSyntax(USAGE_MOVEVM, "VM name required");372 return errorSyntax(USAGE_MOVEVM, Misc::tr("VM name required")); 371 373 372 374 /* Get the machine object */ … … 392 394 RTEXITCODE_FAILURE); 393 395 rc = showProgress(progress); 394 CHECK_PROGRESS_ERROR_RET(progress, ( "Move VM failed"), RTEXITCODE_FAILURE);396 CHECK_PROGRESS_ERROR_RET(progress, (Misc::tr("Move VM failed")), RTEXITCODE_FAILURE); 395 397 396 398 sessionMachine.setNull(); 397 399 CHECK_ERROR_RET(a->session, UnlockMachine(), RTEXITCODE_FAILURE); 398 400 399 RTPrintf("Machine has been successfully moved into %s\n", szTargetFolder[0] != '\0' ? szTargetFolder : "the same location"); 401 RTPrintf(Misc::tr("Machine has been successfully moved into %s\n"), 402 szTargetFolder[0] != '\0' ? szTargetFolder : Misc::tr("the same location")); 400 403 } 401 404 … … 507 510 case 'm': // --mode 508 511 if (RT_FAILURE(parseCloneMode(ValueUnion.psz, &mode))) 509 return errorArgument( "Invalid clone mode '%s'\n", ValueUnion.psz);512 return errorArgument(Misc::tr("Invalid clone mode '%s'\n"), ValueUnion.psz); 510 513 break; 511 514 512 515 case 'o': // --options 513 516 if (RT_FAILURE(parseCloneOptions(ValueUnion.psz, &options))) 514 return errorArgument( "Invalid clone options '%s'\n", ValueUnion.psz);517 return errorArgument(Misc::tr("Invalid clone options '%s'\n"), ValueUnion.psz); 515 518 break; 516 519 … … 527 530 pszSrcName = ValueUnion.psz; 528 531 else 529 return errorSyntax( "Invalid parameter '%s'", ValueUnion.psz);532 return errorSyntax(Misc::tr("Invalid parameter '%s'"), ValueUnion.psz); 530 533 break; 531 534 … … 537 540 /* Check for required options */ 538 541 if (!pszSrcName) 539 return errorSyntax( "VM name required");542 return errorSyntax(Misc::tr("VM name required")); 540 543 541 544 /* Get the machine object */ … … 559 562 /* Default name necessary? */ 560 563 if (!pszTrgName) 561 pszTrgName = RTStrAPrintf2( "%s Clone", pszSrcName);564 pszTrgName = RTStrAPrintf2(Misc::tr("%s Clone"), pszSrcName); 562 565 563 566 Bstr createFlags; … … 593 596 RTEXITCODE_FAILURE); 594 597 rc = showProgress(progress); 595 CHECK_PROGRESS_ERROR_RET(progress, ( "Clone VM failed"), RTEXITCODE_FAILURE);598 CHECK_PROGRESS_ERROR_RET(progress, (Misc::tr("Clone VM failed")), RTEXITCODE_FAILURE); 596 599 597 600 if (fRegister) … … 600 603 Bstr bstrNewName; 601 604 CHECK_ERROR_RET(trgMachine, COMGETTER(Name)(bstrNewName.asOutParam()), RTEXITCODE_FAILURE); 602 RTPrintf( "Machine has been successfully cloned as \"%ls\"\n", bstrNewName.raw());605 RTPrintf(Misc::tr("Machine has been successfully cloned as \"%ls\"\n"), bstrNewName.raw()); 603 606 604 607 return RTEXITCODE_SUCCESS; … … 669 672 aBstrEnv.push_back(Bstr(ValueUnion.psz).raw()); 670 673 else 671 return errorSyntax(USAGE_STARTVM, "Parameter to option --putenv must not contain any newline character"); 674 return errorSyntax(USAGE_STARTVM, 675 Misc::tr("Parameter to option --putenv must not contain any newline character")); 672 676 break; 673 677 … … 680 684 { 681 685 if (RT_C_IS_PRINT(c)) 682 return errorSyntax(USAGE_STARTVM, "Invalid option -%c", c);686 return errorSyntax(USAGE_STARTVM, Misc::tr("Invalid option -%c"), c); 683 687 else 684 return errorSyntax(USAGE_STARTVM, "Invalid option case %i", c);688 return errorSyntax(USAGE_STARTVM, Misc::tr("Invalid option case %i"), c); 685 689 } 686 690 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 687 return errorSyntax(USAGE_STARTVM, "unknown option: %s\n", ValueUnion.psz);691 return errorSyntax(USAGE_STARTVM, Misc::tr("unknown option: %s\n"), ValueUnion.psz); 688 692 else if (ValueUnion.pDef) 689 693 return errorSyntax(USAGE_STARTVM, "%s: %Rrs", ValueUnion.pDef->pszLong, c); 690 694 else 691 return errorSyntax(USAGE_STARTVM, "error: %Rrs", c);695 return errorSyntax(USAGE_STARTVM, Misc::tr("error: %Rrs"), c); 692 696 } 693 697 } … … 695 699 /* check for required options */ 696 700 if (VMs.empty()) 697 return errorSyntax(USAGE_STARTVM, "at least one VM name or uuid required");701 return errorSyntax(USAGE_STARTVM, Misc::tr("at least one VM name or uuid required")); 698 702 699 703 for (std::list<const char *>::const_iterator it = VMs.begin(); … … 713 717 if (SUCCEEDED(rc) && !progress.isNull()) 714 718 { 715 RTPrintf( "Waiting for VM \"%s\" to power on...\n", pszVM);719 RTPrintf(Misc::tr("Waiting for VM \"%s\" to power on...\n"), pszVM); 716 720 CHECK_ERROR(progress, WaitForCompletion(-1)); 717 721 if (SUCCEEDED(rc)) … … 728 732 { 729 733 if (SUCCEEDED(iRc)) 730 RTPrintf( "VM \"%s\" has been successfully started.\n", pszVM);734 RTPrintf(Misc::tr("VM \"%s\" has been successfully started.\n"), pszVM); 731 735 else 732 736 { … … 757 761 758 762 if (a->argc != 1) 759 return errorSyntax(USAGE_DISCARDSTATE, "Incorrect number of parameters");763 return errorSyntax(USAGE_DISCARDSTATE, Misc::tr("Incorrect number of parameters")); 760 764 761 765 ComPtr<IMachine> machine; … … 786 790 787 791 if (a->argc != 2) 788 return errorSyntax(USAGE_ADOPTSTATE, "Incorrect number of parameters");792 return errorSyntax(USAGE_ADOPTSTATE, Misc::tr("Incorrect number of parameters")); 789 793 790 794 ComPtr<IMachine> machine; … … 796 800 int vrc = RTPathAbs(a->argv[1], szStateFileAbs, sizeof(szStateFileAbs)); 797 801 if (RT_FAILURE(vrc)) 798 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Cannot convert filename \"%s\" to absolute path: %Rrc", a->argv[0], vrc); 802 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("Cannot convert filename \"%s\" to absolute path: %Rrc"), 803 a->argv[0], vrc); 799 804 800 805 do … … 820 825 821 826 if (a->argc > 2 || a->argc < 1) 822 return errorSyntax(USAGE_GETEXTRADATA, "Incorrect number of parameters");827 return errorSyntax(USAGE_GETEXTRADATA, Misc::tr("Incorrect number of parameters")); 823 828 824 829 /* global data? */ … … 840 845 bstrValue.asOutParam())); 841 846 842 RTPrintf( "Key: %ls, Value: %ls\n", bstrKey.raw(), bstrValue.raw());847 RTPrintf(Misc::tr("Key: %ls, Value: %ls\n"), bstrKey.raw(), bstrValue.raw()); 843 848 } 844 849 } … … 849 854 value.asOutParam())); 850 855 if (!value.isEmpty()) 851 RTPrintf( "Value: %ls\n", value.raw());856 RTPrintf(Misc::tr("Value: %ls\n"), value.raw()); 852 857 else 853 RTPrintf( "No value set!\n");858 RTPrintf(Misc::tr("No value set!\n")); 854 859 } 855 860 } … … 876 881 bstrValue.asOutParam())); 877 882 878 RTPrintf( "Key: %ls, Value: %ls\n", bstrKey.raw(), bstrValue.raw());883 RTPrintf(Misc::tr("Key: %ls, Value: %ls\n"), bstrKey.raw(), bstrValue.raw()); 879 884 } 880 885 } … … 885 890 value.asOutParam())); 886 891 if (!value.isEmpty()) 887 RTPrintf( "Value: %ls\n", value.raw());892 RTPrintf(Misc::tr("Value: %ls\n"), value.raw()); 888 893 else 889 RTPrintf( "No value set!\n");894 RTPrintf(Misc::tr("No value set!\n")); 890 895 } 891 896 } … … 899 904 900 905 if (a->argc < 2) 901 return errorSyntax(USAGE_SETEXTRADATA, "Not enough parameters");906 return errorSyntax(USAGE_SETEXTRADATA, Misc::tr("Not enough parameters")); 902 907 903 908 /* global data? */ … … 912 917 Bstr(a->argv[2]).raw())); 913 918 else 914 return errorSyntax(USAGE_SETEXTRADATA, "Too many parameters");919 return errorSyntax(USAGE_SETEXTRADATA, Misc::tr("Too many parameters")); 915 920 } 916 921 else … … 934 939 Bstr(a->argv[2]).raw())); 935 940 else 936 return errorSyntax(USAGE_SETEXTRADATA, "Too many parameters");941 return errorSyntax(USAGE_SETEXTRADATA, Misc::tr("Too many parameters")); 937 942 } 938 943 } … … 946 951 /* there must be two arguments: property name and value */ 947 952 if (a->argc != 2) 948 return errorSyntax(USAGE_SETPROPERTY, "Incorrect number of parameters");953 return errorSyntax(USAGE_SETPROPERTY, Misc::tr("Incorrect number of parameters")); 949 954 950 955 ComPtr<ISystemProperties> systemProperties; … … 968 973 fHwVirtExclusive = false; 969 974 else 970 return errorArgument( "Invalid hwvirtexclusive argument '%s'", a->argv[1]);975 return errorArgument(Misc::tr("Invalid hwvirtexclusive argument '%s'"), a->argv[1]); 971 976 CHECK_ERROR(systemProperties, COMSETTER(ExclusiveHwVirt)(fHwVirtExclusive)); 972 977 } … … 975 980 { 976 981 if (!strcmp(a->argv[0], "vrdpauthlibrary")) 977 RTStrmPrintf(g_pStdErr, "Warning: 'vrdpauthlibrary' is deprecated. Use 'vrdeauthlibrary'.\n");982 RTStrmPrintf(g_pStdErr, Misc::tr("Warning: 'vrdpauthlibrary' is deprecated. Use 'vrdeauthlibrary'.\n")); 978 983 979 984 /* reset to default? */ … … 1005 1010 vrc = RTStrToUInt32Ex(a->argv[1], NULL, 0, &uVal); 1006 1011 if (vrc != VINF_SUCCESS) 1007 return errorArgument( "Error parsing Log history count '%s'", a->argv[1]);1012 return errorArgument(Misc::tr("Error parsing Log history count '%s'"), a->argv[1]); 1008 1013 CHECK_ERROR(systemProperties, COMSETTER(LogHistoryCount)(uVal)); 1009 1014 } … … 1040 1045 enmProxyMode = ProxyMode_Manual; 1041 1046 else 1042 return errorArgument( "Unknown proxy mode: '%s'", a->argv[1]);1047 return errorArgument(Misc::tr("Unknown proxy mode: '%s'"), a->argv[1]); 1043 1048 CHECK_ERROR(systemProperties, COMSETTER(ProxyMode)(enmProxyMode)); 1044 1049 } … … 1071 1076 #endif 1072 1077 else 1073 return errorSyntax(USAGE_SETPROPERTY, "Invalid parameter '%s'", a->argv[0]);1078 return errorSyntax(USAGE_SETPROPERTY, Misc::tr("Invalid parameter '%s'"), a->argv[0]); 1074 1079 1075 1080 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 1134 1139 case VINF_GETOPT_NOT_OPTION: 1135 1140 if (pszMachineName) 1136 return errorArgument( "Machine name is given more than once: first '%s', then '%s'",1141 return errorArgument(Misc::tr("Machine name is given more than once: first '%s', then '%s'"), 1137 1142 pszMachineName, ValueUnion.psz); 1138 1143 pszMachineName = ValueUnion.psz; … … 1144 1149 1145 1150 if (!pszMachineName) 1146 return errorSyntax( "No machine was specified");1151 return errorSyntax(Misc::tr("No machine was specified")); 1147 1152 1148 1153 if (!pszName) 1149 return errorSyntax( "No shared folder name (--name) was given");1154 return errorSyntax(Misc::tr("No shared folder name (--name) was given")); 1150 1155 if (strchr(pszName, ' ')) 1151 return errorSyntax( "Invalid shared folder name '%s': contains space", pszName);1156 return errorSyntax(Misc::tr("Invalid shared folder name '%s': contains space"), pszName); 1152 1157 if (strchr(pszName, '\t')) 1153 return errorSyntax( "Invalid shared folder name '%s': contains tabs", pszName);1158 return errorSyntax(Misc::tr("Invalid shared folder name '%s': contains tabs"), pszName); 1154 1159 if (strchr(pszName, '\n') || strchr(pszName, '\r')) 1155 return errorSyntax( "Invalid shared folder name '%s': contains newline", pszName);1160 return errorSyntax(Misc::tr("Invalid shared folder name '%s': contains newline"), pszName); 1156 1161 1157 1162 if (!pszHostPath) 1158 return errorSyntax( "No host path (--hostpath) was given");1163 return errorSyntax(Misc::tr("No host path (--hostpath) was given")); 1159 1164 char szAbsHostPath[RTPATH_MAX]; 1160 1165 int vrc = RTPathAbs(pszHostPath, szAbsHostPath, sizeof(szAbsHostPath)); 1161 1166 if (RT_FAILURE(vrc)) 1162 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTAbsPath failed on '%s': %Rrc", pszHostPath, vrc);1167 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("RTAbsPath failed on '%s': %Rrc"), pszHostPath, vrc); 1163 1168 1164 1169 /* … … 1183 1188 CHECK_ERROR2I_RET(a->session, COMGETTER(Console)(ptrConsole.asOutParam()), RTEXITCODE_FAILURE); 1184 1189 if (ptrConsole.isNull()) 1185 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Machine '%s' is not currently running.", pszMachineName);1190 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("Machine '%s' is not currently running."), pszMachineName); 1186 1191 1187 1192 CHECK_ERROR2(hrc, ptrConsole, CreateSharedFolder(Bstr(pszName).raw(), Bstr(szAbsHostPath).raw(), … … 1246 1251 case VINF_GETOPT_NOT_OPTION: 1247 1252 if (pszMachineName) 1248 return errorArgument( "Machine name is given more than once: first '%s', then '%s'",1253 return errorArgument(Misc::tr("Machine name is given more than once: first '%s', then '%s'"), 1249 1254 pszMachineName, ValueUnion.psz); 1250 1255 pszMachineName = ValueUnion.psz; … … 1256 1261 1257 1262 if (!pszMachineName) 1258 return errorSyntax( "No machine was specified");1263 return errorSyntax(Misc::tr("No machine was specified")); 1259 1264 if (!pszName) 1260 return errorSyntax( "No shared folder name (--name) was given");1265 return errorSyntax(Misc::tr("No shared folder name (--name) was given")); 1261 1266 1262 1267 /* … … 1279 1284 CHECK_ERROR2I_RET(a->session, COMGETTER(Console)(ptrConsole.asOutParam()), RTEXITCODE_FAILURE); 1280 1285 if (ptrConsole.isNull()) 1281 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Machine '%s' is not currently running.\n", pszMachineName);1286 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("Machine '%s' is not currently running.\n"), pszMachineName); 1282 1287 1283 1288 CHECK_ERROR2(hrc, ptrConsole, RemoveSharedFolder(Bstr(pszName).raw())); … … 1311 1316 { 1312 1317 if (a->argc < 1) 1313 return errorSyntax( "Not enough parameters");1318 return errorSyntax(Misc::tr("Not enough parameters")); 1314 1319 1315 1320 if (!strcmp(a->argv[0], "add")) … … 1370 1375 case VINF_GETOPT_NOT_OPTION: 1371 1376 if (pszName) 1372 return errorSyntax( "Too many extension pack names given to \"extpack uninstall\"");1377 return errorSyntax(Misc::tr("Too many extension pack names given to \"extpack uninstall\"")); 1373 1378 pszName = ValueUnion.psz; 1374 1379 break; … … 1379 1384 } 1380 1385 if (!pszName) 1381 return errorSyntax( "No extension pack name was given to \"extpack install\"");1386 return errorSyntax(Misc::tr("No extension pack name was given to \"extpack install\"")); 1382 1387 1383 1388 char szPath[RTPATH_MAX]; 1384 1389 int vrc = RTPathAbs(pszName, szPath, sizeof(szPath)); 1385 1390 if (RT_FAILURE(vrc)) 1386 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAbs(%s,,) failed with rc=%Rrc", pszName, vrc);1391 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("RTPathAbs(%s,,) failed with rc=%Rrc"), pszName, vrc); 1387 1392 1388 1393 Bstr bstrTarball(szPath); … … 1408 1413 AssertRCStmt(vrc, szDigest[0] = '\0'); 1409 1414 if (lstLicenseHashes.contains(szDigest)) 1410 RTPrintf( "License accepted.\n");1415 RTPrintf(Misc::tr("License accepted.\n")); 1411 1416 else 1412 1417 { 1413 1418 RTPrintf("%s\n", strLicense.c_str()); 1414 RTPrintf( "Do you agree to these license terms and conditions (y/n)? ");1419 RTPrintf(Misc::tr("Do you agree to these license terms and conditions (y/n)? ")); 1415 1420 ch = RTStrmGetCh(g_pStdIn); 1416 1421 RTPrintf("\n"); 1417 1422 if (ch != 'y' && ch != 'Y') 1418 1423 { 1419 RTPrintf( "Installation of \"%ls\" aborted.\n", bstrName.raw());1424 RTPrintf(Misc::tr("Installation of \"%ls\" aborted.\n"), bstrName.raw()); 1420 1425 return RTEXITCODE_FAILURE; 1421 1426 } 1422 1427 if (szDigest[0]) 1423 RTPrintf( "License accepted. For batch installation add\n"1424 "--accept-license=%s\n"1425 "to the VBoxManage command line.\n\n", szDigest);1428 RTPrintf(Misc::tr("License accepted. For batch installation add\n" 1429 "--accept-license=%s\n" 1430 "to the VBoxManage command line.\n\n"), szDigest); 1426 1431 } 1427 1432 } … … 1429 1434 CHECK_ERROR2I_RET(ptrExtPackFile, Install(fReplace, NULL, ptrProgress.asOutParam()), RTEXITCODE_FAILURE); 1430 1435 hrc = showProgress(ptrProgress); 1431 CHECK_PROGRESS_ERROR_RET(ptrProgress, ( "Failed to install \"%s\"", szPath), RTEXITCODE_FAILURE);1432 1433 RTPrintf( "Successfully installed \"%ls\".\n", bstrName.raw());1436 CHECK_PROGRESS_ERROR_RET(ptrProgress, (Misc::tr("Failed to install \"%s\""), szPath), RTEXITCODE_FAILURE); 1437 1438 RTPrintf(Misc::tr("Successfully installed \"%ls\".\n"), bstrName.raw()); 1434 1439 } 1435 1440 else if (!strcmp(a->argv[0], "uninstall")) … … 1455 1460 case VINF_GETOPT_NOT_OPTION: 1456 1461 if (pszName) 1457 return errorSyntax( "Too many extension pack names given to \"extpack uninstall\"");1462 return errorSyntax(Misc::tr("Too many extension pack names given to \"extpack uninstall\"")); 1458 1463 pszName = ValueUnion.psz; 1459 1464 break; … … 1464 1469 } 1465 1470 if (!pszName) 1466 return errorSyntax( "No extension pack name was given to \"extpack uninstall\"");1471 return errorSyntax(Misc::tr("No extension pack name was given to \"extpack uninstall\"")); 1467 1472 1468 1473 Bstr bstrName(pszName); … … 1470 1475 CHECK_ERROR2I_RET(ptrExtPackMgr, Uninstall(bstrName.raw(), fForced, NULL, ptrProgress.asOutParam()), RTEXITCODE_FAILURE); 1471 1476 hrc = showProgress(ptrProgress); 1472 CHECK_PROGRESS_ERROR_RET(ptrProgress, ( "Failed to uninstall \"%s\"", pszName), RTEXITCODE_FAILURE);1473 1474 RTPrintf( "Successfully uninstalled \"%s\".\n", pszName);1477 CHECK_PROGRESS_ERROR_RET(ptrProgress, (Misc::tr("Failed to uninstall \"%s\""), pszName), RTEXITCODE_FAILURE); 1478 1479 RTPrintf(Misc::tr("Successfully uninstalled \"%s\".\n"), pszName); 1475 1480 } 1476 1481 else if (!strcmp(a->argv[0], "cleanup")) … … 1480 1485 return errorTooManyParameters(&a->argv[1]); 1481 1486 CHECK_ERROR2I_RET(ptrExtPackMgr, Cleanup(), RTEXITCODE_FAILURE); 1482 RTPrintf( "Successfully performed extension pack cleanup\n");1487 RTPrintf(Misc::tr("Successfully performed extension pack cleanup\n")); 1483 1488 } 1484 1489 else … … 1522 1527 vrc = RTPathAbs(ValueUnion.psz, szIsoPath, sizeof(szIsoPath)); 1523 1528 if (RT_FAILURE(vrc)) 1524 return errorSyntax( "RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1529 return errorSyntax(Misc::tr("RTPathAbs failed on '%s': %Rrc"), ValueUnion.psz, vrc); 1525 1530 break; 1526 1531 … … 1538 1543 */ 1539 1544 if (szIsoPath[0] == '\0') 1540 return errorSyntax( "No ISO specified");1545 return errorSyntax(Misc::tr("No ISO specified")); 1541 1546 1542 1547 /* … … 1575 1580 else 1576 1581 { 1577 RTMsgInfo( "Detected '%s' to be:\n", szIsoPath);1578 RTPrintf( " OS TypeId = %ls\n"1579 " OS Version = %ls\n"1580 " OS Flavor = %ls\n"1581 " OS Languages = %ls\n"1582 " OS Hints = %ls\n",1582 RTMsgInfo(Misc::tr("Detected '%s' to be:\n"), szIsoPath); 1583 RTPrintf(Misc::tr(" OS TypeId = %ls\n" 1584 " OS Version = %ls\n" 1585 " OS Flavor = %ls\n" 1586 " OS Languages = %ls\n" 1587 " OS Hints = %ls\n"), 1583 1588 bstrDetectedOSTypeId.raw(), 1584 1589 bstrDetectedVersion.raw(), … … 1657 1662 case VINF_GETOPT_NOT_OPTION: 1658 1663 if (ptrMachine.isNotNull()) 1659 return errorSyntax( "VM name/UUID given more than once!");1664 return errorSyntax(Misc::tr("VM name/UUID given more than once!")); 1660 1665 CHECK_ERROR2_RET(hrc, a->virtualBox, FindMachine(Bstr(ValueUnion.psz).raw(), ptrMachine.asOutParam()), RTEXITCODE_FAILURE); 1661 1666 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(Machine)(ptrMachine), RTEXITCODE_FAILURE); … … 1665 1670 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1666 1671 if (RT_FAILURE(vrc)) 1667 return errorSyntax( "RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1672 return errorSyntax(Misc::tr("RTPathAbs failed on '%s': %Rrc"), ValueUnion.psz, vrc); 1668 1673 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(IsoPath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1669 1674 break; … … 1704 1709 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1705 1710 if (RT_FAILURE(vrc)) 1706 return errorSyntax( "RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1711 return errorSyntax(Misc::tr("RTPathAbs failed on '%s': %Rrc"), ValueUnion.psz, vrc); 1707 1712 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(AdditionsIsoPath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1708 1713 break; … … 1717 1722 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1718 1723 if (RT_FAILURE(vrc)) 1719 return errorSyntax( "RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1724 return errorSyntax(Misc::tr("RTPathAbs failed on '%s': %Rrc"), ValueUnion.psz, vrc); 1720 1725 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(ValidationKitIsoPath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1721 1726 break; … … 1752 1757 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1753 1758 if (RT_FAILURE(vrc)) 1754 return errorSyntax( "RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1759 return errorSyntax(Misc::tr("RTPathAbs failed on '%s': %Rrc"), ValueUnion.psz, vrc); 1755 1760 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(AuxiliaryBasePath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1756 1761 break; … … 1763 1768 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1764 1769 if (RT_FAILURE(vrc)) 1765 return errorSyntax( "RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1770 return errorSyntax(Misc::tr("RTPathAbs failed on '%s': %Rrc"), ValueUnion.psz, vrc); 1766 1771 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(ScriptTemplatePath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1767 1772 break; … … 1770 1775 vrc = RTPathAbs(ValueUnion.psz, szAbsPath, sizeof(szAbsPath)); 1771 1776 if (RT_FAILURE(vrc)) 1772 return errorSyntax( "RTPathAbs failed on '%s': %Rrc", ValueUnion.psz, vrc);1777 return errorSyntax(Misc::tr("RTPathAbs failed on '%s': %Rrc"), ValueUnion.psz, vrc); 1773 1778 CHECK_ERROR2_RET(hrc, ptrUnattended, COMSETTER(PostInstallScriptTemplatePath)(Bstr(szAbsPath).raw()), RTEXITCODE_FAILURE); 1774 1779 break; … … 1799 1804 */ 1800 1805 if (ptrMachine.isNull()) 1801 return errorSyntax( "Missing VM name/UUID");1806 return errorSyntax(Misc::tr("Missing VM name/UUID")); 1802 1807 1803 1808 /* … … 1851 1856 return RTEXITCODE_FAILURE; 1852 1857 if (ptrConsole.isNotNull()) 1853 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Machine '%ls' is currently running", bstrMachineName.raw());1858 return RTMsgErrorExit(RTEXITCODE_FAILURE, Misc::tr("Machine '%ls' is currently running"), bstrMachineName.raw()); 1854 1859 } 1855 1860 … … 1857 1862 * Do the work. 1858 1863 */ 1859 RTMsgInfo( "%s unattended installation of %s in machine '%ls' (%ls).\n",1860 RTStrICmp(pszSessionType, "none") == 0 ? "Preparing" : "Starting",1864 RTMsgInfo(Misc::tr("%s unattended installation of %s in machine '%ls' (%ls).\n"), 1865 RTStrICmp(pszSessionType, "none") == 0 ? Misc::tr("Preparing") : Misc::tr("Starting"), 1861 1866 strInstalledOS.c_str(), bstrMachineName.raw(), bstrUuid.raw()); 1862 1867 … … 1871 1876 * Retrieve and display the parameters actually used. 1872 1877 */ 1873 RTMsgInfo( "Using values:\n");1878 RTMsgInfo(Misc::tr("Using values:\n")); 1874 1879 #define SHOW_ATTR(a_Attr, a_szText, a_Type, a_szFmt) do { \ 1875 1880 a_Type Value; \ … … 1878 1883 RTPrintf(" %32s = " a_szFmt "\n", a_szText, Value); \ 1879 1884 else \ 1880 RTPrintf( " %32s = failed: %Rhrc\n", a_szText, hrc2); \1885 RTPrintf(Misc::tr(" %32s = failed: %Rhrc\n"), a_szText, hrc2); \ 1881 1886 } while (0) 1882 1887 #define SHOW_STR_ATTR(a_Attr, a_szText) do { \ … … 1886 1891 RTPrintf(" %32s = %ls\n", a_szText, bstrString.raw()); \ 1887 1892 else \ 1888 RTPrintf( " %32s = failed: %Rhrc\n", a_szText, hrc2); \1893 RTPrintf(Misc::tr(" %32s = failed: %Rhrc\n"), a_szText, hrc2); \ 1889 1894 } while (0) 1890 1895 … … 1930 1935 { 1931 1936 if (!fDryRun) 1932 RTMsgInfo( "VM '%ls' (%ls) is ready to be started (e.g. VBoxManage startvm).\n", bstrMachineName.raw(), bstrUuid.raw());1937 RTMsgInfo(Misc::tr("VM '%ls' (%ls) is ready to be started (e.g. VBoxManage startvm).\n"), bstrMachineName.raw(), bstrUuid.raw()); 1933 1938 hrc = S_OK; 1934 1939 } … … 1949 1954 if (SUCCEEDED(hrc) && !ptrProgress.isNull()) 1950 1955 { 1951 RTMsgInfo( "Waiting for VM '%ls' to power on...\n", bstrMachineName.raw());1956 RTMsgInfo(Misc::tr("Waiting for VM '%ls' to power on...\n"), bstrMachineName.raw()); 1952 1957 CHECK_ERROR2(hrc, ptrProgress, WaitForCompletion(-1)); 1953 1958 if (SUCCEEDED(hrc)) … … 1964 1969 { 1965 1970 if (SUCCEEDED(iRc)) 1966 RTMsgInfo("VM '%ls' (%ls) has been successfully started.\n", bstrMachineName.raw(), bstrUuid.raw()); 1971 RTMsgInfo(Misc::tr("VM '%ls' (%ls) has been successfully started.\n"), 1972 bstrMachineName.raw(), bstrUuid.raw()); 1967 1973 else 1968 1974 { … … 2095 2101 /* check for required options */ 2096 2102 if (bstrProvider.isEmpty()) 2097 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --provider is required");2103 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --provider is required")); 2098 2104 if (bstrProfile.isEmpty()) 2099 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --profile is required");2105 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --profile is required")); 2100 2106 2101 2107 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 2126 2132 CHECK_ERROR2(hrc, pCloudProvider, SaveProfiles()); 2127 2133 2128 RTPrintf( "Provider %ls: profile '%ls' was updated.\n",bstrProvider.raw(), bstrProfile.raw());2134 RTPrintf(Misc::tr("Provider %ls: profile '%ls' was updated.\n"),bstrProvider.raw(), bstrProfile.raw()); 2129 2135 2130 2136 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 2145 2151 /* check for required options */ 2146 2152 if (bstrProvider.isEmpty()) 2147 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --provider is required");2153 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --provider is required")); 2148 2154 if (bstrProfile.isEmpty()) 2149 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --profile is required");2155 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --profile is required")); 2150 2156 2151 2157 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 2168 2174 Bstr bstrProviderID; 2169 2175 pCloudProfile->COMGETTER(ProviderId)(bstrProviderID.asOutParam()); 2170 RTPrintf( "Provider GUID: %ls\n", bstrProviderID.raw());2176 RTPrintf(Misc::tr("Provider GUID: %ls\n"), bstrProviderID.raw()); 2171 2177 2172 2178 com::SafeArray<BSTR> names; … … 2184 2190 value = values[k]; 2185 2191 RTPrintf("%s%ls=%ls\n", 2186 fFirst ? "Property: ": " ",2192 fFirst ? Misc::tr("Property: ") : " ", 2187 2193 names[k], value.raw()); 2188 2194 fFirst = false; … … 2205 2211 /* check for required options */ 2206 2212 if (bstrProvider.isEmpty()) 2207 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --provider is required");2213 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --provider is required")); 2208 2214 if (bstrProfile.isEmpty()) 2209 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --profile is required");2215 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --profile is required")); 2210 2216 2211 2217 /* … … 2289 2295 CHECK_ERROR2(hrc, pCloudProvider, SaveProfiles()); 2290 2296 2291 RTPrintf( "Provider %ls: profile '%ls' was added.\n",bstrProvider.raw(), bstrProfile.raw());2297 RTPrintf(Misc::tr("Provider %ls: profile '%ls' was added.\n"),bstrProvider.raw(), bstrProfile.raw()); 2292 2298 2293 2299 return SUCCEEDED(hrc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 2303 2309 /* check for required options */ 2304 2310 if (bstrProvider.isEmpty()) 2305 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --provider is required");2311 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --provider is required")); 2306 2312 if (bstrProfile.isEmpty()) 2307 return errorSyntax(USAGE_CLOUDPROFILE, "Parameter --profile is required");2313 return errorSyntax(USAGE_CLOUDPROFILE, Misc::tr("Parameter --profile is required")); 2308 2314 2309 2315 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; … … 2332 2338 RTEXITCODE_FAILURE); 2333 2339 2334 RTPrintf( "Provider %ls: profile '%ls' was deleted.\n",bstrProvider.raw(), bstrProfile.raw());2340 RTPrintf(Misc::tr("Provider %ls: profile '%ls' was deleted.\n"), bstrProvider.raw(), bstrProfile.raw()); 2335 2341 } 2336 2342 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyNvram.cpp
r91685 r92372 42 42 using namespace com; 43 43 44 DECLARE_TRANSLATION_CONTEXT(Nvram); 44 45 45 46 // funcs … … 120 121 121 122 if (!pszPlatformKey) 122 return errorSyntax( "No platform key file path was given to \"enrollpk\"");123 return errorSyntax(Nvram::tr("No platform key file path was given to \"enrollpk\"")); 123 124 if (!pszOwnerUuid) 124 return errorSyntax( "No owner UUID was given to \"enrollpk\"");125 return errorSyntax(Nvram::tr("No owner UUID was given to \"enrollpk\"")); 125 126 126 127 RTFILE hPkFile; … … 146 147 } 147 148 else 148 RTMsgError( "Cannot read contents of file \"%s\": %Rrc", pszPlatformKey, vrc);149 RTMsgError(Nvram::tr("Cannot read contents of file \"%s\": %Rrc"), pszPlatformKey, vrc); 149 150 } 150 151 else 151 RTMsgError( "File \"%s\" is bigger than 32KByte", pszPlatformKey);152 RTMsgError(Nvram::tr("File \"%s\" is bigger than 32KByte"), pszPlatformKey); 152 153 } 153 154 else 154 RTMsgError( "Cannot get size of file \"%s\": %Rrc", pszPlatformKey, vrc);155 RTMsgError(Nvram::tr("Cannot get size of file \"%s\": %Rrc"), pszPlatformKey, vrc); 155 156 156 157 RTFileClose(hPkFile); 157 158 } 158 159 else 159 RTMsgError( "Cannot open file \"%s\": %Rrc", pszPlatformKey, vrc);160 RTMsgError(Nvram::tr("Cannot open file \"%s\": %Rrc"), pszPlatformKey, vrc); 160 161 161 162 return RTEXITCODE_FAILURE; … … 249 250 250 251 if (!pszVarName) 251 return errorSyntax( "No variable name was given to \"queryvar\"");252 return errorSyntax(Nvram::tr("No variable name was given to \"queryvar\"")); 252 253 253 254 ComPtr<IUefiVariableStore> uefiVarStore; … … 276 277 vrc = RTFileWrite(hFile, aData.raw(), aData.size(), NULL /*pcbWritten*/); 277 278 if (RT_FAILURE(vrc)) 278 rcExit = RTMsgErrorExitFailure( "Error writing to '%s': %Rrc", pszVarDataFilename, vrc);279 rcExit = RTMsgErrorExitFailure(Nvram::tr("Error writing to '%s': %Rrc"), pszVarDataFilename, vrc); 279 280 280 281 RTFileClose(hFile); 281 282 } 282 283 else 283 rcExit = RTMsgErrorExitFailure( "Error opening '%s': %Rrc", pszVarDataFilename, vrc);284 rcExit = RTMsgErrorExitFailure(Nvram::tr("Error opening '%s': %Rrc"), pszVarDataFilename, vrc); 284 285 } 285 286 … … 328 329 329 330 if (!pszVarName) 330 return errorSyntax( "No variable name was given to \"deletevar\"");331 return errorSyntax(Nvram::tr("No variable name was given to \"deletevar\"")); 331 332 if (!pszOwnerUuid) 332 return errorSyntax( "No owner UUID was given to \"deletevar\"");333 return errorSyntax(Nvram::tr("No owner UUID was given to \"deletevar\"")); 333 334 334 335 ComPtr<IUefiVariableStore> uefiVarStore; … … 380 381 381 382 if (!pszVarName) 382 return errorSyntax( "No variable name was given to \"changevar\"");383 return errorSyntax(Nvram::tr("No variable name was given to \"changevar\"")); 383 384 if (!pszVarDataFilename) 384 return errorSyntax( "No variable data filename was given to \"changevar\"");385 return errorSyntax(Nvram::tr("No variable data filename was given to \"changevar\"")); 385 386 386 387 RTFILE hFile = NIL_RTFILE; … … 406 407 } 407 408 else 408 rcExit = RTMsgErrorExitFailure( "Error reading from '%s': %Rrc", pszVarDataFilename, vrc);409 rcExit = RTMsgErrorExitFailure(Nvram::tr("Error reading from '%s': %Rrc"), pszVarDataFilename, vrc); 409 410 } 410 411 } 411 412 else 412 rcExit = RTMsgErrorExitFailure( "Error opening '%s': %Rrc", pszVarDataFilename, vrc);413 rcExit = RTMsgErrorExitFailure(Nvram::tr("Error opening '%s': %Rrc"), pszVarDataFilename, vrc); 413 414 414 415 return rcExit; … … 497 498 498 499 #endif /* !VBOX_ONLY_DOCS */ 499 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r92133 r92372 39 39 #include "VBoxManage.h" 40 40 #include "VBoxManageUtils.h" 41 42 DECLARE_TRANSLATION_CONTEXT(ModifyVM); 41 43 42 44 #ifndef VBOX_ONLY_DOCS … … 460 462 static void vrdeWarningDeprecatedOption(const char *pszOption) 461 463 { 462 RTStrmPrintf(g_pStdErr, "Warning: '--vrdp%s' is deprecated. Use '--vrde%s'.\n", pszOption, pszOption);464 RTStrmPrintf(g_pStdErr, ModifyVM::tr("Warning: '--vrdp%s' is deprecated. Use '--vrde%s'.\n"), pszOption, pszOption); 463 465 } 464 466 … … 536 538 && uIndex <= cMaxIndex) 537 539 return uIndex; 538 errorArgument( "Invalid %s number %u", pszName, uIndex);540 errorArgument(ModifyVM::tr("Invalid %s number %u"), pszName, uIndex); 539 541 return 0; 540 542 } … … 565 567 * individually. */ 566 568 if (a->argc < 2) 567 return errorSyntax(USAGE_MODIFYVM, "Not enough parameters");569 return errorSyntax(USAGE_MODIFYVM, ModifyVM::tr("Not enough parameters")); 568 570 569 571 /* try to find the given sessionMachine */ … … 628 630 if (RT_FAILURE(vrc)) 629 631 { 630 RTMsgError( "Cannot open file \"%s\": %Rrc", ValueUnion.psz, vrc);632 RTMsgError(ModifyVM::tr("Cannot open file \"%s\": %Rrc"), ValueUnion.psz, vrc); 631 633 rc = E_FAIL; 632 634 break; … … 636 638 if (RT_FAILURE(vrc)) 637 639 { 638 RTMsgError( "Cannot get size of file \"%s\": %Rrc", ValueUnion.psz, vrc);640 RTMsgError(ModifyVM::tr("Cannot get size of file \"%s\": %Rrc"), ValueUnion.psz, vrc); 639 641 rc = E_FAIL; 640 642 break; … … 642 644 if (cbSize > _256K) 643 645 { 644 RTMsgError( "File \"%s\" is bigger than 256KByte", ValueUnion.psz);646 RTMsgError(ModifyVM::tr("File \"%s\" is bigger than 256KByte"), ValueUnion.psz); 645 647 rc = E_FAIL; 646 648 break; … … 650 652 if (RT_FAILURE(vrc)) 651 653 { 652 RTMsgError( "Cannot read contents of file \"%s\": %Rrc", ValueUnion.psz, vrc);654 RTMsgError(ModifyVM::tr("Cannot read contents of file \"%s\": %Rrc"), ValueUnion.psz, vrc); 653 655 rc = E_FAIL; 654 656 break; … … 701 703 else 702 704 { 703 errorArgument( "Invalid --firmware argument '%s'", ValueUnion.psz);705 errorArgument(ModifyVM::tr("Invalid --firmware argument '%s'"), ValueUnion.psz); 704 706 rc = E_FAIL; 705 707 } … … 772 774 else 773 775 { 774 errorArgument( "Invalid --paravirtprovider argument '%s'", ValueUnion.psz);776 errorArgument(ModifyVM::tr("Invalid --paravirtprovider argument '%s'"), ValueUnion.psz); 775 777 rc = E_FAIL; 776 778 } … … 800 802 int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX); 801 803 if (RT_FAILURE(vrc)) 802 return errorSyntax(USAGE_MODIFYVM, "Missing or Invalid argument to '%s'", GetOptState.pDef->pszLong); 804 return errorSyntax(USAGE_MODIFYVM, ModifyVM::tr("Missing or Invalid argument to '%s'"), 805 GetOptState.pDef->pszLong); 803 806 aValue[i] = ValueUnion.u32; 804 807 } … … 943 946 else 944 947 { 945 errorArgument( "Invalid --graphicscontroller argument '%s'", ValueUnion.psz);948 errorArgument(ModifyVM::tr("Invalid --graphicscontroller argument '%s'"), ValueUnion.psz); 946 949 rc = E_FAIL; 947 950 } … … 1009 1012 else 1010 1013 { 1011 errorArgument( "Invalid --biosbootmenu argument '%s'", ValueUnion.psz);1014 errorArgument(ModifyVM::tr("Invalid --biosbootmenu argument '%s'"), ValueUnion.psz); 1012 1015 rc = E_FAIL; 1013 1016 } … … 1033 1036 else 1034 1037 { 1035 errorArgument( "Invalid --biosapic argument '%s'", ValueUnion.psz);1038 errorArgument(ModifyVM::tr("Invalid --biosapic argument '%s'"), ValueUnion.psz); 1036 1039 rc = E_FAIL; 1037 1040 } … … 1080 1083 } 1081 1084 else 1082 return errorArgument( "Invalid boot device '%s'", ValueUnion.psz);1085 return errorArgument(ModifyVM::tr("Invalid boot device '%s'"), ValueUnion.psz); 1083 1086 break; 1084 1087 } … … 1160 1163 else 1161 1164 { 1162 errorArgument( "Invalid --idecontroller argument '%s'", ValueUnion.psz);1165 errorArgument(ModifyVM::tr("Invalid --idecontroller argument '%s'"), ValueUnion.psz); 1163 1166 rc = E_FAIL; 1164 1167 } … … 1190 1193 CHECK_ERROR(sessionMachine, RemoveStorageController(Bstr("SATA").raw())); 1191 1194 else 1192 return errorArgument( "Invalid --usb argument '%s'", ValueUnion.psz);1195 return errorArgument(ModifyVM::tr("Invalid --usb argument '%s'"), ValueUnion.psz); 1193 1196 break; 1194 1197 } … … 1265 1268 } 1266 1269 else 1267 return errorArgument( "Invalid --scsitype argument '%s'", ValueUnion.psz);1270 return errorArgument(ModifyVM::tr("Invalid --scsitype argument '%s'"), ValueUnion.psz); 1268 1271 break; 1269 1272 } … … 1320 1323 if (RT_FAILURE(RTPathReal(ValueUnion.psz + 5, szPathReal, sizeof(szPathReal)))) 1321 1324 { 1322 errorArgument( "Invalid host DVD drive name \"%s\"", ValueUnion.psz + 5);1325 errorArgument(ModifyVM::tr("Invalid host DVD drive name \"%s\""), ValueUnion.psz + 5); 1323 1326 rc = E_FAIL; 1324 1327 break; … … 1328 1331 if (!dvdMedium) 1329 1332 { 1330 errorArgument( "Invalid host DVD drive name \"%s\"", ValueUnion.psz + 5);1333 errorArgument(ModifyVM::tr("Invalid host DVD drive name \"%s\""), ValueUnion.psz + 5); 1331 1334 rc = E_FAIL; 1332 1335 break; … … 1394 1397 if (!floppyMedium) 1395 1398 { 1396 errorArgument( "Invalid host floppy drive name \"%s\"", ValueUnion.psz + 5);1399 errorArgument(ModifyVM::tr("Invalid host floppy drive name \"%s\""), ValueUnion.psz + 5); 1397 1400 rc = E_FAIL; 1398 1401 break; … … 1474 1477 else 1475 1478 { 1476 errorArgument( "Invalid --nicproperty%d argument '%s'", GetOptState.uIndex, ValueUnion.psz);1479 errorArgument(ModifyVM::tr("Invalid --nicproperty%d argument '%s'"), GetOptState.uIndex, ValueUnion.psz); 1477 1480 rc = E_FAIL; 1478 1481 } … … 1481 1484 else 1482 1485 { 1483 RTStrmPrintf(g_pStdErr, "Error: Failed to allocate memory for --nicproperty%d '%s'\n", GetOptState.uIndex, ValueUnion.psz); 1486 RTStrmPrintf(g_pStdErr, ModifyVM::tr("Error: Failed to allocate memory for --nicproperty%d '%s'\n"), 1487 GetOptState.uIndex, ValueUnion.psz); 1484 1488 rc = E_FAIL; 1485 1489 } … … 1536 1540 else 1537 1541 { 1538 errorArgument("Invalid NIC type '%s' specified for NIC %u", ValueUnion.psz, GetOptState.uIndex); 1542 errorArgument(ModifyVM::tr("Invalid NIC type '%s' specified for NIC %u"), 1543 ValueUnion.psz, GetOptState.uIndex); 1539 1544 rc = E_FAIL; 1540 1545 } … … 1570 1575 if (ValueUnion.u32 > 4) 1571 1576 { 1572 errorArgument( "Invalid boot priority '%u' specfied for NIC %u", ValueUnion.u32, GetOptState.uIndex);1577 errorArgument(ModifyVM::tr("Invalid boot priority '%u' specfied for NIC %u"), ValueUnion.u32, GetOptState.uIndex); 1573 1578 rc = E_FAIL; 1574 1579 } … … 1592 1597 else 1593 1598 { 1594 errorArgument( "Unknown promiscuous mode policy '%s'", ValueUnion.psz);1599 errorArgument(ModifyVM::tr("Unknown promiscuous mode policy '%s'"), ValueUnion.psz); 1595 1600 rc = E_INVALIDARG; 1596 1601 break; … … 1719 1724 else 1720 1725 { 1721 errorArgument( "Invalid type '%s' specfied for NIC %u", ValueUnion.psz, GetOptState.uIndex);1726 errorArgument(ModifyVM::tr("Invalid type '%s' specfied for NIC %u"), ValueUnion.psz, GetOptState.uIndex); 1722 1727 rc = E_FAIL; 1723 1728 } … … 1890 1895 } 1891 1896 1892 #define ITERATE_TO_NEXT_TERM(ch) \1893 do { \1894 while (*ch != ',') \1895 { \1896 if (*ch == 0) \1897 { \1898 return errorSyntax(USAGE_MODIFYVM, \1899 "Missing or Invalid argument to '%s'", \1900 GetOptState.pDef->pszLong); \1901 } \1902 ch++; \1903 } \1904 *ch = '\0'; \1905 ch++; \1897 #define ITERATE_TO_NEXT_TERM(ch) \ 1898 do { \ 1899 while (*ch != ',') \ 1900 { \ 1901 if (*ch == 0) \ 1902 { \ 1903 return errorSyntax(USAGE_MODIFYVM, \ 1904 ModifyVM::tr("Missing or Invalid argument to '%s'"), \ 1905 GetOptState.pDef->pszLong); \ 1906 } \ 1907 ch++; \ 1908 } \ 1909 *ch = '\0'; \ 1910 ch++; \ 1906 1911 } while(0) 1907 1912 … … 1981 1986 else 1982 1987 { 1983 errorArgument( "Invalid proto '%s' specfied for NIC %u", ValueUnion.psz, GetOptState.uIndex);1988 errorArgument(ModifyVM::tr("Invalid proto '%s' specfied for NIC %u"), ValueUnion.psz, GetOptState.uIndex); 1984 1989 rc = E_FAIL; 1985 1990 break; … … 1997 2002 vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_STRING); 1998 2003 if (RT_FAILURE(vrc)) 1999 return errorSyntax(USAGE_MODIFYVM, "Not enough parameters");2004 return errorSyntax(USAGE_MODIFYVM, ModifyVM::tr("Not enough parameters")); 2000 2005 CHECK_ERROR(engine, RemoveRedirect(Bstr(ValueUnion.psz).raw())); 2001 2006 } … … 2199 2204 else 2200 2205 { 2201 errorArgument( "Invalid type '%s' specfied for pointing device", ValueUnion.psz);2206 errorArgument(ModifyVM::tr("Invalid type '%s' specfied for pointing device"), ValueUnion.psz); 2202 2207 rc = E_FAIL; 2203 2208 } … … 2244 2249 else 2245 2250 { 2246 errorArgument( "Invalid type '%s' specfied for keyboard", ValueUnion.psz);2251 errorArgument(ModifyVM::tr("Invalid type '%s' specfied for keyboard"), ValueUnion.psz); 2247 2252 rc = E_FAIL; 2248 2253 } … … 2290 2295 if (RT_FAILURE(vrc)) 2291 2296 return errorSyntax(USAGE_MODIFYVM, 2292 "Missing or Invalid argument to '%s'",2297 ModifyVM::tr("Missing or Invalid argument to '%s'"), 2293 2298 GetOptState.pDef->pszLong); 2294 2299 … … 2349 2354 else 2350 2355 return errorSyntax(USAGE_MODIFYVM, 2351 "Invalid argument to '%s'",2356 ModifyVM::tr("Invalid argument to '%s'"), 2352 2357 GetOptState.pDef->pszLong); 2353 2358 break; … … 2371 2376 if (RT_FAILURE(vrc)) 2372 2377 return errorSyntax(USAGE_MODIFYVM, 2373 "Missing or Invalid argument to '%s'",2378 ModifyVM::tr("Missing or Invalid argument to '%s'"), 2374 2379 GetOptState.pDef->pszLong); 2375 2380 … … 2378 2383 vrc = RTStrToUInt32Ex(pszIOBase, NULL, 0, &uVal); 2379 2384 if (vrc != VINF_SUCCESS || uVal == 0) 2380 return errorArgument( "Error parsing UART I/O base '%s'", pszIOBase);2385 return errorArgument(ModifyVM::tr("Error parsing UART I/O base '%s'"), pszIOBase); 2381 2386 CHECK_ERROR(uart, COMSETTER(IOBase)(uVal)); 2382 2387 … … 2415 2420 if (RT_FAILURE(vrc)) 2416 2421 return errorSyntax(USAGE_MODIFYVM, 2417 "Missing or Invalid argument to '%s'",2422 ModifyVM::tr("Missing or Invalid argument to '%s'"), 2418 2423 GetOptState.pDef->pszLong); 2419 2424 … … 2422 2427 vrc = RTStrToUInt32Ex(pszIOBase, NULL, 0, &uVal); 2423 2428 if (vrc != VINF_SUCCESS || uVal == 0) 2424 return errorArgument( "Error parsing LPT I/O base '%s'", pszIOBase);2429 return errorArgument(ModifyVM::tr("Error parsing LPT I/O base '%s'"), pszIOBase); 2425 2430 CHECK_ERROR(lpt, COMSETTER(IOBase)(uVal)); 2426 2431 … … 2451 2456 else 2452 2457 { 2453 errorArgument( "Invalid --audiocontroller argument '%s'", ValueUnion.psz);2458 errorArgument(ModifyVM::tr("Invalid --audiocontroller argument '%s'"), ValueUnion.psz); 2454 2459 rc = E_FAIL; 2455 2460 } … … 2473 2478 else 2474 2479 { 2475 errorArgument( "Invalid --audiocodec argument '%s'", ValueUnion.psz);2480 errorArgument(ModifyVM::tr("Invalid --audiocodec argument '%s'"), ValueUnion.psz); 2476 2481 rc = E_FAIL; 2477 2482 } … … 2545 2550 else 2546 2551 { 2547 errorArgument( "Invalid --audio argument '%s'", ValueUnion.psz);2552 errorArgument(ModifyVM::tr("Invalid --audio argument '%s'"), ValueUnion.psz); 2548 2553 rc = E_FAIL; 2549 2554 } … … 2585 2590 else 2586 2591 { 2587 errorArgument( "Invalid --clipboard-mode argument '%s'", ValueUnion.psz);2592 errorArgument(ModifyVM::tr("Invalid --clipboard-mode argument '%s'"), ValueUnion.psz); 2588 2593 rc = E_FAIL; 2589 2594 } … … 2605 2610 else 2606 2611 { 2607 errorArgument( "Invalid --clipboard-file-transfers argument '%s'", ValueUnion.psz);2612 errorArgument(ModifyVM::tr("Invalid --clipboard-file-transfers argument '%s'"), ValueUnion.psz); 2608 2613 rc = E_FAIL; 2609 2614 } … … 2630 2635 else 2631 2636 { 2632 errorArgument( "Invalid --draganddrop argument '%s'", ValueUnion.psz);2637 errorArgument(ModifyVM::tr("Invalid --draganddrop argument '%s'"), ValueUnion.psz); 2633 2638 rc = E_FAIL; 2634 2639 } … … 2684 2689 RTStrFree(pszProperty); 2685 2690 2686 errorArgument( "Invalid --vrdeproperty argument '%s'", ValueUnion.psz);2691 errorArgument(ModifyVM::tr("Invalid --vrdeproperty argument '%s'"), ValueUnion.psz); 2687 2692 rc = E_FAIL; 2688 2693 break; … … 2692 2697 else 2693 2698 { 2694 RTStrmPrintf(g_pStdErr, "Error: Failed to allocate memory for VRDE property '%s'\n", ValueUnion.psz); 2699 RTStrmPrintf(g_pStdErr, ModifyVM::tr("Error: Failed to allocate memory for VRDE property '%s'\n"), 2700 ValueUnion.psz); 2695 2701 rc = E_FAIL; 2696 2702 } … … 2753 2759 else 2754 2760 { 2755 errorArgument( "Invalid --vrdeauthtype argument '%s'", ValueUnion.psz);2761 errorArgument(ModifyVM::tr("Invalid --vrdeauthtype argument '%s'"), ValueUnion.psz); 2756 2762 rc = E_FAIL; 2757 2763 } … … 2851 2857 if (RT_FAILURE(vrc)) 2852 2858 return errorSyntax(USAGE_MODIFYVM, 2853 "Missing or Invalid argument to '%s'",2859 ModifyVM::tr("Missing or Invalid argument to '%s'"), 2854 2860 GetOptState.pDef->pszLong); 2855 2861 const char *pszNewName = ValueUnion.psz; … … 2872 2878 if (!fRenamed) 2873 2879 { 2874 errorArgument( "Invalid --usbrename parameters, nothing renamed");2880 errorArgument(ModifyVM::tr("Invalid --usbrename parameters, nothing renamed")); 2875 2881 rc = E_FAIL; 2876 2882 } … … 3076 3082 if (!fIoApic) 3077 3083 { 3078 RTStrmPrintf(g_pStdErr, "*** I/O APIC must be enabled for ICH9, enabling. ***\n");3084 RTStrmPrintf(g_pStdErr, ModifyVM::tr("*** I/O APIC must be enabled for ICH9, enabling. ***\n")); 3079 3085 CHECK_ERROR(biosSettings, COMSETTER(IOAPICEnabled)(TRUE)); 3080 3086 } … … 3082 3088 else 3083 3089 { 3084 errorArgument( "Invalid --chipset argument '%s' (valid: piix3,ich9)", ValueUnion.psz);3090 errorArgument(ModifyVM::tr("Invalid --chipset argument '%s' (valid: piix3,ich9)"), ValueUnion.psz); 3085 3091 rc = E_FAIL; 3086 3092 } … … 3100 3106 CHECK_ERROR(sessionMachine, COMSETTER(IommuType)(IommuType_Intel)); 3101 3107 #else 3102 errorArgument( "Invalid --iommu argument '%s' (valid: none,amd,automatic)", ValueUnion.psz);3108 errorArgument(ModifyVM::tr("Invalid --iommu argument '%s' (valid: none,amd,automatic)"), ValueUnion.psz); 3103 3109 rc = E_FAIL; 3104 3110 #endif … … 3109 3115 #ifndef VBOX_WITH_IOMMU_INTEL 3110 3116 RTStrmPrintf(g_pStdErr, 3111 "Warning: On Intel hosts, 'automatic' will not enable an IOMMU since the Intel IOMMU device is not supported yet.\n");3117 ModifyVM::tr("Warning: On Intel hosts, 'automatic' will not enable an IOMMU since the Intel IOMMU device is not supported yet.\n")); 3112 3118 #endif 3113 3119 } 3114 3120 else 3115 3121 { 3116 errorArgument( "Invalid --iommu argument '%s'", ValueUnion.psz);3122 errorArgument(ModifyVM::tr("Invalid --iommu argument '%s'"), ValueUnion.psz); 3117 3123 rc = E_FAIL; 3118 3124 } … … 3139 3145 else 3140 3146 { 3141 errorArgument( "Invalid --tpm-type argument '%s'", ValueUnion.psz);3147 errorArgument(ModifyVM::tr("Invalid --tpm-type argument '%s'"), ValueUnion.psz); 3142 3148 rc = E_FAIL; 3143 3149 } … … 3196 3202 if (parseScreens(ValueUnion.psz, &screens)) 3197 3203 { 3198 errorArgument( "Invalid list of screens specified\n");3204 errorArgument(ModifyVM::tr("Invalid list of screens specified\n")); 3199 3205 rc = E_FAIL; 3200 3206 break; … … 3218 3224 if (RT_FAILURE(vrc)) 3219 3225 { 3220 errorArgument( "Cannot convert filename \"%s\" to absolute path\n", ValueUnion.psz);3226 errorArgument(ModifyVM::tr("Cannot convert filename \"%s\" to absolute path\n"), ValueUnion.psz); 3221 3227 rc = E_FAIL; 3222 3228 break; … … 3248 3254 if (RT_FAILURE(vrc) || vrc != VWRN_TRAILING_CHARS || !pszNext || *pszNext != 'x') 3249 3255 { 3250 errorArgument("Error parsing video resolution '%s' (expected <width>x<height>)", ValueUnion.psz); 3256 errorArgument(ModifyVM::tr("Error parsing video resolution '%s' (expected <width>x<height>)"), 3257 ValueUnion.psz); 3251 3258 rc = E_FAIL; 3252 3259 break; … … 3256 3263 if (vrc != VINF_SUCCESS) 3257 3264 { 3258 errorArgument("Error parsing video resolution '%s' (expected <width>x<height>)", ValueUnion.psz); 3265 errorArgument(ModifyVM::tr("Error parsing video resolution '%s' (expected <width>x<height>)"), 3266 ValueUnion.psz); 3259 3267 rc = E_FAIL; 3260 3268 break; … … 3330 3338 else 3331 3339 { 3332 errorArgument("Invalid --autostop-type argument '%s' (valid: disabled, savestate, poweroff, acpishutdown)", ValueUnion.psz); 3340 errorArgument(ModifyVM::tr("Invalid --autostop-type argument '%s' (valid: disabled, savestate, poweroff, acpishutdown)"), 3341 ValueUnion.psz); 3333 3342 rc = E_FAIL; 3334 3343 } … … 3349 3358 if (iHostAddr == -1 || iGuestAddr == -1) 3350 3359 { 3351 errorArgument("Invalid --pciattach argument '%s' (valid: 'HB:HD.HF@GB:GD.GF' or just 'HB:HD.HF')", ValueUnion.psz); 3360 errorArgument(ModifyVM::tr("Invalid --pciattach argument '%s' (valid: 'HB:HD.HF@GB:GD.GF' or just 'HB:HD.HF')"), 3361 ValueUnion.psz); 3352 3362 rc = E_FAIL; 3353 3363 } … … 3366 3376 if (iHostAddr == -1) 3367 3377 { 3368 errorArgument( "Invalid --pcidetach argument '%s' (valid: 'HB:HD.HF')", ValueUnion.psz);3378 errorArgument(ModifyVM::tr("Invalid --pcidetach argument '%s' (valid: 'HB:HD.HF')"), ValueUnion.psz); 3369 3379 rc = E_FAIL; 3370 3380 } … … 3400 3410 if (enmPriority == VMProcPriority_Invalid) 3401 3411 { 3402 errorArgument( "Invalid --vm-process-priority '%s'", ValueUnion.psz);3412 errorArgument(ModifyVM::tr("Invalid --vm-process-priority '%s'"), ValueUnion.psz); 3403 3413 rc = E_FAIL; 3404 3414 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageNATNetwork.cpp
r88757 r92372 58 58 #ifndef VBOX_ONLY_DOCS 59 59 60 DECLARE_TRANSLATION_CONTEXT(Nat); 61 60 62 using namespace com; 61 63 … … 94 96 95 97 CHECK_ERROR_BREAK(pNATNet, COMGETTER(NetworkName)(strVal.asOutParam())); 96 RTPrintf( "Name: %ls\n", strVal.raw());98 RTPrintf(Nat::tr("Name: %ls\n"), strVal.raw()); 97 99 98 100 CHECK_ERROR_BREAK(pNATNet, COMGETTER(Network)(strVal.asOutParam())); 99 RTPrintf( "Network: %ls\n", strVal.raw());101 RTPrintf(Nat::tr("Network: %ls\n"), strVal.raw()); 100 102 101 103 CHECK_ERROR_BREAK(pNATNet, COMGETTER(Gateway)(strVal.asOutParam())); 102 RTPrintf( "Gateway: %ls\n", strVal.raw());104 RTPrintf(Nat::tr("Gateway: %ls\n"), strVal.raw()); 103 105 104 106 CHECK_ERROR_BREAK(pNATNet, COMGETTER(NeedDhcpServer)(&fVal)); 105 RTPrintf( "DHCP Sever: %s\n", fVal ? "Yes" : "No");107 RTPrintf(Nat::tr("DHCP Sever: %s\n"), fVal ? Nat::tr("Yes") : Nat::tr("No")); 106 108 107 109 CHECK_ERROR_BREAK(pNATNet, COMGETTER(IPv6Enabled)(&fVal)); 108 RTPrintf( "IPv6: %s\n", fVal ? "Yes" : "No");110 RTPrintf(Nat::tr("IPv6: %s\n"), fVal ? Nat::tr("Yes") : Nat::tr("No")); 109 111 110 112 CHECK_ERROR_BREAK(pNATNet, COMGETTER(IPv6Prefix)(strVal.asOutParam())); 111 RTPrintf( "IPv6 Prefix: %ls\n", strVal.raw());113 RTPrintf(Nat::tr("IPv6 Prefix: %ls\n"), strVal.raw()); 112 114 113 115 CHECK_ERROR_BREAK(pNATNet, COMGETTER(AdvertiseDefaultIPv6RouteEnabled)(&fVal)); 114 RTPrintf( "IPv6 Default: %s\n", fVal ? "Yes" : "No");116 RTPrintf(Nat::tr("IPv6 Default: %s\n"), fVal ? Nat::tr("Yes") : Nat::tr("No")); 115 117 116 118 117 119 CHECK_ERROR_BREAK(pNATNet, COMGETTER(Enabled)(&fVal)); 118 RTPrintf( "Enabled: %s\n", fVal ? "Yes" : "No");120 RTPrintf(Nat::tr("Enabled: %s\n"), fVal ? Nat::tr("Yes") : Nat::tr("No")); 119 121 /** @todo Add more information here. */ 120 122 RTPrintf("\n"); … … 129 131 HRESULT rc; 130 132 131 RTPrintf( "NAT Networks:\n\n");133 RTPrintf(Nat::tr("NAT Networks:\n\n")); 132 134 133 135 const char *pszFilter = NULL; … … 163 165 164 166 if (SUCCEEDED(rc)) 165 RTPrintf( "%zu %s found\n", cFound, cFound == 1 ? "network" : "networks");167 RTPrintf(Nat::tr("%zu %s found\n"), cFound, cFound == 1 ? Nat::tr("network") : Nat::tr("networks", "", cFound)); 166 168 167 169 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; … … 171 173 { 172 174 if (a->argc - 1 <= 1) 173 return errorSyntax(USAGE_NATNETWORK, "Not enough parameters");175 return errorSyntax(USAGE_NATNETWORK, Nat::tr("Not enough parameters")); 174 176 175 177 const char *pNetName = NULL; … … 218 220 case 't': // --netname 219 221 if (pNetName) 220 return errorSyntax(USAGE_NATNETWORK, "You can only specify --netname only once.");222 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You can only specify --netname only once.")); 221 223 pNetName = ValueUnion.psz; 222 224 break; … … 224 226 case 'n': // --network 225 227 if (pPrefixIPv4) 226 return errorSyntax(USAGE_NATNETWORK, "You can only specify --network only once.");228 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You can only specify --network only once.")); 227 229 pPrefixIPv4 = ValueUnion.psz; 228 230 break; … … 230 232 case 'e': // --enable 231 233 if (enable >= 0) 232 return errorSyntax(USAGE_NATNETWORK, "You can specify either --enable or --disable once.");234 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You can specify either --enable or --disable once.")); 233 235 enable = 1; 234 236 break; … … 236 238 case 'd': // --disable 237 239 if (enable >= 0) 238 return errorSyntax(USAGE_NATNETWORK, "You can specify either --enable or --disable once.");240 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You can specify either --enable or --disable once.")); 239 241 enable = 0; 240 242 break; … … 242 244 case 'h': 243 245 if (dhcp != -1) 244 return errorSyntax(USAGE_NATNETWORK, "You can specify --dhcp only once.");246 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You can specify --dhcp only once.")); 245 247 dhcp = ValueUnion.f; 246 248 break; … … 248 250 case '6': 249 251 if (ipv6 != -1) 250 return errorSyntax(USAGE_NATNETWORK, "You can specify --ipv6 only once.");252 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You can specify --ipv6 only once.")); 251 253 ipv6 = ValueUnion.f; 252 254 break; … … 254 256 case NATNET_CMD_OPT_IPV6_PREFIX: 255 257 if (pPrefixIPv6) 256 return errorSyntax(USAGE_NATNETWORK, "You can specify --ipv6-prefix only once.");258 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You can specify --ipv6-prefix only once.")); 257 259 pPrefixIPv6 = ValueUnion.psz; 258 260 break; … … 265 267 if (enmCode != OP_MODIFY) 266 268 errorSyntax(USAGE_NATNETWORK, 267 "loopback couldn't be deleted on modified\n");269 Nat::tr("loopback couldn't be deleted on modified\n")); 268 270 if (c == 'L') 269 271 loopback6Offset = -1; … … 277 279 if (RT_FAILURE(vrc)) 278 280 return errorSyntax(USAGE_NATNETWORK, 279 "Not enough parmaters\n");281 Nat::tr("Not enough parmaters\n")); 280 282 281 283 vLoopback2Delete.push_back(std::string(Addr2Delete.psz)); … … 302 304 int irc = netPfStrToPf(ValueUnion.psz, (c == 'P'), &Pfr); 303 305 if (RT_FAILURE(irc)) 304 return errorSyntax(USAGE_NATNETWORK, "Invalid port-forward rule %s\n", ValueUnion.psz);306 return errorSyntax(USAGE_NATNETWORK, Nat::tr("Invalid port-forward rule %s\n"), ValueUnion.psz); 305 307 306 308 vPf2Add.push_back(Pfr); … … 311 313 if (enmCode != OP_MODIFY) 312 314 return errorSyntax(USAGE_NATNETWORK, 313 "Port-forward could be deleted on modify \n");315 Nat::tr("Port-forward could be deleted on modify \n")); 314 316 315 317 RTGETOPTUNION NamePf2DeleteUnion; 316 318 int vrc = RTGetOptFetchValue(&GetState, &NamePf2DeleteUnion, RTGETOPT_REQ_STRING); 317 319 if (RT_FAILURE(vrc)) 318 return errorSyntax(USAGE_NATNETWORK, "Not enough parmaters\n");320 return errorSyntax(USAGE_NATNETWORK, Nat::tr("Not enough parmaters\n")); 319 321 320 322 if (strlen(NamePf2DeleteUnion.psz) > PF_NAMELEN) 321 return errorSyntax(USAGE_NATNETWORK, "Port-forward rule name is too long\n");323 return errorSyntax(USAGE_NATNETWORK, Nat::tr("Port-forward rule name is too long\n")); 322 324 323 325 PFNAME2DELETE Name2Delete; … … 336 338 337 339 if (!pNetName) 338 return errorSyntax(USAGE_NATNETWORK, "You need to specify the --netname option");340 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You need to specify the --netname option")); 339 341 /* verification */ 340 342 switch (enmCode) … … 342 344 case OP_ADD: 343 345 if (!pPrefixIPv4) 344 return errorSyntax(USAGE_NATNETWORK, "You need to specify the --network option");346 return errorSyntax(USAGE_NATNETWORK, Nat::tr("You need to specify the --network option")); 345 347 break; 346 348 case OP_MODIFY: … … 350 352 break; 351 353 default: 352 AssertMsgFailedReturn(( "Unknown operation (:%d)", enmCode), RTEXITCODE_FAILURE);354 AssertMsgFailedReturn((Nat::tr("Unknown operation (:%d)"), enmCode), RTEXITCODE_FAILURE); 353 355 } 354 356 … … 362 364 { 363 365 if (SUCCEEDED(rc)) 364 return errorArgument( "NATNetwork server already exists");366 return errorArgument(Nat::tr("NATNetwork server already exists")); 365 367 366 368 CHECK_ERROR(a->virtualBox, CreateNATNetwork(NetName.raw(), net.asOutParam())); 367 369 if (FAILED(rc)) 368 return errorArgument( "Failed to create the NAT network service");370 return errorArgument(Nat::tr("Failed to create the NAT network service")); 369 371 } 370 372 else if (FAILED(rc)) 371 return errorArgument( "NATNetwork server does not exist");373 return errorArgument(Nat::tr("NATNetwork server does not exist")); 372 374 373 375 switch (enmCode) … … 380 382 CHECK_ERROR(net, COMSETTER(Network)(Bstr(pPrefixIPv4).raw())); 381 383 if (FAILED(rc)) 382 return errorArgument( "Failed to set configuration");384 return errorArgument(Nat::tr("Failed to set configuration")); 383 385 } 384 386 if (dhcp >= 0) … … 386 388 CHECK_ERROR(net, COMSETTER(NeedDhcpServer) ((BOOL)dhcp)); 387 389 if (FAILED(rc)) 388 return errorArgument( "Failed to set configuration");390 return errorArgument(Nat::tr("Failed to set configuration")); 389 391 } 390 392 … … 398 400 CHECK_ERROR(net, COMSETTER(IPv6Enabled)(FALSE)); 399 401 if (FAILED(rc)) 400 return errorArgument( "Failed to set configuration");402 return errorArgument(Nat::tr("Failed to set configuration")); 401 403 } 402 404 … … 405 407 CHECK_ERROR(net, COMSETTER(IPv6Prefix)(Bstr(pPrefixIPv6).raw())); 406 408 if (FAILED(rc)) 407 return errorArgument( "Failed to set configuration");409 return errorArgument(Nat::tr("Failed to set configuration")); 408 410 } 409 411 … … 416 418 CHECK_ERROR(net, COMSETTER(IPv6Enabled)(TRUE)); 417 419 if (FAILED(rc)) 418 return errorArgument( "Failed to set configuration");420 return errorArgument(Nat::tr("Failed to set configuration")); 419 421 } 420 422 … … 427 429 Bstr((*it).szName).raw())); 428 430 if (FAILED(rc)) 429 return errorArgument( "Failed to delete pf");431 return errorArgument(Nat::tr("Failed to delete pf")); 430 432 } 431 433 } … … 452 454 (*it).u16PfrGuestPort)); 453 455 if (FAILED(rc)) 454 return errorArgument( "Failed to add pf");456 return errorArgument(Nat::tr("Failed to add pf")); 455 457 } 456 458 } … … 478 480 Bstr bstrAddress; 479 481 480 AssertReturn(pos != std::string::npos, errorArgument( "invalid loopback string"));482 AssertReturn(pos != std::string::npos, errorArgument(Nat::tr("invalid loopback string"))); 481 483 482 484 address = it->substr(0, pos); … … 484 486 485 487 lOffset = RTStrToUInt32(strOffset.c_str()); 486 AssertReturn(lOffset > 0, errorArgument( "invalid loopback string"));488 AssertReturn(lOffset > 0, errorArgument(Nat::tr("invalid loopback string"))); 487 489 488 490 bstrAddress = Bstr(address.c_str()); … … 511 513 CHECK_ERROR(net, COMSETTER(Enabled) ((BOOL)enable)); 512 514 if (FAILED(rc)) 513 return errorArgument( "Failed to set configuration");515 return errorArgument(Nat::tr("Failed to set configuration")); 514 516 } 515 517 break; … … 519 521 CHECK_ERROR(a->virtualBox, RemoveNATNetwork(net)); 520 522 if (FAILED(rc)) 521 return errorArgument( "Failed to remove nat network");523 return errorArgument(Nat::tr("Failed to remove nat network")); 522 524 break; 523 525 } … … 526 528 CHECK_ERROR(net, Start()); 527 529 if (FAILED(rc)) 528 return errorArgument( "Failed to start network");530 return errorArgument(Nat::tr("Failed to start network")); 529 531 break; 530 532 } … … 533 535 CHECK_ERROR(net, Stop()); 534 536 if (FAILED(rc)) 535 return errorArgument( "Failed to stop network");537 return errorArgument(Nat::tr("Failed to stop network")); 536 538 break; 537 539 } … … 545 547 { 546 548 if (a->argc < 1) 547 return errorSyntax(USAGE_NATNETWORK, "Not enough parameters");549 return errorSyntax(USAGE_NATNETWORK, Nat::tr("Not enough parameters")); 548 550 549 551 RTEXITCODE rcExit; … … 561 563 rcExit = handleNATList(a); 562 564 else 563 rcExit = errorSyntax(USAGE_NATNETWORK, "Invalid parameter '%s'", Utf8Str(a->argv[0]).c_str());565 rcExit = errorSyntax(USAGE_NATNETWORK, Nat::tr("Invalid parameter '%s'"), Utf8Str(a->argv[0]).c_str()); 564 566 return rcExit; 565 567 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
r85138 r92372 34 34 #include "VBoxManage.h" 35 35 using namespace com; 36 37 DECLARE_TRANSLATION_CONTEXT(Snapshot); 36 38 37 39 /** … … 194 196 if (FAILED(hrc)) 195 197 { 196 RTPrintf( "This machine does not have any snapshots\n");198 RTPrintf(Snapshot::tr("This machine does not have any snapshots\n")); 197 199 return RTEXITCODE_FAILURE; 198 200 } … … 250 252 CHECK_ERROR_BREAK(pBaseMedium, COMGETTER(Name)(bstrBaseMediumName.asOutParam())); 251 253 252 RTPrintf( "[%RI32] Images and snapshots for medium \"%ls\"\n", i, bstrBaseMediumName.raw());254 RTPrintf(Snapshot::tr("[%RI32] Images and snapshots for medium \"%ls\"\n"), i, bstrBaseMediumName.raw()); 253 255 254 256 DumpMediumWithChildren(pCurrentStateMedium, … … 325 327 /* we need at least a VM and a command */ 326 328 if (a->argc < 2) 327 return errorSyntax( "Not enough parameters");329 return errorSyntax(Snapshot::tr("Not enough parameters")); 328 330 329 331 /* the first argument must be the VM */ … … 355 357 if (a->argc < 3) 356 358 { 357 errorSyntax( "Missing snapshot name");359 errorSyntax(Snapshot::tr("Missing snapshot name")); 358 360 rc = E_FAIL; 359 361 break; … … 400 402 vrc = parseSnapshotUniqueFlags(Value.psz, &enmUnique); 401 403 if (RT_FAILURE(vrc)) 402 return errorArgument( "Invalid unique name description '%s'", Value.psz);404 return errorArgument(Snapshot::tr("Invalid unique name description '%s'"), Value.psz); 403 405 break; 404 406 … … 463 465 if (SUCCEEDED(rc)) 464 466 { 465 errorArgument( "Failed to generate a unique snapshot name");467 errorArgument(Snapshot::tr("Failed to generate a unique snapshot name")); 466 468 rc = E_FAIL; 467 469 break; … … 479 481 rc = showProgress(progress); 480 482 if (SUCCEEDED(rc)) 481 RTPrintf( "Snapshot taken. UUID: %ls\n", snapId.raw());483 RTPrintf(Snapshot::tr("Snapshot taken. UUID: %ls\n"), snapId.raw()); 482 484 else 483 CHECK_PROGRESS_ERROR(progress, ( "Failed to take snapshot"));485 CHECK_PROGRESS_ERROR(progress, (Snapshot::tr("Failed to take snapshot"))); 484 486 } 485 487 else if ( (fDelete = !strcmp(a->argv[1], "delete")) … … 496 498 if (a->argc > 2) 497 499 { 498 errorSyntax( "Too many arguments");500 errorSyntax(Snapshot::tr("Too many arguments")); 499 501 rc = E_FAIL; 500 502 break; … … 504 506 else if (a->argc != 3) 505 507 { 506 errorSyntax( "Expecting snapshot name only");508 errorSyntax(Snapshot::tr("Expecting snapshot name only")); 507 509 rc = E_FAIL; 508 510 break; … … 516 518 if (pSnapshot.isNull()) 517 519 { 518 RTPrintf( "This machine does not have any snapshots\n");520 RTPrintf(Snapshot::tr("This machine does not have any snapshots\n")); 519 521 return RTEXITCODE_FAILURE; 520 522 } … … 535 537 ComPtr<IProgress> pProgress; 536 538 537 RTPrintf( "%s snapshot '%ls' (%ls)\n",538 fDelete ? "Deleting" : "Restoring", bstrSnapName.raw(), bstrSnapGuid.raw());539 RTPrintf(Snapshot::tr("%s snapshot '%ls' (%ls)\n"), 540 fDelete ? Snapshot::tr("Deleting") : Snapshot::tr("Restoring"), bstrSnapName.raw(), bstrSnapGuid.raw()); 539 541 540 542 if (fDelete) … … 550 552 551 553 rc = showProgress(pProgress); 552 CHECK_PROGRESS_ERROR(pProgress, ( "Snapshot operation failed"));554 CHECK_PROGRESS_ERROR(pProgress, (Snapshot::tr("Snapshot operation failed"))); 553 555 } 554 556 else if (!strcmp(a->argv[1], "edit")) … … 557 559 if (a->argc < 3) 558 560 { 559 errorSyntax( "Missing snapshot name");561 errorSyntax(Snapshot::tr("Missing snapshot name")); 560 562 rc = E_FAIL; 561 563 break; … … 590 592 if (pSnapshot.isNull()) 591 593 { 592 RTPrintf( "This machine does not have any snapshots\n");594 RTPrintf(Snapshot::tr("This machine does not have any snapshots\n")); 593 595 return RTEXITCODE_FAILURE; 594 596 } … … 624 626 if (a->argc != 3) 625 627 { 626 errorSyntax( "Expecting snapshot name only");628 errorSyntax(Snapshot::tr("Expecting snapshot name only")); 627 629 rc = E_FAIL; 628 630 break; … … 648 650 else 649 651 { 650 errorSyntax( "Invalid parameter '%s'", a->argv[1]);652 errorSyntax(Snapshot::tr("Invalid parameter '%s'"), a->argv[1]); 651 653 rc = E_FAIL; 652 654 } … … 657 659 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 658 660 } 659 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r82968 r92372 39 39 using namespace com; 40 40 41 DECLARE_TRANSLATION_CONTEXT(Storage); 41 42 42 43 // funcs … … 165 166 devTypeRequested = DeviceType_DVD; 166 167 else 167 return errorArgument( "Invalid --type argument '%s'", ValueUnion.psz);168 return errorArgument(Storage::tr("Invalid --type argument '%s'"), ValueUnion.psz); 168 169 } 169 170 else … … 304 305 int vrc = parseMediumType(ValueUnion.psz, &enmMediumType); 305 306 if (RT_FAILURE(vrc)) 306 return errorArgument( "Invalid medium type '%s'", ValueUnion.psz);307 return errorArgument(Storage::tr("Invalid medium type '%s'"), ValueUnion.psz); 307 308 fSetMediumType = true; 308 309 break; … … 326 327 327 328 if (!pszCtl) 328 return errorSyntax(USAGE_STORAGEATTACH, "Storage controller name not specified");329 return errorSyntax(USAGE_STORAGEATTACH, Storage::tr("Storage controller name not specified")); 329 330 330 331 /* get the virtualbox system properties */ … … 346 347 { 347 348 if (pszPassThrough) 348 throw Utf8Str( "Drive passthrough state cannot be changed while the VM is running\n");349 throw Utf8Str(Storage::tr("Drive passthrough state cannot be changed while the VM is running\n")); 349 350 else if (pszBandwidthGroup) 350 throw Utf8Str( "Bandwidth group cannot be changed while the VM is running\n");351 throw Utf8Str(Storage::tr("Bandwidth group cannot be changed while the VM is running\n")); 351 352 } 352 353 … … 355 356 storageCtl.asOutParam()); 356 357 if (FAILED(rc)) 357 throw Utf8StrFmt( "Could not find a controller named '%s'\n", pszCtl);358 throw Utf8StrFmt(Storage::tr("Could not find a controller named '%s'\n"), pszCtl); 358 359 359 360 StorageBus_T storageBus = StorageBus_Null; … … 369 370 port = 0; 370 371 else 371 return errorSyntax(USAGE_STORAGEATTACH, "Port not specified");372 return errorSyntax(USAGE_STORAGEATTACH, Storage::tr("Port not specified")); 372 373 } 373 374 if (device == ~0U) … … 376 377 device = 0; 377 378 else 378 return errorSyntax(USAGE_STORAGEATTACH, "Device not specified");379 return errorSyntax(USAGE_STORAGEATTACH, Storage::tr("Device not specified")); 379 380 } 380 381 … … 440 441 || deviceType == DeviceType_Floppy) 441 442 ) 442 throw Utf8StrFmt( "No DVD/Floppy Drive attached to the controller '%s'"443 "at the port: %u, device: %u", pszCtl, port, device);443 throw Utf8StrFmt(Storage::tr("No DVD/Floppy Drive attached to the controller '%s'" 444 "at the port: %u, device: %u"), pszCtl, port, device); 444 445 445 446 } … … 460 461 461 462 if (!driveCheck) 462 throw Utf8StrFmt( "The attachment is not supported by the storage controller '%s'", pszCtl);463 throw Utf8StrFmt(Storage::tr("The attachment is not supported by the storage controller '%s'"), pszCtl); 463 464 464 465 if (storageBus == StorageBus_Floppy) … … 515 516 strIso = Utf8Str(bstrIso); 516 517 if (strIso.isEmpty()) 517 throw Utf8Str( "Cannot find the Guest Additions ISO image\n");518 throw Utf8Str(Storage::tr("Cannot find the Guest Additions ISO image\n")); 518 519 pszMedium = strIso.c_str(); 519 520 if (devTypeRequested == DeviceType_Null) … … 541 542 542 543 if (devTypeRequested == DeviceType_Null) // still the initializer value? 543 throw Utf8Str( "Argument --type must be specified\n");544 throw Utf8Str(Storage::tr("Argument --type must be specified\n")); 544 545 545 546 /* check if the device type is supported by the controller */ … … 555 556 driveCheck++; 556 557 if (!driveCheck) 557 throw Utf8StrFmt( "The given attachment is not supported by the storage controller '%s'", pszCtl);558 throw Utf8StrFmt(Storage::tr("The given attachment is not supported by the storage controller '%s'"), pszCtl); 558 559 } 559 560 else … … 577 578 char szPathReal[RTPATH_MAX]; 578 579 if (RT_FAILURE(RTPathReal(pszMedium + 5, szPathReal, sizeof(szPathReal)))) 579 throw Utf8StrFmt( "Invalid host DVD drive name \"%s\"", pszMedium + 5);580 throw Utf8StrFmt(Storage::tr("Invalid host DVD drive name \"%s\""), pszMedium + 5); 580 581 rc = host->FindHostDVDDrive(Bstr(szPathReal).raw(), 581 582 pMedium2Mount.asOutParam()); 582 583 if (!pMedium2Mount) 583 throw Utf8StrFmt( "Invalid host DVD drive name \"%s\"", pszMedium + 5);584 throw Utf8StrFmt(Storage::tr("Invalid host DVD drive name \"%s\""), pszMedium + 5); 584 585 } 585 586 } … … 590 591 pMedium2Mount.asOutParam()); 591 592 if (!pMedium2Mount) 592 throw Utf8StrFmt( "Invalid host floppy drive name \"%s\"", pszMedium + 5);593 throw Utf8StrFmt(Storage::tr("Invalid host floppy drive name \"%s\""), pszMedium + 5); 593 594 } 594 595 } … … 597 598 /* check for required options */ 598 599 if (bstrServer.isEmpty() || bstrTarget.isEmpty()) 599 throw Utf8StrFmt( "Parameters --server and --target are required for iSCSI media");600 throw Utf8StrFmt(Storage::tr("Parameters --server and --target are required for iSCSI media")); 600 601 601 602 /** @todo move the location stuff to Main, which can use pfnComposeName … … 664 665 CHECK_ERROR(pMedium2Mount, COMGETTER(Id)(guid.asOutParam())); 665 666 if (FAILED(rc)) goto leave; 666 RTPrintf( "iSCSI disk created. UUID: %s\n", Utf8Str(guid).c_str());667 RTPrintf(Storage::tr("iSCSI disk created. UUID: %s\n"), Utf8Str(guid).c_str()); 667 668 } 668 669 else … … 675 676 mediumAttachment.asOutParam()); 676 677 if (FAILED(rc)) 677 throw Utf8Str( "Missing --medium argument");678 throw Utf8Str(Storage::tr("Missing --medium argument")); 678 679 } 679 680 else … … 684 685 fSetNewUuid, false /* fSilent */); 685 686 if (FAILED(rc) || !pMedium2Mount) 686 throw Utf8StrFmt( "Invalid UUID or filename \"%s\"", pszMedium);687 throw Utf8StrFmt(Storage::tr("Invalid UUID or filename \"%s\""), pszMedium); 687 688 } 688 689 } … … 694 695 fSetNewParentUuid, bstrNewParentUuid.raw())); 695 696 if (FAILED(rc)) 696 throw Utf8Str( "Failed to set the medium/parent medium UUID");697 throw Utf8Str(Storage::tr("Failed to set the medium/parent medium UUID")); 697 698 } 698 699 … … 708 709 CHECK_ERROR(pMedium2Mount, COMSETTER(Type)(enmMediumType)); 709 710 if (FAILED(rc)) 710 throw Utf8Str( "Failed to set the medium type");711 throw Utf8Str(Storage::tr("Failed to set the medium type")); 711 712 } 712 713 } … … 803 804 } 804 805 else 805 throw Utf8StrFmt( "Invalid --passthrough argument '%s'", pszPassThrough);806 } 807 else 808 throw Utf8StrFmt( "Couldn't find the controller attachment for the controller '%s'\n", pszCtl);806 throw Utf8StrFmt(Storage::tr("Invalid --passthrough argument '%s'"), pszPassThrough); 807 } 808 else 809 throw Utf8StrFmt(Storage::tr("Couldn't find the controller attachment for the controller '%s'\n"), pszCtl); 809 810 } 810 811 … … 829 830 } 830 831 else 831 throw Utf8StrFmt( "Invalid --tempeject argument '%s'", pszTempEject);832 } 833 else 834 throw Utf8StrFmt( "Couldn't find the controller attachment for the controller '%s'\n", pszCtl);832 throw Utf8StrFmt(Storage::tr("Invalid --tempeject argument '%s'"), pszTempEject); 833 } 834 else 835 throw Utf8StrFmt(Storage::tr("Couldn't find the controller attachment for the controller '%s'\n"), pszCtl); 835 836 } 836 837 … … 855 856 } 856 857 else 857 throw Utf8StrFmt( "Invalid --nonrotational argument '%s'", pszNonRotational);858 } 859 else 860 throw Utf8StrFmt( "Couldn't find the controller attachment for the controller '%s'\n", pszCtl);858 throw Utf8StrFmt(Storage::tr("Invalid --nonrotational argument '%s'"), pszNonRotational); 859 } 860 else 861 throw Utf8StrFmt(Storage::tr("Couldn't find the controller attachment for the controller '%s'\n"), pszCtl); 861 862 } 862 863 … … 881 882 } 882 883 else 883 throw Utf8StrFmt( "Invalid --discard argument '%s'", pszDiscard);884 } 885 else 886 throw Utf8StrFmt( "Couldn't find the controller attachment for the controller '%s'\n", pszCtl);884 throw Utf8StrFmt(Storage::tr("Invalid --discard argument '%s'"), pszDiscard); 885 } 886 else 887 throw Utf8StrFmt(Storage::tr("Couldn't find the controller attachment for the controller '%s'\n"), pszCtl); 887 888 } 888 889 … … 907 908 } 908 909 else 909 throw Utf8StrFmt( "Invalid --hotpluggable argument '%s'", pszHotPluggable);910 } 911 else 912 throw Utf8StrFmt( "Couldn't find the controller attachment for the controller '%s'\n", pszCtl);910 throw Utf8StrFmt(Storage::tr("Invalid --hotpluggable argument '%s'"), pszHotPluggable); 911 } 912 else 913 throw Utf8StrFmt(Storage::tr("Couldn't find the controller attachment for the controller '%s'\n"), pszCtl); 913 914 } 914 915 … … 989 990 990 991 if (a->argc < 4) 991 return errorSyntax(USAGE_STORAGECONTROLLER, "Too few parameters");992 return errorSyntax(USAGE_STORAGECONTROLLER, Storage::tr("Too few parameters")); 992 993 993 994 RTGetOptInit (&GetState, a->argc, a->argv, g_aStorageControllerOptions, … … 1055 1056 /* it's important to always close sessions */ 1056 1057 a->session->UnlockMachine(); 1057 return errorSyntax(USAGE_STORAGECONTROLLER, "Storage controller name not specified\n");1058 return errorSyntax(USAGE_STORAGECONTROLLER, Storage::tr("Storage controller name not specified\n")); 1058 1059 } 1059 1060 … … 1118 1119 else 1119 1120 { 1120 errorArgument( "Invalid --add argument '%s'", pszBusType);1121 errorArgument(Storage::tr("Invalid --add argument '%s'"), pszBusType); 1121 1122 rc = E_FAIL; 1122 1123 } … … 1179 1180 else 1180 1181 { 1181 errorArgument( "Invalid --type argument '%s'", pszCtlType);1182 rc = E_FAIL; 1183 } 1184 } 1185 else 1186 { 1187 errorArgument( "Couldn't find the controller with the name: '%s'\n", pszCtl);1182 errorArgument(Storage::tr("Invalid --type argument '%s'"), pszCtlType); 1183 rc = E_FAIL; 1184 } 1185 } 1186 else 1187 { 1188 errorArgument(Storage::tr("Couldn't find the controller with the name: '%s'\n"), pszCtl); 1188 1189 rc = E_FAIL; 1189 1190 } … … 1204 1205 else 1205 1206 { 1206 errorArgument( "Couldn't find the controller with the name: '%s'\n", pszCtl);1207 errorArgument(Storage::tr("Couldn't find the controller with the name: '%s'\n"), pszCtl); 1207 1208 rc = E_FAIL; 1208 1209 } … … 1229 1230 else 1230 1231 { 1231 errorArgument( "Invalid --hostiocache argument '%s'", pszHostIOCache);1232 rc = E_FAIL; 1233 } 1234 } 1235 else 1236 { 1237 errorArgument( "Couldn't find the controller with the name: '%s'\n", pszCtl);1232 errorArgument(Storage::tr("Invalid --hostiocache argument '%s'"), pszHostIOCache); 1233 rc = E_FAIL; 1234 } 1235 } 1236 else 1237 { 1238 errorArgument(Storage::tr("Couldn't find the controller with the name: '%s'\n"), pszCtl); 1238 1239 rc = E_FAIL; 1239 1240 } … … 1255 1256 else 1256 1257 { 1257 errorArgument( "Invalid --bootable argument '%s'", pszBootable);1258 rc = E_FAIL; 1259 } 1260 } 1261 else 1262 { 1263 errorArgument( "Couldn't find the controller with the name: '%s'\n", pszCtl);1258 errorArgument(Storage::tr("Invalid --bootable argument '%s'"), pszBootable); 1259 rc = E_FAIL; 1260 } 1261 } 1262 else 1263 { 1264 errorArgument(Storage::tr("Couldn't find the controller with the name: '%s'\n"), pszCtl); 1264 1265 rc = E_FAIL; 1265 1266 } … … 1280 1281 else 1281 1282 { 1282 errorArgument( "Couldn't find the controller with the name: '%s'\n", pszCtl);1283 errorArgument(Storage::tr("Couldn't find the controller with the name: '%s'\n"), pszCtl); 1283 1284 rc = E_FAIL; 1284 1285 } … … 1298 1299 1299 1300 #endif /* !VBOX_ONLY_DOCS */ 1300 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
r82968 r92372 29 29 30 30 using namespace com; 31 32 DECLARE_TRANSLATION_CONTEXT(Usb); 31 33 32 34 /** … … 174 176 /* at least: 0: command, 1: index, 2: --target, 3: <target value> */ 175 177 if (a->argc < 4) 176 return errorSyntax(USAGE_USBFILTER, "Not enough parameters");178 return errorSyntax(USAGE_USBFILTER, Usb::tr("Not enough parameters")); 177 179 178 180 /* which command? */ … … 183 185 184 186 if (cmd.mAction == USBFilterCmd::Invalid) 185 return errorSyntax(USAGE_USBFILTER, "Invalid parameter '%s'", a->argv[0]);187 return errorSyntax(USAGE_USBFILTER, Usb::tr("Invalid parameter '%s'"), a->argv[0]); 186 188 187 189 /* which index? */ 188 190 if (VINF_SUCCESS != RTStrToUInt32Full(a->argv[1], 10, &cmd.mIndex)) 189 return errorSyntax(USAGE_USBFILTER, "Invalid index '%s'", a->argv[1]);191 return errorSyntax(USAGE_USBFILTER, Usb::tr("Invalid index '%s'"), a->argv[1]); 190 192 191 193 switch (cmd.mAction) … … 198 200 { 199 201 if (cmd.mAction == USBFilterCmd::Add) 200 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, "Not enough parameters");201 202 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_MODIFY, "Not enough parameters");202 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, Usb::tr("Not enough parameters")); 203 204 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_MODIFY, Usb::tr("Not enough parameters")); 203 205 } 204 206 … … 215 217 { 216 218 if (a->argc <= i + 1 || !*a->argv[i+1]) 217 return errorArgument( "Missing argument to '%s'", a->argv[i]);219 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 218 220 i++; 219 221 if (!strcmp(a->argv[i], "global")) … … 230 232 { 231 233 if (a->argc <= i + 1 || !*a->argv[i+1]) 232 return errorArgument( "Missing argument to '%s'", a->argv[i]);234 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 233 235 i++; 234 236 cmd.mFilter.mName = a->argv[i]; … … 238 240 { 239 241 if (a->argc <= i + 1) 240 return errorArgument( "Missing argument to '%s'", a->argv[i]);242 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 241 243 i++; 242 244 if (!strcmp(a->argv[i], "yes")) … … 245 247 cmd.mFilter.mActive = false; 246 248 else 247 return errorArgument( "Invalid --active argument '%s'", a->argv[i]);249 return errorArgument(Usb::tr("Invalid --active argument '%s'"), a->argv[i]); 248 250 } 249 251 else if ( !strcmp(a->argv[i], "--vendorid") … … 251 253 { 252 254 if (a->argc <= i + 1) 253 return errorArgument( "Missing argument to '%s'", a->argv[i]);255 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 254 256 i++; 255 257 cmd.mFilter.mVendorId = a->argv[i]; … … 259 261 { 260 262 if (a->argc <= i + 1) 261 return errorArgument( "Missing argument to '%s'", a->argv[i]);263 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 262 264 i++; 263 265 cmd.mFilter.mProductId = a->argv[i]; … … 267 269 { 268 270 if (a->argc <= i + 1) 269 return errorArgument( "Missing argument to '%s'", a->argv[i]);271 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 270 272 i++; 271 273 cmd.mFilter.mRevision = a->argv[i]; … … 275 277 { 276 278 if (a->argc <= i + 1) 277 return errorArgument( "Missing argument to '%s'", a->argv[i]);279 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 278 280 i++; 279 281 cmd.mFilter.mManufacturer = a->argv[i]; … … 283 285 { 284 286 if (a->argc <= i + 1) 285 return errorArgument( "Missing argument to '%s'", a->argv[i]);287 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 286 288 i++; 287 289 cmd.mFilter.mProduct = a->argv[i]; … … 291 293 { 292 294 if (a->argc <= i + 1) 293 return errorArgument( "Missing argument to '%s'", a->argv[i]);295 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 294 296 i++; 295 297 cmd.mFilter.mRemote = a->argv[i]; … … 299 301 { 300 302 if (a->argc <= i + 1) 301 return errorArgument( "Missing argument to '%s'", a->argv[i]);303 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 302 304 i++; 303 305 cmd.mFilter.mSerialNumber = a->argv[i]; … … 307 309 { 308 310 if (a->argc <= i + 1) 309 return errorArgument( "Missing argument to '%s'", a->argv[i]);311 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 310 312 i++; 311 313 uint32_t u32; 312 314 int vrc = RTStrToUInt32Full(a->argv[i], 0, &u32); 313 315 if (RT_FAILURE(vrc)) 314 return errorArgument("Failed to convert the --maskedinterfaces value '%s' to a number, vrc=%Rrc", a->argv[i], vrc); 316 return errorArgument(Usb::tr("Failed to convert the --maskedinterfaces value '%s' to a number, vrc=%Rrc"), 317 a->argv[i], vrc); 315 318 cmd.mFilter.mMaskedInterfaces = u32; 316 319 } … … 319 322 { 320 323 if (a->argc <= i + 1) 321 return errorArgument( "Missing argument to '%s'", a->argv[i]);324 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 322 325 i++; 323 326 if (!strcmp(a->argv[i], "ignore")) … … 326 329 cmd.mFilter.mAction = USBDeviceFilterAction_Hold; 327 330 else 328 return errorArgument( "Invalid USB filter action '%s'", a->argv[i]);331 return errorArgument(Usb::tr("Invalid USB filter action '%s'"), a->argv[i]); 329 332 } 330 333 else 331 334 return errorSyntaxEx(USAGE_USBFILTER, cmd.mAction == USBFilterCmd::Add ? HELP_SCOPE_USBFILTER_ADD : HELP_SCOPE_USBFILTER_MODIFY, 332 "Unknown option '%s'", a->argv[i]);335 Usb::tr("Unknown option '%s'"), a->argv[i]); 333 336 } 334 337 … … 347 350 ) 348 351 { 349 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, "Mandatory options not supplied");352 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, Usb::tr("Mandatory options not supplied")); 350 353 } 351 354 } … … 357 360 /* at least: 0: command, 1: index, 2: --target, 3: <target value> */ 358 361 if (a->argc < 4) 359 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, "Not enough parameters");362 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, Usb::tr("Not enough parameters")); 360 363 361 364 for (int i = 2; i < a->argc; i++) … … 365 368 { 366 369 if (a->argc <= i + 1 || !*a->argv[i+1]) 367 return errorArgument( "Missing argument to '%s'", a->argv[i]);370 return errorArgument(Usb::tr("Missing argument to '%s'"), a->argv[i]); 368 371 i++; 369 372 if (!strcmp(a->argv[i], "global")) … … 379 382 // mandatory options 380 383 if (!cmd.mGlobal && !cmd.mMachine) 381 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, "Mandatory options not supplied");384 return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, Usb::tr("Mandatory options not supplied")); 382 385 383 386 break; … … 555 558 /* at least: 0: command, 1: source id */ 556 559 if (a->argc < 2) 557 return errorSyntax(USAGE_USBDEVSOURCE, "Not enough parameters");560 return errorSyntax(USAGE_USBDEVSOURCE, Usb::tr("Not enough parameters")); 558 561 559 562 ComPtr<IHost> host; … … 563 566 Bstr strAddress; 564 567 if (a->argc != 6) 565 return errorSyntax(USAGE_USBDEVSOURCE, "Invalid number of parameters");568 return errorSyntax(USAGE_USBDEVSOURCE, Usb::tr("Invalid number of parameters")); 566 569 567 570 for (int i = 2; i < a->argc; i++) … … 578 581 } 579 582 else 580 return errorSyntax(USAGE_USBDEVSOURCE, "Parameter \"%s\" is invalid", a->argv[i]);583 return errorSyntax(USAGE_USBDEVSOURCE, Usb::tr("Parameter \"%s\" is invalid"), a->argv[i]); 581 584 } 582 585 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUpdateCheck.cpp
r85780 r92372 39 39 #include "VBoxManage.h" 40 40 41 DECLARE_TRANSLATION_CONTEXT(UpdateCheck); 42 41 43 using namespace com; // SafeArray 42 44 … … 85 87 outputMachineReadableBool("enabled", &fVBoxUpdateEnabled); 86 88 else 87 RTPrintf("Enabled: %s\n", fVBoxUpdateEnabled ? "yes" : "no"); 89 RTPrintf(UpdateCheck::tr("Enabled: %s\n"), 90 fVBoxUpdateEnabled ? UpdateCheck::tr("yes") : UpdateCheck::tr("no")); 88 91 89 92 ULONG cVBoxUpdateCount; … … 92 95 outputMachineReadableULong("count", &cVBoxUpdateCount); 93 96 else 94 RTPrintf( "Count: %u\n", cVBoxUpdateCount);97 RTPrintf(UpdateCheck::tr("Count: %u\n"), cVBoxUpdateCount); 95 98 96 99 ULONG cDaysFrequencey; … … 99 102 outputMachineReadableULong("frequency", &cDaysFrequencey); 100 103 else if (cDaysFrequencey == 0) 101 RTPrintf( "Frequency: never\n"); /** @todo r=bird: Two inconsistencies here. HostUpdateImpl.cpp code will indicate the need for updating if no last-check-date. modifysettings cannot set it to zero (I added the error message, you just skipped setting it originally). */104 RTPrintf(UpdateCheck::tr("Frequency: never\n")); /** @todo r=bird: Two inconsistencies here. HostUpdateImpl.cpp code will indicate the need for updating if no last-check-date. modifysettings cannot set it to zero (I added the error message, you just skipped setting it originally). */ 102 105 else if (cDaysFrequencey == 1) 103 RTPrintf( "Frequency: every day\n");106 RTPrintf(UpdateCheck::tr("Frequency: every day\n")); 104 107 else 105 RTPrintf( "Frequency: every %u days\n", cDaysFrequencey);108 RTPrintf(UpdateCheck::tr("Frequency: every %u days\n"), cDaysFrequencey); 106 109 107 110 VBoxUpdateTarget_T enmVBoxUpdateTarget; … … 112 115 { 113 116 case VBoxUpdateTarget_Stable: 114 psz = "Stable - new minor and maintenance releases";117 psz = UpdateCheck::tr("Stable - new minor and maintenance releases"); 115 118 pszMachine = "stable"; 116 119 break; 117 120 case VBoxUpdateTarget_AllReleases: 118 psz = "All releases - new minor, maintenance, and major releases";121 psz = UpdateCheck::tr("All releases - new minor, maintenance, and major releases"); 119 122 pszMachine = "all-releases"; 120 123 break; 121 124 case VBoxUpdateTarget_WithBetas: 122 psz = "With Betas - new minor, maintenance, major, and beta releases";125 psz = UpdateCheck::tr("With Betas - new minor, maintenance, major, and beta releases"); 123 126 pszMachine = "with-betas"; 124 127 break; 125 128 default: 126 129 AssertFailed(); 127 psz = "Unset";130 psz = UpdateCheck::tr("Unset"); 128 131 pszMachine = "invalid"; 129 132 break; … … 132 135 outputMachineReadableString("target", pszMachine); 133 136 else 134 RTPrintf( "Target: %s\n", psz);137 RTPrintf(UpdateCheck::tr("Target: %s\n"), psz); 135 138 136 139 Bstr bstrLastCheckDate; … … 140 143 outputMachineReadableString("last-check-date", &bstrLastCheckDate); 141 144 else if (bstrLastCheckDate.isNotEmpty()) 142 RTPrintf( "Last Check Date: %ls\n", bstrLastCheckDate.raw());145 RTPrintf(UpdateCheck::tr("Last Check Date: %ls\n"), bstrLastCheckDate.raw()); 143 146 144 147 return RTEXITCODE_SUCCESS; … … 192 195 enmVBoxUpdateTarget = VBoxUpdateTarget_AllReleases; 193 196 else 194 return errorArgument( "Unknown target specified: '%s'", ValueUnion.psz);197 return errorArgument(UpdateCheck::tr("Unknown target specified: '%s'"), ValueUnion.psz); 195 198 break; 196 199 … … 198 201 cDaysUpdateFrequency = ValueUnion.u32; 199 202 if (cDaysUpdateFrequency == 0) 200 return errorArgument( "The update frequency cannot be zero");203 return errorArgument(UpdateCheck::tr("The update frequency cannot be zero")); 201 204 break; 202 205 … … 209 212 && enmVBoxUpdateTarget != enmVBoxUpdateTargetNil 210 213 && cDaysUpdateFrequency == 0) 211 return errorSyntax( "No change requested");214 return errorSyntax(UpdateCheck::tr("No change requested")); 212 215 213 216 /* … … 280 283 ComPtr<IProgress> ptrProgress; 281 284 282 RTPrintf( "Checking for a new VirtualBox version...\n");285 RTPrintf(UpdateCheck::tr("Checking for a new VirtualBox version...\n")); 283 286 284 287 // we don't call CHECK_ERROR2I_RET(pHostUpdate, VBoxUpdate(updateCheckType, ...); here so we can check for a specific … … 291 294 if (rc == E_NOTIMPL) 292 295 { 293 RTPrintf( "VirtualBox update checking has been disabled.\n");296 RTPrintf(UpdateCheck::tr("VirtualBox update checking has been disabled.\n")); 294 297 return RTEXITCODE_SUCCESS; 295 298 } 296 299 297 300 if (ptrProgress.isNull()) 298 RTStrmPrintf(g_pStdErr, "Failed to create ptrProgress object: %Rhrc\n", rc);301 RTStrmPrintf(g_pStdErr, UpdateCheck::tr("Failed to create ptrProgress object: %Rhrc\n"), rc); 299 302 else 300 com::GlueHandleComError(pHostUpdate, "VBoxUpdate(updateCheckType, ptrProgress.asOutParam())", rc, __FILE__, __LINE__); 303 com::GlueHandleComError(pHostUpdate, UpdateCheck::tr("VBoxUpdate(updateCheckType, ptrProgress.asOutParam())"), 304 rc, __FILE__, __LINE__); 301 305 return RTEXITCODE_FAILURE; 302 306 } 303 307 304 308 /* HRESULT hrc = */ showProgress(ptrProgress); 305 CHECK_PROGRESS_ERROR_RET(ptrProgress, ( "Check for update failed."), RTEXITCODE_FAILURE);309 CHECK_PROGRESS_ERROR_RET(ptrProgress, (UpdateCheck::tr("Check for update failed.")), RTEXITCODE_FAILURE); 306 310 307 311 BOOL fUpdateNeeded = FALSE; … … 319 323 320 324 if (fMachineReadable) 321 RTPrintf("A new version of VirtualBox has been released! Version %ls is available at virtualbox.org.\n" 322 "You can download this version here: %ls\n", bstrUpdateVersion.raw(), bstrUpdateURL.raw()); 325 RTPrintf(UpdateCheck::tr( 326 "A new version of VirtualBox has been released! Version %ls is available at virtualbox.org.\n" 327 "You can download this version here: %ls\n"), 328 bstrUpdateVersion.raw(), bstrUpdateURL.raw()); 323 329 else 324 330 { … … 328 334 } 329 335 else if (!fMachineReadable) 330 RTPrintf( "You are already running the most recent version of VirtualBox.\n");336 RTPrintf(UpdateCheck::tr("You are already running the most recent version of VirtualBox.\n")); 331 337 332 338 return RTEXITCODE_SUCCESS; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUtils.cpp
r88087 r92372 18 18 #ifndef VBOX_ONLY_DOCS 19 19 #include "VBoxManageUtils.h" 20 #include "VBoxManage.h" 20 21 21 22 #include <iprt/message.h> … … 28 29 using namespace com; 29 30 30 31 DECLARE_TRANSLATION_CONTEXT(Utils); 31 32 32 33 unsigned int getMaxNics(const ComPtr<IVirtualBox> &pVirtualBox, … … 100 101 { 101 102 case HostNetworkInterfaceType_Bridged: 102 pszTypeName = "type bridged";103 pszTypeName = Utils::tr("type bridged"); 103 104 break; 104 105 105 106 case HostNetworkInterfaceType_HostOnly: 106 pszTypeName = "type host-only";107 pszTypeName = Utils::tr("type host-only"); 107 108 break; 108 109 109 110 default: 110 111 RTStrPrintf(a_szUnknownTypeBuf, sizeof(a_szUnknownTypeBuf), 111 "unknown type %RU32", enmType);112 Utils::tr("unknown type %RU32"), enmType); 112 113 pszTypeName = a_szUnknownTypeBuf; 113 114 break; 114 115 } 115 116 116 RTMsgWarning( "Interface \"%s\" is of %s", pszTargetName, pszTypeName);117 RTMsgWarning(Utils::tr("Interface \"%s\" is of %s"), pszTargetName, pszTypeName); 117 118 return; 118 119 } 119 120 120 RTMsgWarning( "Interface \"%s\" doesn't seem to exist", pszTargetName);121 RTMsgWarning(Utils::tr("Interface \"%s\" doesn't seem to exist"), pszTargetName); 121 122 } 122 123
Note:
See TracChangeset
for help on using the changeset viewer.