Changeset 91503 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Oct 1, 2021 8:57:59 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147192
- Location:
- trunk/src/VBox/Main/src-all
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/AutoCaller.cpp
r85929 r91503 23 23 #include "LoggingNew.h" 24 24 25 #include "VBoxNls.h" 26 27 28 DECLARE_TRANSLATION_CONTEXT(AutoCallerCtx); 25 29 26 30 //////////////////////////////////////////////////////////////////////////////// … … 201 205 { 202 206 if (mState == Limited) 203 rc = mObj->setError(rc, "The object functionality is limited");207 rc = mObj->setError(rc, AutoCallerCtx::tr("The object functionality is limited")); 204 208 else if (FAILED(mFailedRC) && mFailedRC != E_ACCESSDENIED) 205 209 { … … 210 214 } 211 215 else 212 rc = mObj->setError(rc, "The object is not ready");216 rc = mObj->setError(rc, AutoCallerCtx::tr("The object is not ready")); 213 217 } 214 218 -
trunk/src/VBox/Main/src-all/EventImpl.cpp
r85300 r91503 1299 1299 STDMETHOD(HandleEvent)(IEvent *) 1300 1300 { 1301 ComAssertMsgRet(false, ( "HandleEvent() of wrapper shall never be called"),1301 ComAssertMsgRet(false, (tr("HandleEvent() of wrapper shall never be called")), 1302 1302 E_FAIL); 1303 1303 } … … 1443 1443 1444 1444 HRESULT rc = listener.createObject(); 1445 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create wrapper object (%Rhrc)", rc),1445 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create wrapper object (%Rhrc)"), rc), 1446 1446 E_FAIL); 1447 1447 listener.queryInterfaceTo(aListener.asOutParam()); … … 1455 1455 1456 1456 HRESULT rc = agg.createObject(); 1457 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create aggregator (%Rhrc)", rc),1457 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create aggregator (%Rhrc)"), rc), 1458 1458 E_FAIL); 1459 1459 … … 1474 1474 1475 1475 rc = mSource.createObject(); 1476 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create source (%Rhrc)", rc),1476 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create source (%Rhrc)"), rc), 1477 1477 E_FAIL); 1478 1478 rc = mSource->init(); 1479 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not init source (%Rhrc)", rc),1479 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not init source (%Rhrc)"), rc), 1480 1480 E_FAIL); 1481 1481 … … 1613 1613 1614 1614 HRESULT rc = proxy.createObject(); 1615 ComAssertMsgRet(SUCCEEDED(rc), ( "Could not create proxy (%Rhrc)", rc),1615 ComAssertMsgRet(SUCCEEDED(rc), (tr("Could not create proxy (%Rhrc)"), rc), 1616 1616 E_FAIL); 1617 1617 -
trunk/src/VBox/Main/src-all/Global.cpp
r91470 r91503 24 24 #include <iprt/errcore.h> 25 25 26 #include "VBoxNls.h" 27 28 DECLARE_TRANSLATION_CONTEXT(GlobalCtx); 29 30 26 31 /* static */ 27 32 const Global::OSType Global::sOSTypes[] = … … 581 586 switch (aState) 582 587 { 583 case MachineState_Null: return "Null";584 case MachineState_PoweredOff: return "PoweredOff";585 case MachineState_Saved: return "Saved";586 case MachineState_Teleported: return "Teleported";587 case MachineState_Aborted: return "Aborted";588 case MachineState_AbortedSaved: return "Aborted-Saved";589 case MachineState_Running: return "Running";590 case MachineState_Paused: return "Paused";591 case MachineState_Stuck: return "GuruMeditation";592 case MachineState_Teleporting: return "Teleporting";593 case MachineState_LiveSnapshotting: return "LiveSnapshotting";594 case MachineState_Starting: return "Starting";595 case MachineState_Stopping: return "Stopping";596 case MachineState_Saving: return "Saving";597 case MachineState_Restoring: return "Restoring";598 case MachineState_TeleportingPausedVM: return "TeleportingPausedVM";599 case MachineState_TeleportingIn: return "TeleportingIn";600 case MachineState_DeletingSnapshotOnline: return "DeletingSnapshotOnline";601 case MachineState_DeletingSnapshotPaused: return "DeletingSnapshotPaused";602 case MachineState_OnlineSnapshotting: return "OnlineSnapshotting";603 case MachineState_RestoringSnapshot: return "RestoringSnapshot";604 case MachineState_DeletingSnapshot: return "DeletingSnapshot";605 case MachineState_SettingUp: return "SettingUp";606 case MachineState_Snapshotting: return "Snapshotting";588 case MachineState_Null: return GlobalCtx::tr("Null"); 589 case MachineState_PoweredOff: return GlobalCtx::tr("PoweredOff"); 590 case MachineState_Saved: return GlobalCtx::tr("Saved"); 591 case MachineState_Teleported: return GlobalCtx::tr("Teleported"); 592 case MachineState_Aborted: return GlobalCtx::tr("Aborted"); 593 case MachineState_AbortedSaved: return GlobalCtx::tr("Aborted-Saved"); 594 case MachineState_Running: return GlobalCtx::tr("Running"); 595 case MachineState_Paused: return GlobalCtx::tr("Paused"); 596 case MachineState_Stuck: return GlobalCtx::tr("GuruMeditation"); 597 case MachineState_Teleporting: return GlobalCtx::tr("Teleporting"); 598 case MachineState_LiveSnapshotting: return GlobalCtx::tr("LiveSnapshotting"); 599 case MachineState_Starting: return GlobalCtx::tr("Starting"); 600 case MachineState_Stopping: return GlobalCtx::tr("Stopping"); 601 case MachineState_Saving: return GlobalCtx::tr("Saving"); 602 case MachineState_Restoring: return GlobalCtx::tr("Restoring"); 603 case MachineState_TeleportingPausedVM: return GlobalCtx::tr("TeleportingPausedVM"); 604 case MachineState_TeleportingIn: return GlobalCtx::tr("TeleportingIn"); 605 case MachineState_DeletingSnapshotOnline: return GlobalCtx::tr("DeletingSnapshotOnline"); 606 case MachineState_DeletingSnapshotPaused: return GlobalCtx::tr("DeletingSnapshotPaused"); 607 case MachineState_OnlineSnapshotting: return GlobalCtx::tr("OnlineSnapshotting"); 608 case MachineState_RestoringSnapshot: return GlobalCtx::tr("RestoringSnapshot"); 609 case MachineState_DeletingSnapshot: return GlobalCtx::tr("DeletingSnapshot"); 610 case MachineState_SettingUp: return GlobalCtx::tr("SettingUp"); 611 case MachineState_Snapshotting: return GlobalCtx::tr("Snapshotting"); 607 612 default: 608 613 { 609 614 AssertMsgFailed(("%d (%#x)\n", aState, aState)); 610 615 static char s_szMsg[48]; 611 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "InvalidState-0x%08x\n", aState);616 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("InvalidState-0x%08x\n"), aState); 612 617 return s_szMsg; 613 618 } … … 620 625 switch (aState) 621 626 { 622 case SessionState_Null: return "Null";623 case SessionState_Unlocked: return "Unlocked";624 case SessionState_Locked: return "Locked";625 case SessionState_Spawning: return "Spawning";626 case SessionState_Unlocking: return "Unlocking";627 case SessionState_Null: return GlobalCtx::tr("Null"); 628 case SessionState_Unlocked: return GlobalCtx::tr("Unlocked"); 629 case SessionState_Locked: return GlobalCtx::tr("Locked"); 630 case SessionState_Spawning: return GlobalCtx::tr("Spawning"); 631 case SessionState_Unlocking: return GlobalCtx::tr("Unlocking"); 627 632 default: 628 633 { 629 634 AssertMsgFailed(("%d (%#x)\n", aState, aState)); 630 635 static char s_szMsg[48]; 631 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "InvalidState-0x%08x\n", aState);636 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("InvalidState-0x%08x\n"), aState); 632 637 return s_szMsg; 633 638 } … … 640 645 switch (aType) 641 646 { 642 case DeviceType_Null: return "Null";643 case DeviceType_Floppy: return "Floppy";644 case DeviceType_DVD: return "DVD";645 case DeviceType_HardDisk: return "HardDisk";646 case DeviceType_Network: return "Network";647 case DeviceType_USB: return "USB";648 case DeviceType_SharedFolder: return "ShardFolder";647 case DeviceType_Null: return GlobalCtx::tr("Null"); 648 case DeviceType_Floppy: return GlobalCtx::tr("Floppy"); 649 case DeviceType_DVD: return GlobalCtx::tr("DVD"); 650 case DeviceType_HardDisk: return GlobalCtx::tr("HardDisk"); 651 case DeviceType_Network: return GlobalCtx::tr("Network"); 652 case DeviceType_USB: return GlobalCtx::tr("USB"); 653 case DeviceType_SharedFolder: return GlobalCtx::tr("ShardFolder"); 649 654 default: 650 655 { 651 656 AssertMsgFailed(("%d (%#x)\n", aType, aType)); 652 657 static char s_szMsg[48]; 653 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "InvalidType-0x%08x\n", aType);658 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("InvalidType-0x%08x\n"), aType); 654 659 return s_szMsg; 655 660 } … … 663 668 switch (aReason) 664 669 { 665 case Reason_Unspecified: return "unspecified";666 case Reason_HostSuspend: return "host suspend";667 case Reason_HostResume: return "host resume";668 case Reason_HostBatteryLow: return "host battery low";669 case Reason_Snapshot: return "snapshot";670 case Reason_Unspecified: return GlobalCtx::tr("unspecified"); 671 case Reason_HostSuspend: return GlobalCtx::tr("host suspend"); 672 case Reason_HostResume: return GlobalCtx::tr("host resume"); 673 case Reason_HostBatteryLow: return GlobalCtx::tr("host battery low"); 674 case Reason_Snapshot: return GlobalCtx::tr("snapshot"); 670 675 default: 671 676 { 672 677 AssertMsgFailed(("%d (%#x)\n", aReason, aReason)); 673 678 static char s_szMsg[48]; 674 RTStrPrintf(s_szMsg, sizeof(s_szMsg), "invalid reason %#010x\n", aReason);679 RTStrPrintf(s_szMsg, sizeof(s_szMsg), GlobalCtx::tr("invalid reason %#010x\n"), aReason); 675 680 return s_szMsg; 676 681 } -
trunk/src/VBox/Main/src-all/TextScript.cpp
r90828 r91503 194 194 HRESULT GeneralTextScript::parse() 195 195 { 196 // AssertReturn(!mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, "parse called more than once"));196 // AssertReturn(!mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("parse called more than once"))); 197 197 198 198 /* … … 215 215 HRESULT GeneralTextScript::saveToString(Utf8Str &rStrDst) 216 216 { 217 AssertReturn(mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, "saveToString() called before parse()"));217 AssertReturn(mfDataParsed, mpSetError->setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("saveToString() called before parse()"))); 218 218 219 219 /* … … 264 264 { 265 265 AssertReturn(idxLine < mScriptContentByLines.size(), 266 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, "attempting to set line %zu when there are only %zu lines",266 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("attempting to set line %zu when there are only %zu lines"), 267 267 idxLine, mScriptContentByLines.size())); 268 268 try … … 293 293 AssertReturn(idxLine < mScriptContentByLines.size(), 294 294 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, 295 "attempting search&replace in line %zu when there are only %zu lines",295 tr("attempting search&replace in line %zu when there are only %zu lines"), 296 296 idxLine, mScriptContentByLines.size())); 297 297 … … 320 320 { 321 321 AssertReturn(idxLine < mScriptContentByLines.size(), 322 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, "appending to line %zu when there are only %zu lines",322 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("appending to line %zu when there are only %zu lines"), 323 323 idxLine, mScriptContentByLines.size())); 324 324 … … 337 337 { 338 338 AssertReturn(idxLine < mScriptContentByLines.size(), 339 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, "prepending to line %zu when there are only %zu lines",339 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("prepending to line %zu when there are only %zu lines"), 340 340 idxLine, mScriptContentByLines.size())); 341 341 -
trunk/src/VBox/Main/src-all/VirtualBoxBase.cpp
r91373 r91503 231 231 true /* aLogIt */, 232 232 0 /* aResultDetail */, 233 tr("%s.\n%s[%d] (%s)"),233 "%s.\n%s[%d] (%s)", 234 234 err.what(), pszFile, iLine, pszFunction); 235 235 } … … 346 346 switch (aResultCode) 347 347 { 348 case E_INVALIDARG: strText = "A parameter has an invalid value"; break;349 case E_POINTER: strText = "A parameter is an invalid pointer"; break;350 case E_UNEXPECTED: strText = "The result of the operation is unexpected"; break;351 case E_ACCESSDENIED: strText = "The access to an object is not allowed"; break;352 case E_OUTOFMEMORY: strText = "The allocation of new memory failed"; break;353 case E_NOTIMPL: strText = "The requested operation is not implemented"; break;354 case E_NOINTERFACE: strText = "The requested interface is not implemented"; break;355 case E_FAIL: strText = "A general error occurred"; break;356 case E_ABORT: strText = "The operation was canceled"; break;357 case VBOX_E_OBJECT_NOT_FOUND: strText = "Object corresponding to the supplied arguments does not exist"; break;358 case VBOX_E_INVALID_VM_STATE: strText = "Current virtual machine state prevents the operation"; break;359 case VBOX_E_VM_ERROR: strText = "Virtual machine error occurred attempting the operation"; break;360 case VBOX_E_FILE_ERROR: strText = "File not accessible or erroneous file contents"; break;361 case VBOX_E_IPRT_ERROR: strText = "Runtime subsystem error"; break;362 case VBOX_E_PDM_ERROR: strText = "Pluggable Device Manager error"; break;363 case VBOX_E_INVALID_OBJECT_STATE: strText = "Current object state prohibits operation"; break;364 case VBOX_E_HOST_ERROR: strText = "Host operating system related error"; break;365 case VBOX_E_NOT_SUPPORTED: strText = "Requested operation is not supported"; break;366 case VBOX_E_XML_ERROR: strText = "Invalid XML found"; break;367 case VBOX_E_INVALID_SESSION_STATE: strText = "Current session state prohibits operation"; break;368 case VBOX_E_OBJECT_IN_USE: strText = "Object being in use prohibits operation"; break;369 case VBOX_E_PASSWORD_INCORRECT: strText = "Incorrect password provided"; break;370 default: strText = "Unknown error"; break;348 case E_INVALIDARG: strText = tr("A parameter has an invalid value"); break; 349 case E_POINTER: strText = tr("A parameter is an invalid pointer"); break; 350 case E_UNEXPECTED: strText = tr("The result of the operation is unexpected"); break; 351 case E_ACCESSDENIED: strText = tr("The access to an object is not allowed"); break; 352 case E_OUTOFMEMORY: strText = tr("The allocation of new memory failed"); break; 353 case E_NOTIMPL: strText = tr("The requested operation is not implemented"); break; 354 case E_NOINTERFACE: strText = tr("The requested interface is not implemented"); break; 355 case E_FAIL: strText = tr("A general error occurred"); break; 356 case E_ABORT: strText = tr("The operation was canceled"); break; 357 case VBOX_E_OBJECT_NOT_FOUND: strText = tr("Object corresponding to the supplied arguments does not exist"); break; 358 case VBOX_E_INVALID_VM_STATE: strText = tr("Current virtual machine state prevents the operation"); break; 359 case VBOX_E_VM_ERROR: strText = tr("Virtual machine error occurred attempting the operation"); break; 360 case VBOX_E_FILE_ERROR: strText = tr("File not accessible or erroneous file contents"); break; 361 case VBOX_E_IPRT_ERROR: strText = tr("Runtime subsystem error"); break; 362 case VBOX_E_PDM_ERROR: strText = tr("Pluggable Device Manager error"); break; 363 case VBOX_E_INVALID_OBJECT_STATE: strText = tr("Current object state prohibits operation"); break; 364 case VBOX_E_HOST_ERROR: strText = tr("Host operating system related error"); break; 365 case VBOX_E_NOT_SUPPORTED: strText = tr("Requested operation is not supported"); break; 366 case VBOX_E_XML_ERROR: strText = tr("Invalid XML found"); break; 367 case VBOX_E_INVALID_SESSION_STATE: strText = tr("Current session state prohibits operation"); break; 368 case VBOX_E_OBJECT_IN_USE: strText = tr("Object being in use prohibits operation"); break; 369 case VBOX_E_PASSWORD_INCORRECT: strText = tr("Incorrect password provided"); break; 370 default: strText = tr("Unknown error"); break; 371 371 } 372 372 }
Note:
See TracChangeset
for help on using the changeset viewer.