- Timestamp:
- Oct 14, 2021 11:43:12 AM (3 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 1 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/QMTranslator.h
r91392 r91718 44 44 */ 45 45 const char *translate(const char *pszContext, const char *pszSource, const char **ppszSafeSource, 46 const char *pszDisamb = NULL, const int iNum = -1) const RT_NOEXCEPT;46 const char *pszDisamb = NULL, const size_t aNum = (~(size_t)0)) const RT_NOEXCEPT; 47 47 48 48 /** -
trunk/src/VBox/Main/include/VBoxNls.h
r91407 r91718 34 34 struct ctx \ 35 35 {\ 36 static const char *tr(const char *pszSource, const char *pszComment = NULL, const int iNum = -1) \36 static const char *tr(const char *pszSource, const char *pszComment = NULL, const size_t aNum = (~(size_t)0)) \ 37 37 { \ 38 return VirtualBoxTranslator::translate(NULL, #ctx, pszSource, pszComment, iNum); \38 return VirtualBoxTranslator::translate(NULL, #ctx, pszSource, pszComment, aNum); \ 39 39 } \ 40 40 } … … 43 43 struct ctx \ 44 44 {\ 45 static const char *tr(const char *pszSource, const char *pszComment = NULL, const int iNum = -1) \45 static const char *tr(const char *pszSource, const char *pszComment = NULL, const size_t aNum = (~(size_t)0)) \ 46 46 { \ 47 47 NOREF(pszComment); \ 48 NOREF( iNum); \48 NOREF(aNum); \ 49 49 return pszSource; \ 50 50 } \ -
trunk/src/VBox/Main/include/VirtualBoxBase.h
r91503 r91718 577 577 #ifdef VBOX_WITH_MAIN_NLS 578 578 # define DECLARE_TRANSLATE_METHODS(cls) \ 579 static inline const char *tr(const char *aSourceText, \580 const char *aComment = NULL, \581 const int aNum = -1) \579 static inline const char *tr(const char *aSourceText, \ 580 const char *aComment = NULL, \ 581 const size_t aNum = (~(size_t)0)) \ 582 582 { \ 583 583 return VirtualBoxTranslator::translate(NULL, #cls, aSourceText, aComment, aNum); \ … … 587 587 static inline const char *tr(const char *aSourceText, \ 588 588 const char *aComment = NULL, \ 589 const int aNum = -1) \589 const size_t aNum = (~(size_t)0)) \ 590 590 { \ 591 591 RT_NOREF(aComment, aNum); \ -
trunk/src/VBox/Main/include/VirtualBoxTranslator.h
r91394 r91718 92 92 */ 93 93 static const char *translate(PTRCOMPONENT aComponent, 94 const char *aContext,95 const char *aSourceText,96 const char *aComment = NULL,97 const int aNum = -1) RT_NOEXCEPT;94 const char *aContext, 95 const char *aSourceText, 96 const char *aComment = NULL, 97 const size_t aNum = (~(size_t)0)) RT_NOEXCEPT; 98 98 99 99 /** … … 141 141 142 142 const char *i_translate(PTRCOMPONENT aComponent, 143 const char *aContext,144 const char *aSourceText,145 const char *aComment = NULL,146 const int aNum = -1) RT_NOEXCEPT;143 const char *aContext, 144 const char *aSourceText, 145 const char *aComment = NULL, 146 const size_t aNum = (~(size_t)0)) RT_NOEXCEPT; 147 147 }; 148 148 -
trunk/src/VBox/Main/nls/ApprovedLanguages.kmk
r91381 r91718 17 17 18 18 # The list of approved Main API languages. 19 VBOX_APPROVED_MAIN_LANGUAGES := 19 VBOX_APPROVED_MAIN_LANGUAGES := \ 20 ru \ -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r91475 r91718 533 533 534 534 if (aPreferredLanguage.length() != 2 && aPreferredLanguage.length() != 0) 535 return setError(E_FAIL, tr("The preferred lan uage is a two character string or empty."));535 return setError(E_FAIL, tr("The preferred language is a two character string or empty.")); 536 536 537 537 if ( !aFormat.equals("html") … … 635 635 } 636 636 else 637 hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'"), cbFile, szName); 637 hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'", "", cbFile), 638 cbFile, szName); 638 639 } 639 640 else … … 1145 1146 } 1146 1147 else 1147 hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());1148 hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str()); 1148 1149 return hrc; 1149 1150 } … … 1370 1371 if (RT_FAILURE(vrc)) 1371 1372 { 1372 m->strWhyUnusable.printf( tr("%s (rc=%Rrc)"), ErrInfo.Core.pszMsg, vrc);1373 m->strWhyUnusable.printf("%s (rc=%Rrc)", ErrInfo.Core.pszMsg, vrc); 1373 1374 return; 1374 1375 } … … 1427 1428 if (RT_FAILURE(vrc)) 1428 1429 { 1429 m->strWhyUnusable.printf( tr("%s"), ErrInfo.Core.pszMsg);1430 m->strWhyUnusable.printf("%s", ErrInfo.Core.pszMsg); 1430 1431 return; 1431 1432 } … … 2138 2139 2139 2140 if (aPreferredLanguage.length() != 2 && aPreferredLanguage.length() != 0) 2140 return setError(E_FAIL, tr("The preferred lan uage is a two character string or empty."));2141 return setError(E_FAIL, tr("The preferred language is a two character string or empty.")); 2141 2142 2142 2143 if ( !aFormat.equals("html") … … 2168 2169 2169 2170 if (!m->fUsable) 2170 hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());2171 hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str()); 2171 2172 else 2172 2173 { -
trunk/src/VBox/Main/src-all/ExtPackUtil.cpp
r91407 r91718 337 337 /* Check the file size. */ 338 338 if (ObjInfo.cbObject > _1M || ObjInfo.cbObject < 0) 339 return &(new RTCString)->printf(ExtPackUtil::tr("The XML file is too large (%'RU64 bytes)"), ObjInfo.cbObject); 339 return &(new RTCString)->printf(ExtPackUtil::tr("The XML file is too large (%'RU64 bytes)", "", ObjInfo.cbObject), 340 ObjInfo.cbObject); 340 341 size_t const cbFile = (size_t)ObjInfo.cbObject; 341 342 … … 902 903 } 903 904 else 904 vboxExtPackSetError(pszError, cbError, ExtPackUtil::tr("RTManifestEntryGetAttr: %Rrc"), rc);905 vboxExtPackSetError(pszError, cbError, "RTManifestEntryGetAttr: %Rrc", rc); 905 906 return rc; 906 907 } … … 948 949 else if (ObjInfo.cbObject >= _1M) 949 950 rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError, 950 ExtPackUtil::tr("Standard member '%s' is too large: %'RU64 bytes (max 1 MB)"), 951 ExtPackUtil::tr("Standard member '%s' is too large: %'RU64 bytes (max 1 MB)", "", 952 ObjInfo.cbObject), 951 953 pszAdjName, (uint64_t)ObjInfo.cbObject); 952 954 else … … 1089 1091 if (ObjInfo.cbObject >= 9*_1G64) 1090 1092 rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError, 1091 ExtPackUtil::tr("'%s': too large (%'RU64 bytes)" ),1093 ExtPackUtil::tr("'%s': too large (%'RU64 bytes)", "", ObjInfo.cbObject), 1092 1094 pszName, (uint64_t)ObjInfo.cbObject); 1093 1095 if (!RTFS_IS_FILE(ObjInfo.Attr.fMode)) -
trunk/src/VBox/Main/src-all/QMTranslatorImpl.cpp
r91393 r91718 345 345 } 346 346 347 size_t plural( int aNum) const348 { 349 if (aNum < 1|| m_pluralRules.empty())347 size_t plural(size_t aNum) const 348 { 349 if (aNum == SIZE_MAX || m_pluralRules.empty()) 350 350 return 0; 351 351 … … 364 364 for (;;) 365 365 { 366 int iOpCode = m_pluralRules[iPos++];367 int iOpLeft = aNum;366 int iOpCode = m_pluralRules[iPos++]; 367 size_t iOpLeft = aNum; 368 368 if (iOpCode & Pl_Mod10) 369 369 iOpLeft %= 10; 370 370 else if (iOpCode & Pl_Mod100) 371 371 iOpLeft %= 100; 372 else if (iOp Left& Pl_Lead1000)372 else if (iOpCode & Pl_Lead1000) 373 373 { 374 374 while (iOpLeft >= 1000) 375 375 iOpLeft /= 1000; 376 376 } 377 int iOpRight = m_pluralRules[iPos++];378 int iOp = iOpCode & Pl_OpMask;379 int iOpRight1 = 0;377 size_t iOpRight = m_pluralRules[iPos++]; 378 int iOp = iOpCode & Pl_OpMask; 379 size_t iOpRight1 = 0; 380 380 if (iOp == Pl_Between) 381 381 iOpRight1 = m_pluralRules[iPos++]; 382 382 383 383 bool fResult = (iOp == Pl_Eq && iOpLeft == iOpRight) 384 || (iOp == Pl_Lt && iOpLeft < iOpRight)385 || (iOp == Pl_Leq && iOpLeft <= iOpRight)386 || (iOp == Pl_Between && iOpLeft >= iOpRight && iOpLeft <= iOpRight1);384 || (iOp == Pl_Lt && iOpLeft < iOpRight) 385 || (iOp == Pl_Leq && iOpLeft <= iOpRight) 386 || (iOp == Pl_Between && iOpLeft >= iOpRight && iOpLeft <= iOpRight1); 387 387 if (iOpCode & Pl_Not) 388 388 fResult = !fResult; … … 411 411 } 412 412 413 const char *translate(const char *pszContext,414 const char *pszSource,415 const char *pszDisamb,416 const intaNum,413 const char *translate(const char *pszContext, 414 const char *pszSource, 415 const char *pszDisamb, 416 const size_t aNum, 417 417 const char **ppszSafeSource) const RT_NOEXCEPT 418 418 { … … 612 612 613 613 const char *QMTranslator::translate(const char *pszContext, const char *pszSource, const char **ppszSafeSource, 614 const char *pszDisamb /*== NULL*/, const int aNum /*= -1*/) const RT_NOEXCEPT614 const char *pszDisamb /*== NULL*/, const size_t aNum /* = (~(size_t)0) */) const RT_NOEXCEPT 615 615 616 616 { -
trunk/src/VBox/Main/src-all/TextScript.cpp
r91503 r91718 101 101 } 102 102 else 103 hrc = mpSetError->setErrorVrc(vrc, tr("Failed to allocate memory (%'RU64 bytes) for '%s'" ),103 hrc = mpSetError->setErrorVrc(vrc, tr("Failed to allocate memory (%'RU64 bytes) for '%s'", "", cbFile), 104 104 cbFile, pszFilename); 105 105 } … … 264 264 { 265 265 AssertReturn(idxLine < mScriptContentByLines.size(), 266 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("attempting to set line %zu when there are only %zu lines"), 266 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, 267 tr("attempting to set line %zu when there are only %zu lines", "", 268 mScriptContentByLines.size()), 267 269 idxLine, mScriptContentByLines.size())); 268 270 try … … 293 295 AssertReturn(idxLine < mScriptContentByLines.size(), 294 296 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, 295 tr("attempting search&replace in line %zu when there are only %zu lines"), 297 tr("attempting search&replace in line %zu when there are only %zu lines", "", 298 mScriptContentByLines.size()), 296 299 idxLine, mScriptContentByLines.size())); 297 300 … … 320 323 { 321 324 AssertReturn(idxLine < mScriptContentByLines.size(), 322 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("appending to line %zu when there are only %zu lines"), 325 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, 326 tr("appending to line %zu when there are only %zu lines", "", 327 mScriptContentByLines.size()), 323 328 idxLine, mScriptContentByLines.size())); 324 329 … … 337 342 { 338 343 AssertReturn(idxLine < mScriptContentByLines.size(), 339 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, tr("prepending to line %zu when there are only %zu lines"), 344 mpSetError->setErrorBoth(E_FAIL, VERR_OUT_OF_RANGE, 345 tr("prepending to line %zu when there are only %zu lines", "", 346 mScriptContentByLines.size()), 340 347 idxLine, mScriptContentByLines.size())); 341 348 -
trunk/src/VBox/Main/src-all/VirtualBoxTranslator.cpp
r91393 r91718 428 428 429 429 const char *VirtualBoxTranslator::translate(PTRCOMPONENT aComponent, 430 const char *aContext,431 const char *aSourceText,432 const char *aComment,433 const intaNum) RT_NOEXCEPT430 const char *aContext, 431 const char *aSourceText, 432 const char *aComment, 433 const size_t aNum) RT_NOEXCEPT 434 434 { 435 435 VirtualBoxTranslator *pCurrInstance = VirtualBoxTranslator::tryInstance(); … … 471 471 472 472 const char *VirtualBoxTranslator::i_translate(PTRCOMPONENT aComponent, 473 const char *aContext,474 const char *aSourceText,475 const char *aComment,476 const intaNum) RT_NOEXCEPT473 const char *aContext, 474 const char *aSourceText, 475 const char *aComment, 476 const size_t aNum) RT_NOEXCEPT 477 477 { 478 478 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r91503 r91718 2642 2642 ) 2643 2643 return setError(VBOX_E_INVALID_VM_STATE, 2644 tr("Invalid machine state %s when checking if the guest entered the ACPI mode )"),2644 tr("Invalid machine state %s when checking if the guest entered the ACPI mode"), 2645 2645 Global::stringifyMachineState(mMachineState)); 2646 2646 … … 8717 8717 */ 8718 8718 if (strName.length() >= _2K) 8719 return setError(E_INVALIDARG, tr("Shared folder name is too long: %zu bytes"), strName.length()); 8719 return setError(E_INVALIDARG, tr("Shared folder name is too long: %zu bytes", "", strName.length()), 8720 strName.length()); 8720 8721 if (aData.m_strAutoMountPoint.length() >= RTPATH_MAX) 8721 return setError(E_INVALIDARG, tr("Shared folder mountp point too long: %zu bytes"), aData.m_strAutoMountPoint.length()); 8722 return setError(E_INVALIDARG, tr("Shared folder mount point too long: %zu bytes", "", 8723 (int)aData.m_strAutoMountPoint.length()), 8724 aData.m_strAutoMountPoint.length()); 8722 8725 8723 8726 PSHFLSTRING pHostPath = ShflStringDupUtf8AsUtf16(aData.m_strHostPath.c_str()); -
trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
r85746 r91718 541 541 else 542 542 /** @todo r=bird: This isn't an IPRT error, is it? */ 543 hr = setError(VBOX_E_IPRT_ERROR, tr("Guest returned invalid drop formats (%zu formats)"), lstFormats.size()); 543 hr = setError(VBOX_E_IPRT_ERROR, tr("Guest returned invalid drop formats (%zu formats)", "", 544 lstFormats.size()), lstFormats.size()); 544 545 } 545 546 else -
trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
r91518 r91718 1665 1665 hrc = S_OK; 1666 1666 else 1667 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Setting the guest file size of \"%s\" to %RU64 (%#RX64) bytes failed: %Rrc"), 1667 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, 1668 tr("Setting the guest file size of \"%s\" to %RU64 (%#RX64) bytes failed: %Rrc", "", aSize), 1668 1669 mData.mOpenInfo.mFilename.c_str(), aSize, aSize, vrc); 1669 1670 LogFlowFuncLeaveRC(vrc); … … 1687 1688 int vrc = i_writeData(aTimeoutMS, pvData, cbData, (uint32_t*)aWritten); 1688 1689 if (RT_FAILURE(vrc)) 1689 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing %zu bytes to guest file \"%s\" failed: %Rrc" ),1690 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing %zu bytes to guest file \"%s\" failed: %Rrc", "", aData.size()), 1690 1691 aData.size(), mData.mOpenInfo.mFilename.c_str(), vrc); 1691 1692 … … 1710 1711 int vrc = i_writeDataAt(aOffset, aTimeoutMS, pvData, cbData, (uint32_t*)aWritten); 1711 1712 if (RT_FAILURE(vrc)) 1712 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing %zu bytes to file \"%s\" (at offset %RU64) failed: %Rrc"), 1713 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, 1714 tr("Writing %zu bytes to file \"%s\" (at offset %RU64) failed: %Rrc", "", aData.size()), 1713 1715 aData.size(), mData.mOpenInfo.mFilename.c_str(), aOffset, vrc); 1714 1716 -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r91518 r91718 1780 1780 { 1781 1781 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()); 1782 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Reading %RU32 bytes from guest process handle %RU32 failed: %s"), 1782 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, 1783 tr("Reading %RU32 bytes from guest process handle %RU32 failed: %s", "", aToRead), 1783 1784 aToRead, aHandle, GuestBase::getErrorAsString(ge).c_str()); 1784 1785 break; … … 1932 1933 { 1933 1934 GuestErrorInfo ge(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()); 1934 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Writing %RU32 bytes (flags %#x) to guest process failed: %s"), 1935 hr = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, 1936 tr("Writing %RU32 bytes (flags %#x) to guest process failed: %s", "", cbData), 1935 1937 cbData, aFlags, GuestBase::getErrorAsString(ge).c_str()); 1936 1938 break; -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r90828 r91718 393 393 { 394 394 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 395 Utf8StrFmt(tr("Reading %RU32 bytes @ %RU64 from guest \"%s\" failed: %Rrc" ),395 Utf8StrFmt(tr("Reading %RU32 bytes @ %RU64 from guest \"%s\" failed: %Rrc", "", cbChunk), 396 396 cbChunk, cbWrittenTotal, strSrcFile.c_str(), rc)); 397 397 break; … … 402 402 { 403 403 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 404 Utf8StrFmt(tr("Writing %RU32 bytes to host file \"%s\" failed: %Rrc" ),404 Utf8StrFmt(tr("Writing %RU32 bytes to host file \"%s\" failed: %Rrc", "", cbRead), 405 405 cbRead, strDstFile.c_str(), rc)); 406 406 break; … … 713 713 { 714 714 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 715 Utf8StrFmt(tr("Reading %RU32 bytes @ %RU64 from host file \"%s\" failed: %Rrc" ),715 Utf8StrFmt(tr("Reading %RU32 bytes @ %RU64 from host file \"%s\" failed: %Rrc", "", cbChunk), 716 716 cbChunk, cbWrittenTotal, strSrcFile.c_str(), rc)); 717 717 break; … … 722 722 { 723 723 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 724 Utf8StrFmt(tr("Writing %zu bytes to guest file \"%s\" failed: %Rrc" ),724 Utf8StrFmt(tr("Writing %zu bytes to guest file \"%s\" failed: %Rrc", "", cbRead), 725 725 cbRead, strDstFile.c_str(), rc)); 726 726 break; -
trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp
r91503 r91718 288 288 tr("VBoxSDS is misconfigured to run under the '%ls' account instead of the SYSTEM one.\n" 289 289 "Reinstall VirtualBox to fix it. Alternatively you can fix it using the Windows Service Control " 290 "Manager or by running ' qc config VBoxSDS obj=LocalSystem' on a command line."), wszBuffer);290 "Manager or by running 'sc config VBoxSDS obj=LocalSystem' on a command line."), wszBuffer); 291 291 if (uStartType == SERVICE_DISABLED) 292 292 return setError(hrcCaller, -
trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
r86650 r91718 2344 2344 hrc = mVirtualBox->COMGETTER(CloudProviderManager)(cpm.asOutParam()); 2345 2345 if (FAILED(hrc)) 2346 return setError(VBOX_E_OBJECT_NOT_FOUND, tr("% : Cloud provider manager object wasn't found"), __FUNCTION__);2346 return setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s: Cloud provider manager object wasn't found"), __FUNCTION__); 2347 2347 2348 2348 Utf8Str strProviderName = pTask->locInfo.strProvider; -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r91503 r91718 408 408 if (llNetworkAdapters.size() > maxNetworkAdapters) 409 409 i_addWarning(tr("The virtual system \"%s\" claims support for %zu network adapters, but VirtualBox " 410 "has support for max %u network adapter only." ),410 "has support for max %u network adapter only.","", llNetworkAdapters.size()), 411 411 vsysThis.strName.c_str(), llNetworkAdapters.size(), maxNetworkAdapters); 412 412 /* Iterate through all network adapters. */ … … 438 438 if (cEthernetAdapters > maxNetworkAdapters) 439 439 i_addWarning(tr("The virtual system \"%s\" claims support for %zu network adapters, but VirtualBox " 440 "has support for max %u network adapter only." ),440 "has support for max %u network adapter only.", "", cEthernetAdapters), 441 441 vsysThis.strName.c_str(), cEthernetAdapters, maxNetworkAdapters); 442 442 … … 3047 3047 pSignedData->ContentInfo.ContentType.szObjId, RTCR_PKCS7_DATA_OID); 3048 3048 else if (RTAsn1OctetString_IsPresent(&pSignedData->ContentInfo.Content)) 3049 i_addWarning(tr("Invalid PKCS#7/CMS data: embedded (%u bytes), expected external"), 3049 i_addWarning(tr("Invalid PKCS#7/CMS data: embedded (%u bytes), expected external","", 3050 (int)pSignedData->ContentInfo.Content.Asn1Core.cb), 3050 3051 pSignedData->ContentInfo.Content.Asn1Core.cb); 3051 3052 else if (pSignedData->SignerInfos.cItems == 0) … … 3479 3480 if ( pSignedData->SignerInfos.cItems > 1 3480 3481 && pSignedData->SignerInfos.cItems != cVerifiedOkay) 3481 i_addWarning(tr("%u out of %u PKCS#7/CMS signatures verfified okay"), 3482 i_addWarning(tr("%u out of %u PKCS#7/CMS signatures verfified okay", "", 3483 pSignedData->SignerInfos.cItems), 3482 3484 cVerifiedOkay, pSignedData->SignerInfos.cItems); 3483 3485 } … … 4454 4456 throw setError(VBOX_E_FILE_ERROR, 4455 4457 tr("Too many network adapters: OVF requests %d network adapters, " 4456 "but VirtualBox only supports %d" ),4458 "but VirtualBox only supports %d", "", vsdeNW.size()), 4457 4459 vsdeNW.size(), maxNetworkAdapters); 4458 4460 else -
trunk/src/VBox/Main/src-server/BandwidthGroupImpl.cpp
r85242 r91718 66 66 || (aType > BandwidthGroupType_Network)) 67 67 return setError(E_INVALIDARG, 68 tr("Invalid bandwidth group type type"));68 tr("Invalid bandwidth group type")); 69 69 70 70 /* Enclose the state transition NotReady->InInit->Ready */ -
trunk/src/VBox/Main/src-server/DHCPConfigImpl.cpp
r90828 r91718 888 888 return pErrorDst->setError(E_INVALIDARG, tr("Value cannot be empty")); 889 889 if (strValue.length() < 255) 890 return pErrorDst->setError(E_INVALIDARG, tr("Value is too long: %zu bytes"), strValue.length()); 890 return pErrorDst->setError(E_INVALIDARG, tr("Value is too long: %zu bytes", "", strValue.length()), 891 strValue.length()); 891 892 break; 892 893 -
trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
r91503 r91718 1113 1113 return setError(E_INVALIDARG, tr("A group must have a name!")); 1114 1114 if (aName.length() > _1K) 1115 return setError(E_INVALIDARG, tr("Name too long! %zu bytes" ), aName.length());1115 return setError(E_INVALIDARG, tr("Name too long! %zu bytes", "", aName.length()), aName.length()); 1116 1116 1117 1117 /* Look up the group: */ -
trunk/src/VBox/Main/src-server/DataStreamImpl.cpp
r82968 r91718 211 211 hrc = VBOX_E_TIMEOUT; 212 212 else if (RT_FAILURE(vrc)) 213 hrc = setErrorBoth(E_FAIL, vrc, tr("Error reading %u bytes: %Rrc" ), aSize, vrc);213 hrc = setErrorBoth(E_FAIL, vrc, tr("Error reading %u bytes: %Rrc", "", aSize), aSize, vrc); 214 214 } 215 215 -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r91614 r91718 4678 4678 if (aSlot >= mNetworkAdapters.size()) 4679 4679 return setError(E_INVALIDARG, 4680 tr("No network adapter in slot %RU32 (total %RU32 adapters)" ),4680 tr("No network adapter in slot %RU32 (total %RU32 adapters)", "", mNetworkAdapters.size()), 4681 4681 aSlot, mNetworkAdapters.size()); 4682 4682 … … 6779 6779 else 6780 6780 hrc = setError(E_UNEXPECTED, 6781 tr("%s machine '%s' to the autostart database failed with %Rrc"), 6782 aAutostartEnabled ? "Adding" : "Removing", 6781 aAutostartEnabled ? 6782 tr("Adding machine '%s' to the autostart database failed with %Rrc") : 6783 tr("Removing machine '%s' from the autostart database failed with %Rrc"), 6783 6784 mUserData->s.strName.c_str(), vrc); 6784 6785 } … … 6852 6853 else 6853 6854 hrc = setError(E_UNEXPECTED, 6854 tr("%s machine '%s' to the autostop database failed with %Rrc"), 6855 aAutostopType != AutostopType_Disabled ? "Adding" : "Removing", 6855 aAutostopType != AutostopType_Disabled ? 6856 tr("Adding machine '%s' to the autostop database failed with %Rrc") : 6857 tr("Removing machine '%s' from the autostop database failed with %Rrc"), 6856 6858 mUserData->s.strName.c_str(), vrc); 6857 6859 } -
trunk/src/VBox/Main/src-server/MediumIOImpl.cpp
r82968 r91718 669 669 { 670 670 a_rData.resize(0); 671 hrc = setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Error reading %u bytes at %RU64: %Rrc"), a_cbRead, a_off, vrc); 671 hrc = setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Error reading %u bytes at %RU64: %Rrc", "", a_cbRead), 672 a_cbRead, a_off, vrc); 672 673 } 673 674 … … 706 707 } 707 708 else 708 hrc = setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Error writing %zu bytes at %RU64: %Rrc"), cbToWrite, a_off, vrc); 709 hrc = setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Error writing %zu bytes at %RU64: %Rrc", "", cbToWrite), 710 cbToWrite, a_off, vrc); 709 711 710 712 return hrc; -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r91503 r91718 1885 1885 && m->backRefs.size() > 0)) 1886 1886 return setError(VBOX_E_INVALID_OBJECT_STATE, 1887 tr("Cannot change the type of medium '%s' because it is attached to %d virtual machines"), 1887 tr("Cannot change the type of medium '%s' because it is attached to %d virtual machines", 1888 "", m->backRefs.size()), 1888 1889 m->strLocationFull.c_str(), m->backRefs.size()); 1889 1890 … … 1907 1908 if (i_getChildren().size() != 0) 1908 1909 return setError(VBOX_E_OBJECT_IN_USE, 1909 tr("Cannot change type for medium '%s' since it has %d child media" ),1910 tr("Cannot change type for medium '%s' since it has %d child media", "", i_getChildren().size()), 1910 1911 m->strLocationFull.c_str(), i_getChildren().size()); 1911 1912 if (aType == MediumType_Shareable) … … 3665 3666 if (m->backRefs.size() > 1) 3666 3667 return setError(VBOX_E_INVALID_OBJECT_STATE, 3667 tr("Cannot encrypt medium '%s' because it is attached to %d virtual machines" ),3668 tr("Cannot encrypt medium '%s' because it is attached to %d virtual machines", "", m->backRefs.size()), 3668 3669 m->strLocationFull.c_str(), m->backRefs.size()); 3669 3670 3670 3671 if (i_getChildren().size() != 0) 3671 3672 return setError(VBOX_E_INVALID_OBJECT_STATE, 3672 tr("Cannot encrypt medium '%s' because it has %d children" ),3673 tr("Cannot encrypt medium '%s' because it has %d children", "", i_getChildren().size()), 3673 3674 m->strLocationFull.c_str(), i_getChildren().size()); 3674 3675 … … 3718 3719 { 3719 3720 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 3720 tr("Cannot encrypt medium '%s' because it is attached to %d virtual machines"), 3721 tr("Cannot encrypt medium '%s' because it is attached to %d virtual machines", "", 3722 pMedium->m->backRefs.size()), 3721 3723 pMedium->m->strLocationFull.c_str(), pMedium->m->backRefs.size()); 3722 3724 break; … … 3725 3727 { 3726 3728 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 3727 tr("Cannot encrypt medium '%s' because it has %d children" ),3729 tr("Cannot encrypt medium '%s' because it has %d children", "", pMedium->i_getChildren().size()), 3728 3730 pMedium->m->strLocationFull.c_str(), pMedium->i_getChildren().size()); 3729 3731 break; … … 3737 3739 } 3738 3740 3739 const char *pszAction = "Encrypting";3741 const char *pszAction = tr("Encrypting medium"); 3740 3742 if ( aCurrentPassword.isNotEmpty() 3741 3743 && aCipher.isEmpty()) 3742 pszAction = "Decrypting";3744 pszAction = tr("Decrypting medium"); 3743 3745 3744 3746 pProgress.createObject(); 3745 3747 rc = pProgress->init(m->pVirtualBox, 3746 3748 static_cast <IMedium *>(this), 3747 BstrFmt( tr("%s medium '%s'"), pszAction, m->strLocationFull.c_str()).raw(),3749 BstrFmt("%s '%s'", pszAction, m->strLocationFull.c_str()).raw(), 3748 3750 TRUE /* aCancelable */); 3749 3751 if (FAILED(rc)) … … 4377 4379 if (m->numCreateDiffTasks > 0) 4378 4380 return setError(VBOX_E_OBJECT_IN_USE, 4379 tr("Cannot attach medium '%s' {%RTuuid}: %u differencing child media are being created"), 4381 tr("Cannot attach medium '%s' {%RTuuid}: %u differencing child media are being created", "", 4382 m->numCreateDiffTasks), 4380 4383 m->strLocationFull.c_str(), 4381 4384 m->id.raw(), … … 5245 5248 if (m->backRefs.size() != 0) 5246 5249 return setError(VBOX_E_OBJECT_IN_USE, 5247 tr("Medium '%s' cannot be closed because it is still attached to %d virtual machines"), 5250 tr("Medium '%s' cannot be closed because it is still attached to %d virtual machines", "", 5251 m->backRefs.size()), 5248 5252 m->strLocationFull.c_str(), m->backRefs.size()); 5249 5253 … … 5399 5403 #endif 5400 5404 throw setError(VBOX_E_OBJECT_IN_USE, 5401 tr("Cannot delete storage: medium '%s' is still attached to the following %d virtual machine(s): %s"), 5405 tr("Cannot delete storage: medium '%s' is still attached to the following %d virtual machine(s): %s", 5406 "", m->backRefs.size()), 5402 5407 m->strLocationFull.c_str(), 5403 5408 m->backRefs.size(), … … 5867 5872 && *i_getFirstMachineBackrefSnapshotId() != *aSnapshotId))) 5868 5873 throw setError(VBOX_E_OBJECT_IN_USE, 5869 tr("Medium '%s' is attached to %d virtual machines" ),5874 tr("Medium '%s' is attached to %d virtual machines", "", m->backRefs.size()), 5870 5875 m->strLocationFull.c_str(), m->backRefs.size()); 5871 5876 if (m->type == MediumType_Immutable) … … 5913 5918 if (pLast->m->backRefs.size() != 0) 5914 5919 throw setError(VBOX_E_OBJECT_IN_USE, 5915 tr("Medium '%s' is attached to %d virtual machines" ),5920 tr("Medium '%s' is attached to %d virtual machines", "", pLast->m->backRefs.size()), 5916 5921 pLast->m->strLocationFull.c_str(), 5917 5922 pLast->m->backRefs.size()); … … 7565 7570 if (i_getChildren().size() != 0) 7566 7571 return setError(VBOX_E_OBJECT_IN_USE, 7567 tr("Cannot close medium '%s' because it has %d child media" ),7572 tr("Cannot close medium '%s' because it has %d child media", "", i_getChildren().size()), 7568 7573 m->strLocationFull.c_str(), i_getChildren().size()); 7569 7574 … … 10209 10214 else if (vrc == VERR_NOT_IMPLEMENTED) 10210 10215 throw setErrorBoth(E_NOTIMPL, vrc, 10211 tr("Resi ting is not implemented, medium '%s'"),10216 tr("Resizing is not implemented, medium '%s'"), 10212 10217 location.c_str()); 10213 10218 else -
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r91363 r91718 2701 2701 if (childrenCount > 1) 2702 2702 return setError(VBOX_E_INVALID_OBJECT_STATE, 2703 tr("Snapshot '%s' of the machine '%s' cannot be deleted, because it has %d child snapshots, which is more than the one snapshot allowed for deletion"), 2703 tr("Snapshot '%s' of the machine '%s' cannot be deleted, because it has %d child snapshots, which is more than the one snapshot allowed for deletion", 2704 "", childrenCount), 2704 2705 pSnapshot->i_getName().c_str(), 2705 2706 mUserData->s.strName.c_str(), … … 3061 3062 { 3062 3063 rc = setError(E_FAIL, 3063 tr("Unable to merge storage '%s', because it is smaller than the source image. If you resize it to have a capacity of at least %lld bytes you can retry"), 3064 tr("Unable to merge storage '%s', because it is smaller than the source image. If you resize it to have a capacity of at least %lld bytes you can retry", 3065 "", pSource->i_getLogicalSize()), 3064 3066 pTarget->i_getLocationFull().c_str(), pSource->i_getLogicalSize()); 3065 3067 throw rc; -
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r91503 r91718 1841 1841 { 1842 1842 /* We could in many cases create another controller here, but it's not worth the effort. */ 1843 return setError(E_FAIL, tr("Not enough free slots on controller '%s' to add %u DVD drive(s)"), 1843 return setError(E_FAIL, tr("Not enough free slots on controller '%s' to add %u DVD drive(s)", "", 1844 cDvdDrivesNeeded - lstControllerDvdSlots.size()), 1844 1845 strRecommendedControllerName.c_str(), cDvdDrivesNeeded - lstControllerDvdSlots.size()); 1845 1846 } … … 2303 2304 if (aHostname.length() > (aHostname.endsWith(".") ? 254U : 253U)) 2304 2305 return setErrorBoth(E_INVALIDARG, VERR_INVALID_NAME, 2305 tr("Hostname '%s' is %zu bytes long, max is 253 (excluding trailing dot)" ),2306 tr("Hostname '%s' is %zu bytes long, max is 253 (excluding trailing dot)", "", aHostname.length()), 2306 2307 aHostname.c_str(), aHostname.length()); 2307 2308 size_t cLabels = 0; -
trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp
r91476 r91718 425 425 else 426 426 hrc = mpParent->setErrorBoth(E_FAIL, vrc, 427 tr("Error writing %zu bytes to '%s' in floppy image '%s': %Rrc"), 427 tr("Error writing %zu bytes to '%s' in floppy image '%s': %Rrc", 428 "", strScript.length()), 428 429 strScript.length(), pEditor->getDefaultFilename(), 429 430 getAuxiliaryFloppyFilePath().c_str()); … … 588 589 else 589 590 hrc = mpParent->setErrorBoth(E_FAIL, vrc, 590 tr("RTVfsFileFromBuffer failed on the %zu byte script '%s' (%Rrc)" ),591 tr("RTVfsFileFromBuffer failed on the %zu byte script '%s' (%Rrc)", "", cchScript), 591 592 cchScript, pszDstFilename, vrc); 592 593 }
Note:
See TracChangeset
for help on using the changeset viewer.