VirtualBox

Ignore:
Timestamp:
Aug 24, 2021 9:44:46 AM (3 years ago)
Author:
vboxsync
Message:

Main: bugref:1909: Added API localization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp

    r86270 r90828  
    165165        if (RT_FAILURE(vrc))
    166166            return mpParent->setErrorBoth(E_FAIL, vrc,
    167                                           mpParent->tr("Failed to construct path to the unattended installer script templates (%Rrc)"),
     167                                          tr("Failed to construct path to the unattended installer script templates (%Rrc)"),
    168168                                          vrc);
    169169    }
     
    183183        if (RT_FAILURE(vrc))
    184184            return mpParent->setErrorBoth(E_FAIL, vrc,
    185                                           mpParent->tr("Failed to construct path to the unattended installer script templates (%Rrc)"),
     185                                          tr("Failed to construct path to the unattended installer script templates (%Rrc)"),
    186186                                          vrc);
    187187    }
     
    208208     */
    209209    if (mpParent->i_getIsoPath().isEmpty())
    210         return mpParent->setError(E_INVALIDARG, mpParent->tr("Cannot proceed with an empty installation ISO path"));
     210        return mpParent->setError(E_INVALIDARG, tr("Cannot proceed with an empty installation ISO path"));
    211211    if (mpParent->i_getUser().isEmpty())
    212         return mpParent->setError(E_INVALIDARG, mpParent->tr("Empty user name is not allowed"));
     212        return mpParent->setError(E_INVALIDARG, tr("Empty user name is not allowed"));
    213213    if (mpParent->i_getPassword().isEmpty())
    214         return mpParent->setError(E_INVALIDARG, mpParent->tr("Empty password is not allowed"));
     214        return mpParent->setError(E_INVALIDARG, tr("Empty password is not allowed"));
    215215
    216216    LogRelFunc(("UnattendedInstaller::savePassedData(): \n"));
     
    372372
    373373            if (RTErrInfoIsSet(&ErrInfo.Core))
    374                 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open newly created floppy image '%s': %Rrc: %s"),
     374                hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open newly created floppy image '%s': %Rrc: %s"),
    375375                                             pszFilename, vrc, ErrInfo.Core.pszMsg);
    376376            else
    377                 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open newly created floppy image '%s': %Rrc"),
     377                hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open newly created floppy image '%s': %Rrc"),
    378378                                             pszFilename, vrc);
    379379        }
    380380        else
    381             hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to format floppy image '%s': %Rrc"), pszFilename, vrc);
     381            hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to format floppy image '%s': %Rrc"), pszFilename, vrc);
    382382        RTVfsFileRelease(hVfsFile);
    383383        RTFileDelete(pszFilename);
    384384    }
    385385    else
    386         hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to create floppy image '%s': %Rrc"), pszFilename, vrc);
     386        hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to create floppy image '%s': %Rrc"), pszFilename, vrc);
    387387    return hrc;
    388388}
     
    425425            else
    426426                hrc = mpParent->setErrorBoth(E_FAIL, vrc,
    427                                              mpParent->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"),
    428428                                             strScript.length(), pEditor->getDefaultFilename(),
    429429                                             getAuxiliaryFloppyFilePath().c_str());
     
    433433    else
    434434        hrc = mpParent->setErrorBoth(E_FAIL, vrc,
    435                                      mpParent->tr("Error creating '%s' in floppy image '%s': %Rrc"),
     435                                     tr("Error creating '%s' in floppy image '%s': %Rrc"),
    436436                                     pEditor->getDefaultFilename(), getAuxiliaryFloppyFilePath().c_str());
    437437    return hrc;
     
    505505    int vrc = RTVfsFileOpenNormal(pszIsoPath, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE, &hOrgIsoFile);
    506506    if (RT_FAILURE(vrc))
    507         return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open ISO image '%s' (%Rrc)"), pszIsoPath, vrc);
     507        return mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open ISO image '%s' (%Rrc)"), pszIsoPath, vrc);
    508508
    509509    /* Pass the file to the ISO file system interpreter. */
     
    514514        return S_OK;
    515515    if (RTErrInfoIsSet(&ErrInfo.Core))
    516         return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("ISO reader fail to open '%s' (%Rrc): %s"),
     516        return mpParent->setErrorBoth(E_FAIL, vrc, tr("ISO reader fail to open '%s' (%Rrc): %s"),
    517517                                      pszIsoPath, vrc, ErrInfo.Core.pszMsg);
    518     return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("ISO reader fail to open '%s' (%Rrc)"), pszIsoPath, vrc);
     518    return mpParent->setErrorBoth(E_FAIL, vrc, tr("ISO reader fail to open '%s' (%Rrc)"), pszIsoPath, vrc);
    519519}
    520520
     
    524524    if (RT_SUCCESS(vrc))
    525525        return S_OK;
    526     return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTFsIsoMakerCreate failed (%Rrc)"), vrc);
     526    return mpParent->setErrorBoth(E_FAIL, vrc, tr("RTFsIsoMakerCreate failed (%Rrc)"), vrc);
    527527}
    528528
     
    583583            else
    584584                hrc = mpParent->setErrorBoth(E_FAIL, vrc,
    585                                              mpParent->tr("RTFsIsoMakerAddFileWithVfsFile failed on the script '%s' (%Rrc)"),
     585                                             tr("RTFsIsoMakerAddFileWithVfsFile failed on the script '%s' (%Rrc)"),
    586586                                             pszDstFilename, vrc);
    587587        }
    588588        else
    589589            hrc = mpParent->setErrorBoth(E_FAIL, vrc,
    590                                          mpParent->tr("RTVfsFileFromBuffer failed on the %zu byte script '%s' (%Rrc)"),
     590                                         tr("RTVfsFileFromBuffer failed on the %zu byte script '%s' (%Rrc)"),
    591591                                         cchScript, pszDstFilename, vrc);
    592592    }
     
    601601    int vrc = RTFsIsoMakerFinalize(hIsoMaker);
    602602    if (RT_FAILURE(vrc))
    603         return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTFsIsoMakerFinalize failed (%Rrc)"), vrc);
     603        return mpParent->setErrorBoth(E_FAIL, vrc, tr("RTFsIsoMakerFinalize failed (%Rrc)"), vrc);
    604604
    605605    /*
     
    616616    {
    617617        if (vrc == VERR_ALREADY_EXISTS)
    618             return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("The auxiliary ISO image file '%s' already exists"),
     618            return mpParent->setErrorBoth(E_FAIL, vrc, tr("The auxiliary ISO image file '%s' already exists"),
    619619                                          pszFilename);
    620         return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open the auxiliary ISO image file '%s' for writing (%Rrc)"),
     620        return mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open the auxiliary ISO image file '%s' for writing (%Rrc)"),
    621621                                      pszFilename, vrc);
    622622    }
     
    639639                hrc = S_OK;
    640640            else
    641                 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Error writing auxiliary ISO image '%s' (%Rrc)"),
     641                hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Error writing auxiliary ISO image '%s' (%Rrc)"),
    642642                                             pszFilename, vrc);
    643643        }
    644644        else
    645645            hrc = mpParent->setErrorBoth(E_FAIL, VERR_INTERNAL_ERROR_2,
    646                                          mpParent->tr("Internal Error: Failed to case VFS file to VFS I/O stream"));
     646                                         tr("Internal Error: Failed to case VFS file to VFS I/O stream"));
    647647        RTVfsIoStrmRelease(hVfsSrcIso);
    648648        RTVfsIoStrmRelease(hVfsDstIso);
    649649    }
    650650    else
    651         hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTFsIsoMakerCreateVfsOutputFile failed (%Rrc)"), vrc);
     651        hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("RTFsIsoMakerCreateVfsOutputFile failed (%Rrc)"), vrc);
    652652    RTVfsFileRelease(hVfsSrcFile);
    653653    RTVfsFileRelease(hVfsDstFile);
     
    757757    RTMemTmpFree(papszArgs);
    758758    if (RT_FAILURE(vrc))
    759         return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTGetOptArgvToString failed (%Rrc)"), vrc);
     759        return mpParent->setErrorBoth(E_FAIL, vrc, tr("RTGetOptArgvToString failed (%Rrc)"), vrc);
    760760
    761761    /*
     
    780780            hrc = S_OK;
    781781        else
    782             hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, mpParent->tr("Error writing '%s' (%Rrc)"), pszFilename, vrc);
     782            hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Error writing '%s' (%Rrc)"), pszFilename, vrc);
    783783    }
    784784    else
    785         hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, mpParent->tr("Failed to create '%s' (%Rrc)"), pszFilename, vrc);
     785        hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Failed to create '%s' (%Rrc)"), pszFilename, vrc);
    786786
    787787    RTStrFree(pszCmdLine);
     
    802802    }
    803803    else
    804         hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, mpParent->tr("Failed to open '%s' on the ISO '%s' (%Rrc)"),
     804        hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Failed to open '%s' on the ISO '%s' (%Rrc)"),
    805805                                     pszFilename, mpParent->i_getIsoPath().c_str(), vrc);
    806806    return hrc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette