VirtualBox

Changeset 95946 in vbox for trunk/src


Ignore:
Timestamp:
Jul 29, 2022 2:55:46 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
152702
Message:

FE/Qt/Ds: Fixing redundant NLS contexts for wizard editors stuff.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp

    r95618 r95946  
    2929#include "UICommon.h"
    3030#include "UIFilePathSelector.h"
     31#include "UIWizardCloneVM.h"
    3132#include "UIWizardCloneVMEditors.h"
    3233
     
    5960
    6061    bool fInvalidName = m_pNameLineEdit->text().isEmpty();
    61     m_pNameLineEdit->mark(fInvalidName, tr("Clone name cannot be empty"));
     62    m_pNameLineEdit->mark(fInvalidName, UIWizardCloneVM::tr("Clone name cannot be empty"));
    6263
    6364    const QString &strPath = m_pPathSelector->path();
    6465    QDir dir(strPath);
    6566    bool fInvalidPath = strPath.isEmpty() || !dir.exists() || !dir.isReadable();
    66     m_pPathSelector->mark(fInvalidPath, tr("Path is invalid"));
     67    m_pPathSelector->mark(fInvalidPath, UIWizardCloneVM::tr("Path is invalid"));
    6768
    6869    /* Check if there is already a machine folder for this name and path: */
     
    7475            vbox.ComposeMachineFilename(m_pNameLineEdit->text(), strMachineGroup, QString(), m_pPathSelector->path());
    7576        fExists = QDir(QDir::toNativeSeparators(QFileInfo(strCloneFilePath).absolutePath())).exists();
    76         m_pNameLineEdit->mark(fExists, tr("The clone name is not unique"));
     77        m_pNameLineEdit->mark(fExists, UIWizardCloneVM::tr("The clone name is not unique"));
    7778    }
    7879
     
    145146    {
    146147        m_pContainerLayout->addWidget(m_pNameLineEdit, 0, 1, 1, 1);
    147         m_pNameLineEdit->setText(tr("%1 Clone").arg(m_strOriginalName));
     148        m_pNameLineEdit->setText(UIWizardCloneVM::tr("%1 Clone").arg(m_strOriginalName));
    148149        connect(m_pNameLineEdit, &UIMarkableLineEdit::textChanged,
    149150                this, &UICloneVMNamePathEditor::sigCloneNameChanged);
     
    178179{
    179180    if (m_pNameLabel)
    180         m_pNameLabel->setText(tr("&Name:"));
     181        m_pNameLabel->setText(UIWizardCloneVM::tr("&Name:"));
    181182    if (m_pPathLabel)
    182         m_pPathLabel->setText(tr("&Path:"));
     183        m_pPathLabel->setText(UIWizardCloneVM::tr("&Path:"));
    183184    if (m_pNameLineEdit)
    184185        m_pNameLineEdit->setToolTip("Holds a name for the new virtual machine.");
     
    320321void UICloneVMAdditionalOptionsEditor::retranslateUi()
    321322{
    322     m_pMACComboBoxLabel->setText(tr("MAC Address P&olicy:"));
    323     m_pMACComboBox->setToolTip(tr("Determines MAC address policy for clonning:"));
     323    m_pMACComboBoxLabel->setText(UIWizardCloneVM::tr("MAC Address P&olicy:"));
     324    m_pMACComboBox->setToolTip(UIWizardCloneVM::tr("Determines MAC address policy for clonning:"));
    324325    for (int i = 0; i < m_pMACComboBox->count(); ++i)
    325326    {
     
    329330            case MACAddressClonePolicy_KeepAllMACs:
    330331                {
    331                     m_pMACComboBox->setItemText(i, tr("Include all network adapter MAC addresses"));
    332                     m_pMACComboBox->setItemData(i, tr("Include all network adapter MAC addresses during cloning."), Qt::ToolTipRole);
     332                    m_pMACComboBox->setItemText(i, UIWizardCloneVM::tr("Include all network adapter MAC addresses"));
     333                    m_pMACComboBox->setItemData(i, UIWizardCloneVM::tr("Include all network adapter MAC addresses during "
     334                                                                       "cloning."), Qt::ToolTipRole);
    333335                    break;
    334336                }
    335337            case MACAddressClonePolicy_KeepNATMACs:
    336338                {
    337                     m_pMACComboBox->setItemText(i, tr("Include only NAT network adapter MAC addresses"));
    338                     m_pMACComboBox->setItemData(i, tr("Include only NAT network adapter MAC addresses during cloning."), Qt::ToolTipRole);
     339                    m_pMACComboBox->setItemText(i, UIWizardCloneVM::tr("Include only NAT network adapter MAC addresses"));
     340                    m_pMACComboBox->setItemData(i, UIWizardCloneVM::tr("Include only NAT network adapter MAC addresses during "
     341                                                                       "cloning."), Qt::ToolTipRole);
    339342                    break;
    340343                }
    341344            case MACAddressClonePolicy_StripAllMACs:
    342345                {
    343                     m_pMACComboBox->setItemText(i, tr("Generate new MAC addresses for all network adapters"));
    344                     m_pMACComboBox->setItemData(i, tr("Generate new MAC addresses for all network adapters during cloning."), Qt::ToolTipRole);
     346                    m_pMACComboBox->setItemText(i, UIWizardCloneVM::tr("Generate new MAC addresses for all network adapters"));
     347                    m_pMACComboBox->setItemData(i, UIWizardCloneVM::tr("Generate new MAC addresses for all network adapters during "
     348                                                                       "cloning."), Qt::ToolTipRole);
    345349                    break;
    346350                }
     
    351355
    352356    if (m_pAdditionalOptionsLabel)
    353         m_pAdditionalOptionsLabel->setText(tr("Additional Options:"));
     357        m_pAdditionalOptionsLabel->setText(UIWizardCloneVM::tr("Additional Options:"));
    354358    if (m_pKeepDiskNamesCheckBox)
    355359    {
    356         m_pKeepDiskNamesCheckBox->setToolTip(tr("Enables keeping the disk names during cloning."));
    357         m_pKeepDiskNamesCheckBox->setText(tr("Keep &Disk Names"));
     360        m_pKeepDiskNamesCheckBox->setToolTip(UIWizardCloneVM::tr("Enables keeping the disk names during cloning."));
     361        m_pKeepDiskNamesCheckBox->setText(UIWizardCloneVM::tr("Keep &Disk Names"));
    358362    }
    359363    if (m_pKeepHWUUIDsCheckBox)
    360364    {
    361         m_pKeepHWUUIDsCheckBox->setToolTip(tr("Enables keeping hardware UUIDs during cloning."));
    362         m_pKeepHWUUIDsCheckBox->setText(tr("Keep Hard&ware UUIDs"));
     365        m_pKeepHWUUIDsCheckBox->setToolTip(UIWizardCloneVM::tr("Enables keeping hardware UUIDs during cloning."));
     366        m_pKeepHWUUIDsCheckBox->setText(UIWizardCloneVM::tr("Keep Hard&ware UUIDs"));
    363367    }
    364368}
     
    478482    if (m_pFullCloneRadio)
    479483    {
    480         m_pFullCloneRadio->setText(tr("&Full clone"));
    481         m_pFullCloneRadio->setToolTip(tr("When chosen, all the virtual disks of the source vm are also cloned."));
     484        m_pFullCloneRadio->setText(UIWizardCloneVM::tr("&Full clone"));
     485        m_pFullCloneRadio->setToolTip(UIWizardCloneVM::tr("When chosen, all the virtual disks of the source vm are also cloned."));
    482486    }
    483487    if (m_pLinkedCloneRadio)
    484488    {
    485         m_pLinkedCloneRadio->setText(tr("&Linked clone"));
    486         m_pLinkedCloneRadio->setToolTip(tr("When chosen, the cloned vm will save space by sharing the source VM's disk images."));
     489        m_pLinkedCloneRadio->setText(UIWizardCloneVM::tr("&Linked clone"));
     490        m_pLinkedCloneRadio->setToolTip(UIWizardCloneVM::tr("When chosen, the cloned vm will save space by sharing the source VM's disk images."));
    487491    }
    488492}
     
    548552    if (m_pMachineRadio)
    549553    {
    550         m_pMachineRadio->setText(tr("Current &machine state"));
    551         m_pMachineRadio->setToolTip(tr("When chosen, only the current state of the source vm is cloned."));
     554        m_pMachineRadio->setText(UIWizardCloneVM::tr("Current &machine state"));
     555        m_pMachineRadio->setToolTip(UIWizardCloneVM::tr("When chosen, only the current state of the source vm is cloned."));
    552556    }
    553557    if (m_pMachineAndChildsRadio)
    554         m_pMachineAndChildsRadio->setText(tr("Current &snapshot tree branch"));
     558        m_pMachineAndChildsRadio->setText(UIWizardCloneVM::tr("Current &snapshot tree branch"));
    555559    if (m_pAllRadio)
    556560    {
    557         m_pAllRadio->setText(tr("&Everything"));
    558         m_pAllRadio->setToolTip(tr("When chosen, all the saved states of the source vm are also cloned."));
     561        m_pAllRadio->setText(UIWizardCloneVM::tr("&Everything"));
     562        m_pAllRadio->setToolTip(UIWizardCloneVM::tr("When chosen, all the saved states of the source vm are also cloned."));
    559563    }
    560564}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp

    r95169 r95946  
    184184    bool fError = !UIWizardNewVMUnattendedCommon::checkGAISOFile(path());
    185185    if (m_pGAISOFilePathSelector)
    186         m_pGAISOFilePathSelector->mark(fError, tr("Invalid Guest Additions installation media"));
     186        m_pGAISOFilePathSelector->mark(fError, UIWizardNewVM::tr("Invalid Guest Additions installation media"));
    187187}
    188188
     
    285285    }
    286286    if (m_pProductKeyLineEdit)
    287         m_pProductKeyLineEdit->setToolTip(tr("Holds the product key."));
     287        m_pProductKeyLineEdit->setToolTip(UIWizardNewVM::tr("Holds the product key."));
    288288}
    289289
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